:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary: #10b981;
    --secondary-dark: #0d9668;
    --accent: #8b5cf6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --border-radius: 10px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Compact */
header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,0 L1000,0 L1000,100 L0,100 Z" fill="%234f46e5" opacity="0.1"/></svg>');
    background-size: cover;
}

/* Top Bar with Login/Register */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.top-bar.scrolled {
    padding: 10px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.logo-icon {
    color: var(--primary-light);
    font-size: 1.7rem;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.auth-button {
    padding: 8px 18px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
}

.login-button {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.register-button {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(79, 70, 229, 0.3);
}

.hero {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 140px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content - Compact */
section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--dark);
}

/* About Section - Compact */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.about-columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

@media (max-width: 992px) {
    .about-columns-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

.about-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.about-column:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-header {
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.about-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-header h2 i {
    color: var(--primary);
    font-size: 1.4rem;
}

.about-header p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    flex: 1;
}

.feature-card {
    padding: 25px 30px;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 190px;
    justify-content: center;
}

.feature-card:last-child {
    border-bottom: none;
}

.feature-card:hover {
    background-color: #f8fafc;
}

.feature-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 700;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Live Transactions - Compact */
.live-transactions {
    background-color: #f8fafc;
    position: relative;
}

/* Summary - Compact - REVISED LAYOUT */
.transactions-summary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 35px;
}

.summary-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* NEW: Single row summary layout */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.summary-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.summary-value {
    font-weight: 800;
    font-size: 1.5rem;
}

/* For mobile: 2 columns layout */
@media (max-width: 992px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Transactions table - Compact */
.transactions-list {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.transactions-header h3 {
    font-size: 1.3rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.last-updated {
    color: var(--gray);
    font-size: 0.85rem;
    text-align: right;
}

.transactions-table-container {
    overflow-x: auto;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.transactions-table th {
    text-align: center;
    padding: 16px 20px;
    background-color: #f8fafc;
    color: var(--gray);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--light-gray);
}

.transactions-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
    text-align: center;
}

.transactions-table tr:hover td {
    background-color: #f8fafc;
}

.transaction-id {
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.transaction-amount {
    font-weight: 700;
    color: var(--dark);
}

.transaction-status {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-awaiting-payment {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-awaiting-delivery {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.transaction-buyer, .transaction-seller {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.transaction-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
}

.avatar-buyer {
    background-color: var(--primary);
}

.avatar-seller {
    background-color: var(--secondary);
}

.transaction-time {
    color: var(--gray);
    font-size: 0.85rem;
}

/* How it Works - Compact */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.step {
    text-align: center;
    padding: 25px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.step:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.step p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Testimonials - Compact */
.testimonials {
    background-color: #f8fafc;
}

.testimonial-slider {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.testimonial {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    margin: 0 10px;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 4px solid var(--light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-text {
    font-size: 1rem;
    font-style: italic;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.testimonial-role {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Footer - Minimal */
footer {
    background-color: #0f172a;
    color: white;
    padding: 40px 0 30px;
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Responsive Design Improvements */
@media (max-width: 1200px) {
    .container {
        padding: 0 25px;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-header h2 {
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: 22px 25px;
        min-height: 170px;
    }
    
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .stats {
        gap: 25px;
    }
    
    .stat-item {
        min-width: 120px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .about-header {
        padding: 25px 25px 18px;
    }
    
    .about-header h2 {
        font-size: 1.4rem;
    }
    
    .about-header p {
        font-size: 0.95rem;
    }
    
    .feature-card {
        padding: 20px;
        min-height: 160px;
    }
    
    .feature-icon {
        font-size: 1.6rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .transactions-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .transaction-buyer, .transaction-seller {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .step {
        padding: 20px 15px;
    }
    
    .step-icon {
        font-size: 2rem;
    }
    
    .step h3 {
        font-size: 1.1rem;
    }
    
    .step p {
        font-size: 0.9rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* Auth buttons on mobile */
    .auth-buttons {
        gap: 8px;
    }
    
    .auth-button {
        padding: 7px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 15px);
        min-width: 110px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .about-header {
        padding: 20px 20px 15px;
    }
    
    .about-header h2 {
        font-size: 1.3rem;
    }
    
    .feature-card {
        padding: 18px;
        min-height: auto;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 12px 8px;
    }
    
    .transaction-status {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .step {
        padding: 18px 15px;
    }
    
    .step-icon {
        font-size: 1.8rem;
    }
    
    .step h3 {
        font-size: 1rem;
    }
    
    .testimonial {
        padding: 25px 18px;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
    
    /* Auth buttons on small mobile */
    .auth-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .auth-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .auth-button {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}

/* PHP-specific additional styles */
.update-notification {
    background: linear-gradient(135deg, var(--success), var(--primary));
    color: white;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin: 10px 0;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mygtukų stiliai formoms */
form {
    margin: 0;
}

form button {
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Formų išdėstymas */
form[style*="inline"] {
    display: inline-block;
}

/* Responsive lentelė papildymai */
@media (max-width: 768px) {
    .transactions-table th,
    .transactions-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .transaction-status {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .last-updated {
        text-align: left;
        font-size: 0.8rem;
    }
}

/* Paskutinio atnaujinimo informacija */
.last-updated small {
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
    opacity: 0.9;
}

/* Footer papildymai */
.copyright small {
    display: block;
    margin-top: 10px;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.auth-button:focus,
form button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Equalize columns function style */
.equalized {
    display: flex;
    flex-direction: column;
}

/* Print styles */
@media print {
    .top-bar,
    .auth-buttons,
    form button {
        display: none !important;
    }
    
    .transactions-table {
        min-width: auto;
    }
}


/* Transaction status badges */
.status-pending { 
    background: rgba(251, 191, 36, 0.1); 
    color: #d97706; 
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-approved { 
    background: rgba(16, 185, 129, 0.1); 
    color: #10b981; 
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-rejected { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-awaiting-moderator { 
    background: rgba(139, 92, 246, 0.1); 
    color: #8b5cf6; 
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Crypto badges */
.crypto-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.crypto-btc { background: rgba(247, 147, 26, 0.1); color: #f7931a; }
.crypto-eth { background: rgba(98, 126, 234, 0.1); color: #627eea; }
.crypto-sol { background: rgba(0, 255, 163, 0.1); color: #00ffa3; }
.crypto-xmr { background: rgba(255, 102, 0, 0.1); color: #f60; }

/* Form controls */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}


/* Dashboard Sections */
.dashboard-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

/* Recent Transactions Table */
.transactions-table-container {
    overflow-x: auto;
    margin-top: 15px;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.transactions-table th {
    background: #f8fafc;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 2px solid var(--light-gray);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transactions-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
}

.transactions-table tr:hover td {
    background: #f8fafc;
}

/* Status Badges - compact version */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-awaiting-payment { 
    background: rgba(59, 130, 246, 0.1); 
    color: #3b82f6; 
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-awaiting-delivery { 
    background: rgba(139, 92, 246, 0.1); 
    color: #8b5cf6; 
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.status-completed { 
    background: rgba(16, 185, 129, 0.1); 
    color: #10b981; 
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-cancelled { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pending { 
    background: rgba(251, 191, 36, 0.1); 
    color: #d97706; 
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-approved { 
    background: rgba(16, 185, 129, 0.1); 
    color: #10b981; 
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-rejected { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Crypto Badges - compact version */
.crypto-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    justify-content: center;
}

#about .about-section .section-title {
    text-align: center !important;
    margin-bottom: 40px;
    position: relative;
}

.crypto-btc { background: rgba(247, 147, 26, 0.1); color: #f7931a; }
.crypto-eth { background: rgba(98, 126, 234, 0.1); color: #627eea; }
.crypto-sol { background: rgba(0, 255, 163, 0.1); color: #00ffa3; }
.crypto-xmr { background: rgba(255, 102, 0, 0.1); color: #f60; }

/* Compact section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.section-title {
    font-size: 1.2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-actions .auth-button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Ensure all table cells are centered */
.transactions-table td,
.transactions-table th {
    text-align: center !important;
}

/* Make table responsive on mobile */
@media (max-width: 768px) {
    .transactions-table {
        font-size: 0.8rem;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 8px 6px;
    }
    
    .status-badge,
    .crypto-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}