/* ===========================================
   Component Styles (Header, Footer, Cards, etc.)
   =========================================== */

/* ===========================================
   Header
   =========================================== */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.header-logo-row {
    text-align: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.main-title-large {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: var(--primary-green);
    text-decoration: none;
    letter-spacing: -1px;
}

.main-title-large:hover {
    color: var(--primary-green-dark);
}

/* Navigation - PC: horizontal bar below logo */
.header-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 50px;
}

.main-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary-green);
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.main-title:hover {
    color: var(--primary-green-dark);
}

.header-nav .nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.header-nav .nav-link:hover {
    color: var(--primary-green);
    background: rgba(40, 167, 69, 0.08);
}

.header-nav .dropdown-menu {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
}

.header-nav .dropdown-item {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.header-nav .dropdown-item:hover {
    background: rgba(40, 167, 69, 0.08);
    color: var(--primary-green);
}

.btn-sponsor {
    background: linear-gradient(135deg, #ffd93d 0%, #ffc107 50%, #e0a800 100%);
    color: #1a1a1a;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    margin-left: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-sponsor::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-sponsor:hover {
    background: linear-gradient(135deg, #ffe066 0%, #ffd93d 50%, #ffc107 100%);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-sponsor:hover::before {
    left: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

/* ===========================================
   Footer
   =========================================== */
.site-footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 32px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-text {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

/* ===========================================
   Cards
   =========================================== */
.card-modern {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
}

.card-header-modern {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title-modern {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.card-body-modern {
    padding: 20px;
}

/* ===========================================
   Buttons
   =========================================== */

/* Base button styles */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-accent,
.btn-warning,
.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Shine effect on hover */
.btn-primary::before,
.btn-accent::before,
.btn-warning::before,
.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn-accent:hover::before,
.btn-warning:hover::before,
.search-btn:hover::before {
    left: 100%;
}

/* Primary Button - Green gradient */
.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #34d058 0%, #28a745 50%, #22863a 100%);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3cdf63 0%, #2ebd4f 50%, #28a745 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Secondary Button */
.btn-secondary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Outline Button */
.btn-outline {
    padding: 11px 20px;
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
}

.btn-outline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #34d058 0%, #28a745 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-outline:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-outline:hover::after {
    opacity: 1;
}

/* Accent Button - Yellow/Gold gradient */
.btn-accent {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ffd93d 0%, #ffc107 50%, #e0a800 100%);
    color: #1a1a1a;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #ffe066 0%, #ffd93d 50%, #ffc107 100%);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-accent:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Warning Button - Orange gradient */
.btn-warning {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ffb347 0%, #ff9500 50%, #e08600 100%);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffc570 0%, #ffb347 50%, #ff9500 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 149, 0, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Danger Button - Red gradient */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ef4444 50%, #dc2626 100%);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff8585 0%, #ff6b6b 50%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Button sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* Icon button */
.btn-icon {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
}

/* Disabled state */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-accent:disabled,
.btn-warning:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary:disabled::before,
.btn-accent:disabled::before,
.btn-warning:disabled::before {
    display: none;
}

/* ===========================================
   Tabs
   =========================================== */
.game-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-item {
    flex: 1;
    min-width: fit-content;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    white-space: nowrap;
    border: none;
    background: transparent;
    position: relative;
}

.tab-item:hover {
    color: var(--primary-green);
    background: rgba(40, 167, 69, 0.1);
}

.tab-item.active {
    background: linear-gradient(135deg, #34d058 0%, #28a745 50%, #22863a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.tab-item.active:hover {
    background: linear-gradient(135deg, #3cdf63 0%, #2ebd4f 50%, #28a745 100%);
}

/* ===========================================
   Badges
   =========================================== */
.player-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-influencer {
    background: #fee2e2;
    color: #dc2626;
}

.badge-progamer {
    background: #fef3c7;
    color: #d97706;
}

.badge-inven {
    background: #dbeafe;
    color: #2563eb;
}

.badge-firstten {
    background: linear-gradient(135deg, #374151, #6b7280);
    color: #e5e7eb;
}

/* ===========================================
   Grids
   =========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-column .card-modern:first-child {
    flex: 1;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* ===========================================
   Match List
   =========================================== */
.match-header {
    display: grid;
    grid-template-columns: 1fr 0.7fr 2fr 1fr 0.8fr;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-row {
    display: grid;
    grid-template-columns: 1fr 0.7fr 2fr 1fr 0.8fr;
    gap: 8px;
    align-items: center;
    padding: 20px 16px;
    border-radius: var(--radius-md);
    color: white;
    text-align: center;
    transition: transform 0.2s ease;
}

.match-row:hover {
    transform: translateX(4px);
}

.match-row.win {
    background: linear-gradient(135deg, var(--win-bg) 0%, #2a4a7c 100%);
    border-left: 4px solid var(--win-blue);
}

.match-row.draw {
    background: linear-gradient(135deg, var(--draw-bg) 0%, #92750c 100%);
    border-left: 4px solid var(--draw-yellow);
}

.match-row.lose {
    background: linear-gradient(135deg, var(--lose-bg) 0%, #991b1b 100%);
    border-left: 4px solid var(--lose-red);
}

.match-date {
    font-size: 0.85rem;
    opacity: 0.9;
}

.match-result {
    font-weight: 700;
    font-size: 1.1rem;
}

.match-players {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.match-player {
    font-weight: 600;
    font-size: 0.95rem;
}

.match-vs {
    font-size: 0.75rem;
    opacity: 0.7;
}

.match-score {
    font-size: 1.25rem;
    font-weight: 700;
}

.match-controller {
    font-size: 1.2rem;
}

/* ===========================================
   Mobile Navigation Responsive
   =========================================== */
@media (max-width: 992px) {
    .main-title-large {
        font-size: 2.5rem;
    }

    .header-logo-row {
        padding: 20px 20px 12px;
        border-bottom: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        gap: 4px;
        box-shadow: var(--shadow-md);
        z-index: 100;
        height: auto;
        max-width: none;
    }

    .header-nav.active {
        display: flex;
    }

    .header-nav .nav-link {
        width: 100%;
        padding: 12px 16px;
    }

    .btn-sponsor {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        padding: 12px 16px;
    }

    .header-nav .dropdown {
        width: 100%;
    }

    .header-nav .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
    }

    .stats-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-title-large {
        font-size: 2rem;
    }

    .header-logo-row {
        padding: 16px 20px 10px;
    }
}

@media (max-width: 768px) {
    .game-mode-tabs {
        flex-wrap: nowrap;
        justify-content: stretch;
        overflow-x: visible;
        gap: 4px;
    }

    .tab-item {
        flex: 1 1 0;
        padding: 10px 8px;
        font-size: 0.8rem;
        min-width: 0;
    }

    .match-header {
        display: none;
    }

    .match-row {
        display: grid;
        grid-template-areas:
            "result score"
            "players players"
            "date controller";
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 14px;
        text-align: center;
    }

    .match-result {
        grid-area: result;
        font-size: 1.2rem;
        text-align: left;
    }

    .match-score {
        grid-area: score;
        font-size: 1.3rem;
        text-align: right;
    }

    .match-players {
        grid-area: players;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
        border-top: 1px solid rgba(255,255,255,0.15);
        border-bottom: 1px solid rgba(255,255,255,0.15);
        margin: 4px 0;
    }

    .match-player {
        font-size: 0.85rem;
    }

    .match-vs {
        font-size: 0.75rem;
        opacity: 0.6;
    }

    .match-date {
        grid-area: date;
        font-size: 0.75rem;
        text-align: left;
        opacity: 0.8;
    }

    .match-controller {
        grid-area: controller;
        font-size: 1rem;
        text-align: right;
    }
}
