/**
 * FindTeammate.app - Gaming UI Styles
 * Dark mode gaming aesthetic with vibrant accents
 */

/* ============================================================================
   GLOBAL & RESET
   ============================================================================ */

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

:root {
    /* Colors - Gaming Palette */
    --primary: #6C5CE7;      /* Purple */
    --primary-light: #A29BFE;
    --primary-dark: #5849C7;
    --secondary: #00D9FF;     /* Cyan */
    --secondary-light: #4DE6FF;
    --success: #00E676;       /* Green */
    --warning: #FFD93D;       /* Yellow */
    --danger: #FF6B6B;        /* Red */
    --info: #00D9FF;

    /* Backgrounds */
    --bg-main: #0F0F1E;       /* Very dark blue */
    --bg-card: #1A1A2E;       /* Dark blue */
    --bg-hover: #25254A;      /* Lighter blue */
    --bg-input: #16162A;      /* Input background */

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0C0;
    --text-muted: #6E6E8E;

    /* Borders */
    --border-color: #2A2A4E;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.4);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Fonts */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-gaming: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Monaco', 'Courier New', monospace;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, #0F0F1E 0%, #1A1A2E 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Gaming typography for headers and key elements */
h1, h2, h3, h4, h5, h6,
.card-title,
.btn-primary,
.btn-secondary {
    font-family: var(--font-gaming);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 1rem 0;
    /* GPU acceleration for smooth scroll */
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0 !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-gaming);
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.logo-text {
    color: var(--text-primary);
}

.logo-ext {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-left: auto;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary);
}

.audio-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.audio-toggle:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
    color: var(--primary);
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

.left-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 30px rgba(108, 92, 231, 0.2);
    transform: translateY(-4px);
    border-color: rgba(108, 92, 231, 0.3);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label,
.form-group .form-label-text {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Labels con inputs directos - usar inline-flex para badges */
.form-group label[for],
.form-group .form-label-text {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-single {
    margin-bottom: var(--spacing-sm);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.6);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #FF5252;
    transform: translateY(-2px);
}

.btn-lg {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ============================================================================
   ACTIVE REQUEST SECTION
   ============================================================================ */

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.countdown {
    background: var(--bg-input);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--success);
    transition: all 0.3s;
}

.countdown-warning {
    border-color: var(--warning);
}

.countdown-danger {
    border-color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.countdown-time {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.match-info {
    background: var(--bg-input);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
}

.match-info-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.match-info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================================================
   MATCHES LIST
   ============================================================================ */

.matches-found {
    margin-bottom: var(--spacing-lg);
}

.matches-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
}

.matches-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding-right: 4px; /* Space for hover movement */
}

.match-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    will-change: transform; /* GPU acceleration for smoother animation */
}

.match-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px) scale(1.01); /* Lift up instead of slide right */
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

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

.match-trust {
    color: var(--warning);
    font-weight: 600;
}

.match-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.match-badge {
    background: var(--primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.match-note {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
}

.match-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.no-matches {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.no-matches-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--spacing-md);
}

.no-matches-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

/* ============================================================================
   ACTION BUTTONS
   ============================================================================ */

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* ============================================================================
   CHAT / ACTIVITY FEED
   ============================================================================ */

.chat-card {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

.system-message {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary);
}

.system-icon {
    font-size: 1.2rem;
}

.system-message p {
    flex: 1;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Activity Feed Header (for collapsible mobile behavior) */
.activity-feed-header {
    display: none; /* Hidden by default, shown only on mobile */
}

/* Activity Feed Overlay (hidden on desktop) */
.activity-feed-overlay {
    display: none;
}

.activity-feed-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.feed-icon {
    font-size: 1.2rem;
}

.minimize-btn {
    background: rgba(0,0,0,0.2);
    border: none;
    color: var(--secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    width: 44px; /* Minimum touch target size for iOS */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: rgba(255,255,255,0.3);
    touch-action: manipulation;
    border-radius: 8px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.minimize-btn:hover {
    color: var(--primary);
}

.minimize-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.activity-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.activity-notification.hidden {
    display: none;
}

/* ============================================================================
   INFO CARDS
   ============================================================================ */

.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--text-secondary);
}

.info-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ============================================================================
   GAMES SHOWCASE
   ============================================================================ */

.games-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.game-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.game-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.game-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 1.2rem;
}

.game-info {
    flex: 1;
}

.game-name {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.game-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: rgba(5, 5, 9, 0.9);
    border-top: 1px solid rgba(108, 92, 231, 0.25);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer .container {
    display: block;
    padding: 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-gaming);
    color: var(--text-primary);
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-heading {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-gaming);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(108, 92, 231, 0.25);
    padding-top: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-lg);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.footer-note {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: var(--spacing-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

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

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .games-list {
        grid-template-columns: 1fr;
    }
}

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 0.75rem 0;
    }

    .nav-container {
        padding: 0 var(--spacing-md);
    }

    .nav-links {
        gap: var(--spacing-md);
        flex-wrap: wrap;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .card {
        padding: var(--spacing-md);
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .stepper {
        margin-top: 65px;
        padding: var(--spacing-md);
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Activity Feed Overlay (closes panel when tapped) */
    .activity-feed-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        -webkit-tap-highlight-color: transparent;
    }

    .activity-feed-overlay.visible {
        display: block;
    }

    /* Activity Feed Collapsible on Mobile */
    .activity-feed-panel {
        position: fixed;
        right: 0;
        left: 0;
        width: 100%;
        height: 60vh;
        max-height: 60vh;
        z-index: 999;
        margin: 0;
        border-radius: 16px 16px 0 0;
        bottom: calc(-60vh + 60px); /* Only header visible (60px) */
        transition: bottom 0.3s ease-out;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
        /* Prevent iOS gestures from interfering with touch events */
        touch-action: manipulation;
        -webkit-overflow-scrolling: touch;
    }

    .activity-feed-panel.expanded {
        bottom: 0; /* Full panel visible */
    }

    /* Rotate icon when expanded */
    .activity-feed-panel.expanded .minimize-icon {
        transform: rotate(180deg);
    }

    .activity-feed-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--spacing-md);
        background: var(--primary);
        border-radius: 16px 16px 0 0;
        position: relative;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        /* Ensure header is interactive and has proper tap area */
        min-height: 56px;
        z-index: 2;
        pointer-events: auto;
    }

    .activity-feed-panel .card-title {
        display: none; /* Hide original title on mobile */
    }

    .activity-feed-panel .chat-messages {
        height: calc(100% - 60px);
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 0.5rem var(--spacing-sm);
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .audio-toggle {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 26px;
        height: 26px;
    }

    .stepper {
        margin-top: 60px;
        padding: var(--spacing-sm);
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

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

.card {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================================================
   STEPPER
   ============================================================================ */

.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: 100px auto var(--spacing-xl);  /* Account for fixed nav */
    max-width: 1200px;
    padding: var(--spacing-lg) var(--spacing-lg);
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    opacity: 0.5;
    transition: all 0.3s;
}

.stepper-step.active {
    opacity: 1;
}

.stepper-step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.stepper-step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.stepper-step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.stepper-step.completed .step-number::before {
    content: "✓";
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stepper-step.active .step-label {
    color: var(--primary-light);
}

.stepper-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 var(--spacing-sm);
}

/* ============================================================================
   TOOLTIPS
   ============================================================================ */

.tooltip-trigger {
    cursor: help;
    display: inline-block;
    margin-left: var(--spacing-xs);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.tooltip-trigger:hover {
    opacity: 1;
}

.tooltip-popup {
    position: fixed;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    max-width: 250px;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.required-badge,
.optional-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.7;
}

.required-badge {
    background: rgba(255, 107, 107, 0.15);
    color: #FF8A8A;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.optional-badge {
    background: rgba(0, 217, 255, 0.1);
    color: #4DE6FF;
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    font-style: italic;
}

/* ============================================================================
   PLAYSTYLE GRID
   ============================================================================ */

.playstyle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.playstyle-option {
    cursor: pointer;
}

.playstyle-option input[type="radio"] {
    display: none;
}

.playstyle-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    text-align: center;
    transition: all 0.3s;
}

.playstyle-option:hover .playstyle-card {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.playstyle-option input[type="radio"]:checked + .playstyle-card {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.playstyle-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.playstyle-name {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.playstyle-desc {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ============================================================================
   PULSE ANIMATION
   ============================================================================ */

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    margin-right: var(--spacing-xs);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ============================================================================
   LIVE INDICATOR
   ============================================================================ */

.live-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--bg-input);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================================================
   MATCH COUNT BADGE
   ============================================================================ */

.match-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-right: var(--spacing-sm);
    padding: 0 var(--spacing-sm);
}

/* ============================================================================
   SUGGESTIONS PANEL
   ============================================================================ */

.suggestions-panel {
    background: var(--bg-input);
    border: 2px solid var(--warning);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.suggestions-panel h4 {
    color: var(--warning);
    margin-bottom: var(--spacing-sm);
}

.suggestions-list {
    list-style: none;
    padding-left: 0;
}

.suggestions-list li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
}

/* ============================================================================
   COUNTDOWN ENHANCED
   ============================================================================ */

.countdown-large {
    text-align: center;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.search-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
}

/* ============================================================================
   MATCHING LOGIC PANEL
   ============================================================================ */

.matching-logic {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.logic-section h4 {
    color: var(--primary-light);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.logic-list {
    list-style: none;
    padding-left: 0;
}

.logic-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
}

.logic-icon {
    font-size: 1.2rem;
    min-width: 24px;
}

.logic-example {
    background: var(--bg-input);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary);
    font-style: italic;
    color: var(--text-secondary);
}

/* ============================================================================
   STATUS DOT
   ============================================================================ */

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--spacing-xs);
}

.status-dot.status-connected {
    background: var(--success);
}

.status-dot.status-disconnected {
    background: var(--danger);
}

.status-dot.status-connecting {
    background: var(--warning);
    animation: pulse-glow 1s infinite;
}

.footer-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: 0.85rem;
}

/* ============================================================================
   ENHANCED MATCH CARDS
   ============================================================================ */

.match-username-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.compatibility-badge {
    background: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.compatibility-reasons {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
}

.match-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.btn-connect,
.btn-copy {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.btn-connect {
    background: var(--primary);
    color: white;
}

.btn-connect:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-copy {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-copy:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
}

.no-discord {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: var(--spacing-sm);
}

/* ============================================================================
   MATCH INFO GRID
   ============================================================================ */

.match-info-card {
    background: var(--bg-input);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.match-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.match-info-grid .info-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.info-item-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================================
   MATCHES HEADER
   ============================================================================ */

.matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

/* ============================================================================
   GAME SELECTOR - VISUAL CARDS (Like Playstyle)
   ============================================================================ */

.game-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.game-selector-option {
    cursor: pointer;
    display: block;
}

.game-selector-option input[type="radio"] {
    display: none;
}

.game-selector-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-selector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-selector-option:hover .game-selector-card::before {
    left: 100%;
}

.game-selector-option:hover .game-selector-card {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.game-selector-option input[type="radio"]:checked + .game-selector-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.5);
    transform: scale(1.02);
}

.game-selector-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Game icon image styles */
.game-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.game-selector-icon .game-icon-img {
    width: 64px;
    height: 64px;
}

.game-icon .game-icon-img {
    width: 40px;
    height: 40px;
}

.game-icon-emoji {
    font-size: 3rem;
}

.game-selector-option input[type="radio"]:checked + .game-selector-card .game-selector-icon {
    animation: gameIconPulse 0.6s ease;
}

@keyframes gameIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.game-selector-name {
    font-family: var(--font-gaming);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.game-selector-players {
    font-size: 0.85rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.game-selector-option input[type="radio"]:checked + .game-selector-card .game-selector-players {
    opacity: 1;
    font-weight: 600;
}

/* ============================================================================
   ENHANCED DROPDOWNS (Rank, Region)
   ============================================================================ */

.form-group select {
    /* Solid fallback for Chrome */
    background-color: var(--bg-input);
    /* Gradient overlay */
    background-image:
        linear-gradient(135deg, var(--bg-input) 0%, rgba(26, 26, 46, 0.9) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236C5CE7' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center, right 16px center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-md);
    padding-right: 40px;
    color: var(--text-primary);
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Remove default appearance */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
    transform: translateY(-1px);
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.4);
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: var(--spacing-sm);
}

/* ============================================================================
   BUTTON RIPPLE EFFECT
   ============================================================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============================================================================
   ENHANCED INPUT FIELDS
   ============================================================================ */

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    background: linear-gradient(135deg, var(--bg-input) 0%, rgba(26, 26, 46, 0.9) 100%);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-group input[type="text"]:hover,
.form-group input[type="email"]:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: rgba(108, 92, 231, 0.5);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.footer-heading {
    text-transform: none;
}
