/* ========================================
   SwishFilm — Electric Court
   Gen Z sports tech. Nike meets YouTube.
   ======================================== */

:root {
    --bg-primary: #050505;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-elevated: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.03);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #5a5a5a;

    --accent: #FF3D00;
    --accent-glow: rgba(255, 61, 0, 0.35);
    --accent-hover: #FF5722;
    --accent-dim: rgba(255, 61, 0, 0.08);

    --cyan: #00E5FF;
    --cyan-glow: rgba(0, 229, 255, 0.25);
    --cyan-dim: rgba(0, 229, 255, 0.08);

    --success: #00E676;
    --warning: #FFAB00;

    --border: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.06);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    /* Shorthand aliases */
    --card: var(--bg-card);
    --surface: var(--bg-elevated);
    --surface-raised: var(--bg-hover);
    --text: var(--text-primary);
    --primary: var(--accent);
    --overlay: rgba(0, 0, 0, 0.6);

    --nav-height: 72px;
    --top-bar-height: 56px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-card: rgba(0, 0, 0, 0.04);
    --bg-elevated: rgba(0, 0, 0, 0.05);
    --bg-input: rgba(0, 0, 0, 0.06);
    --bg-hover: rgba(0, 0, 0, 0.08);
    --bg-glass: rgba(0, 0, 0, 0.03);

    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #999999;

    --accent: #E53500;
    --accent-glow: rgba(229, 53, 0, 0.2);
    --accent-hover: #D32F2F;
    --accent-dim: rgba(229, 53, 0, 0.08);

    --cyan: #0097A7;
    --cyan-glow: rgba(0, 151, 167, 0.15);
    --cyan-dim: rgba(0, 151, 167, 0.08);

    --success: #2E7D32;
    --warning: #F57F17;

    --border: rgba(0, 0, 0, 0.1);
    --border-glass: rgba(0, 0, 0, 0.06);

    --card: var(--bg-card);
    --surface: var(--bg-elevated);
    --surface-raised: var(--bg-hover);
    --text: var(--text-primary);
    --primary: var(--accent);
    --overlay: rgba(0, 0, 0, 0.3);
}

/* Light-mode body overrides */
[data-theme="light"] body {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
[data-theme="light"] .landing-screen {
    background: radial-gradient(ellipse at 50% 40%, rgba(229,53,0,0.06) 0%, transparent 60%);
}
[data-theme="light"] .landing-glow {
    opacity: 0.15;
}
[data-theme="light"] .bottom-nav {
    background: rgba(245, 245, 245, 0.85);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .top-bar {
    background: rgba(245, 245, 245, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .modal-content {
    background: #ffffff;
}
[data-theme="light"] .search-overlay {
    background: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .search-panel {
    background: #ffffff;
}

/* Theme toggle button */
.theme-toggle-btn {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: background var(--transition);
}
.theme-toggle-btn:hover { background: var(--bg-hover); }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* subtle noise texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
    background-size: 200px;
}

/* ===== APP SHELL ===== */
#app {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.view {
    position: absolute;
    inset: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
    scrollbar-width: thin;
}

.view.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.view.slide-out {
    opacity: 0;
    transform: translateX(-30px);
}

/* ===== LANDING / PIN GATE ===== */
.landing-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

.landing-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 61, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    z-index: 1;
}

.landing-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.landing-icon {
    width: 72px;
    height: 72px;
    background: var(--accent);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 50px var(--accent-glow), 0 0 100px rgba(255, 61, 0, 0.1);
    margin-bottom: 8px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.landing-title {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 52px;
    font-weight: 400;
    letter-spacing: 6px;
    color: var(--text-primary);
    line-height: 1;
}

.landing-tagline {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--text-muted);
}

.pin-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 280px;
}

.pin-label {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--text-secondary);
}

.pin-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pin-digit {
    width: 44px;
    height: 56px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 26px;
    text-align: center;
    caret-color: var(--accent);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.pin-digit::-webkit-inner-spin-button,
.pin-digit::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-digit:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px var(--accent-glow);
}

.pin-digit.filled {
    border-color: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.pin-digit.error {
    border-color: #ff4466;
    box-shadow: 0 0 12px rgba(255, 68, 102, 0.3);
    animation: pinShake 0.5s ease;
}

@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.pin-error {
    font-size: 13px;
    color: #ff4466;
    min-height: 20px;
    font-weight: 500;
}

.pin-hint {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* Hide nav + padding on landing */
#view-landing {
    padding-bottom: 0;
}

#view-landing.active ~ .bottom-nav,
body.landing-active .bottom-nav {
    transform: translateY(100%);
    opacity: 0;
}

/* ===== TOP BAR ===== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--safe-top) + 12px) 16px 12px;
    background: linear-gradient(to bottom, var(--bg-primary) 60%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 20px var(--accent-glow);
}

.brand-name {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.brand-accent {
    color: var(--accent);
}

.view-title {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:active {
    transform: scale(0.9);
    background: var(--bg-hover);
}

/* ===== FEED FILTERS ===== */
.feed-filters {
    display: flex;
    gap: 8px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.feed-filters::-webkit-scrollbar { display: none; }

.filter-chip {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-chip.active {
    background: rgba(0, 229, 255, 0.12);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 4px 15px var(--cyan-glow);
}

.filter-chip:active {
    transform: scale(0.95);
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    margin-bottom: 12px;
    justify-content: flex-end;
}

.view-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition);
}

.view-toggle-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.view-toggle-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ===== GAME CARDS ===== */
.feed-content {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== LIST VIEW ===== */
.feed-content.view-list .game-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.feed-content.view-list .game-card-thumb {
    width: 80px;
    height: 60px;
    min-height: unset;
    aspect-ratio: unset;
    border-radius: var(--radius) 0 0 var(--radius);
}

.feed-content.view-list .game-card-thumb .thumb-placeholder {
    font-size: 20px !important;
}

.feed-content.view-list .game-card-thumb .thumb-placeholder span {
    font-size: 36px !important;
}

.feed-content.view-list .play-overlay {
    display: none;
}

.feed-content.view-list .game-card-status {
    font-size: 9px;
    padding: 2px 5px;
    top: 4px;
    right: 4px;
}

.feed-content.view-list .game-card-body {
    flex: 1;
    padding: 10px 14px;
}

.feed-content.view-list .game-card-title {
    font-size: 13px;
}

.feed-content.view-list .game-card-subtitle {
    font-size: 11px;
}

.feed-content.view-list .game-card-score {
    font-size: 13px;
    margin-top: 2px;
}

.game-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    animation: cardIn 0.4s ease backwards;
}

.game-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-card:active {
    transform: scale(0.98);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.game-card:nth-child(1) { animation-delay: 0s; }
.game-card:nth-child(2) { animation-delay: 0.05s; }
.game-card:nth-child(3) { animation-delay: 0.1s; }
.game-card:nth-child(4) { animation-delay: 0.15s; }
.game-card:nth-child(5) { animation-delay: 0.2s; }

.game-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-elevated);
    position: relative;
    overflow: hidden;
}

.game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity var(--transition);
}

.game-card:hover .play-overlay,
.game-card:active .play-overlay {
    opacity: 1;
}

.play-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--accent-glow);
    transition: transform var(--spring);
}

.game-card:active .play-circle {
    transform: scale(1.1);
}

.play-circle svg {
    margin-left: 3px;
    color: #fff;
}

.game-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
}

.status-uploaded {
    background: var(--warning);
    color: #000;
}

.status-ready {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 12px var(--cyan-glow);
}

.status-processing {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.game-card-body {
    padding: 14px 16px;
}

.game-card-title {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
    line-height: 1.2;
}

.game-card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.game-card-subtitle .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 32px;
    gap: 8px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 24px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== VIDEO PLAYER VIEW ===== */
.player-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.player-top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(var(--safe-top) + 12px) 16px 12px;
    background: var(--bg-primary);
}

.player-game-info {
    flex: 1;
    min-width: 0;
}

.player-game-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-game-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.video-wrapper {
    width: 100%;
    background: #000;
    position: relative;
}

.video-wrapper video {
    width: 100%;
    display: block;
    max-height: 50vh;
    object-fit: contain;
    background: #000;
}

.player-details {
    padding: 16px;
    flex: 1;
}

.game-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.meta-label {
    font-size: 10px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
}

.meta-value {
    font-size: 14px;
    font-weight: 700;
}

.meta-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
}

.status-badge {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.game-notes {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.game-notes:empty {
    display: none;
}

/* ===== UPLOAD VIEW ===== */
.upload-mode-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    padding-top: 8px;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: inherit;
}

.mode-card:active {
    transform: scale(0.97);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.mode-icon {
    font-size: 36px;
}

.mode-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
}

.mode-desc {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}

.field select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23a0a0a0'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.field select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

.field select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.upload-form {
    padding: 16px;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 32px);
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
    overflow: hidden;
}

.drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 30px var(--accent-glow);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 8px;
    color: var(--text-secondary);
}

.drop-icon {
    color: var(--accent);
    margin-bottom: 4px;
}

.drop-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.drop-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.drop-zone-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.preview-file-icon {
    font-size: 28px;
}

.preview-filename {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-size {
    font-size: 12px;
    color: var(--text-muted);
}

.preview-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.field label {
    display: block;
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.field .optional {
    color: var(--text-muted);
    text-transform: none;
    font-weight: 400;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    -webkit-appearance: none;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
}

.field textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-upload {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* Upload Progress */
.upload-progress {
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 100px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px var(--accent-glow);
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-top: 1px solid rgba(255,255,255,0.04);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color var(--transition);
    position: relative;
}

.nav-item.active {
    color: var(--text-primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-glow);
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-upload-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow), 0 0 40px rgba(255, 61, 0, 0.15);
    transition: transform var(--spring), box-shadow var(--transition);
    margin-top: -12px;
}

.nav-item:hover .nav-upload-btn {
    box-shadow: 0 4px 32px var(--accent-glow), 0 0 60px rgba(255, 61, 0, 0.2);
}

.nav-item:active .nav-upload-btn {
    transform: scale(0.9);
}

/* ===== HIDE NAV ON PLAYER VIEW ===== */
body.player-active .bottom-nav {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

body:not(.player-active) .bottom-nav {
    transition: transform 0.3s ease;
}

/* ===== SCROLLBAR ===== */
.view::-webkit-scrollbar {
    width: 8px;
}
.view::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.view::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}
.view::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
@media (max-width: 639px) {
    .view::-webkit-scrollbar { width: 0; }
}

/* ===== RESPONSIVE — TABLET & DESKTOP ===== */
@media (min-width: 640px) {
    .feed-content:not(.view-list) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .empty-state {
        grid-column: 1 / -1;
    }

    .upload-form {
        max-width: 520px;
        margin: 0 auto;
    }

    .player-container {
        max-width: 900px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .feed-content:not(.view-list) {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }

    .feed-content.view-list {
        max-width: 700px;
        margin: 0 auto;
    }
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--text-primary);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.toast.error {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== MEDIA TABS (Player View) ===== */
.media-list {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.media-list::-webkit-scrollbar {
    display: none;
}

.media-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.media-tab.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== PHOTO GALLERY ===== */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius);
}

.gallery-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-photo:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* ===== MEDIA GALLERY (Card/List for game media) ===== */
.media-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
}
.media-gallery-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.media-gallery-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 12px 8px;
}
.media-gallery-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px 8px;
}
.mg-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}
.mg-card:active { transform: scale(0.97); }
.mg-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.mg-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.mg-card-thumb-video {
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.mg-card-info {
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mg-card-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mg-card-hype {
    font-size: 0.65rem;
    color: var(--accent);
    flex-shrink: 0;
}
.mg-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.mg-list-item:active { transform: scale(0.99); }
.mg-list-item.active {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.mg-list-icon { font-size: 1rem; }
.mg-list-label {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mg-list-hype {
    font-size: 0.7rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* ===== SPOT PLAYERS ===== */
.spot-players-section {
    padding: 8px 12px;
}
.btn-spot-players {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    transition: color 0.2s, border-color 0.2s;
}
.btn-spot-players:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-spot-players.loading {
    opacity: 0.6;
    pointer-events: none;
}
.spotted-players {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.spotted-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--text-primary);
}
.spotted-chip .chip-number {
    font-weight: 700;
    color: var(--accent);
}
.spotted-chip.confidence-low {
    opacity: 0.6;
    border-style: dashed;
}

/* ===== ROSTER GRID ===== */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    padding-top: 72px;
    padding-bottom: 100px;
}

/* ===== ROSTER LIST VIEW ===== */
.roster-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    padding-top: 72px;
    padding-bottom: 100px;
}
.roster-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.roster-list-item:active {
    background: var(--bg-hover);
    transform: scale(0.99);
}
.roster-list-item.player-inactive {
    opacity: 0.45;
}
.roster-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}
.roster-list-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: var(--accent);
    flex-shrink: 0;
}
.roster-list-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.roster-list-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.roster-list-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.roster-list-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
}
.roster-list-status {
    font-size: 1rem;
    flex-shrink: 0;
}

.view-toggle {
    opacity: 0.7;
}
.view-toggle:hover {
    opacity: 1;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.player-card:active {
    transform: scale(0.97);
    background: var(--bg-hover);
}

.player-card.player-inactive {
    opacity: 0.45;
}

.player-number {
    position: absolute;
    top: 8px;
    right: 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.player-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.player-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.player-info {
    display: flex;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.player-pos {
    background: var(--cyan-dim);
    color: var(--cyan);
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.7rem;
}

.player-grade {
    color: var(--text-muted);
}

.player-inactive-badge {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 2px;
}

/* ===== MODALS (bottom sheet style) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-sheet {
    background: var(--bg-primary);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 20px 20px 32px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-half {
    flex: 1;
}

/* ===== GAME CARD SCORES ===== */
.game-card-score {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
}

.game-card-score.result-win { color: var(--success); }
.game-card-score.result-loss { color: var(--accent); }
.game-card-score.result-tie { color: var(--warning); }

.score-divider {
    color: var(--text-muted);
    font-size: 1rem;
}

.result-badge {
    font-size: 0.75rem;
    padding: 1px 8px;
    border-radius: 100px;
    background: currentColor;
    color: #000;
    font-weight: 700;
    margin-left: 4px;
}

.result-win .result-badge { background: var(--success); }
.result-loss .result-badge { background: var(--accent); }
.result-tie .result-badge { background: var(--warning); }

.game-card-score.no-score {
    cursor: pointer;
}

.add-score-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.game-card-score.no-score:hover .add-score-label,
.game-card-score.no-score:active .add-score-label {
    color: var(--cyan);
    border-color: var(--cyan);
}

/* ===== PLAYER STATUS BADGE (on roster cards) ===== */
.player-status-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--accent-dim);
    color: var(--accent);
    margin-top: 2px;
    white-space: nowrap;
}

/* ===== PLAYER PROFILE VIEW ===== */
.pp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px 20px;
    gap: 8px;
}

.pp-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    line-height: 1;
}

.pp-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.pp-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.btn-photo-upload {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 6px;
    transition: color 0.2s, border-color 0.2s;
}
.btn-photo-upload:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.pp-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    margin: 0;
}

.pp-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pp-pos {
    background: var(--cyan-dim);
    color: var(--cyan);
    padding: 2px 10px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
}

.pp-grade {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Vibe Check */
.pp-status-section {
    margin: 16px 20px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.pp-status-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    margin-bottom: 10px;
}

.pp-status-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.pp-status-current:active {
    transform: scale(0.96);
    background: var(--bg-hover);
}

.pp-status-emoji {
    font-size: 1.4rem;
}

.pp-status-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ===== TEAM STATS ===== */
.stats-content {
    padding: 20px 16px;
    padding-bottom: 100px;
}
.stats-loading, .stats-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.stats-hero {
    text-align: center;
    padding: 32px 0 24px;
}
.stats-record {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--text-primary);
    line-height: 1;
}
.stats-win-pct {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-top: 6px;
}
.stats-streak {
    font-size: 1rem;
    margin-top: 8px;
    color: var(--text-secondary);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.stats-tile {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    border: 1px solid var(--border);
}
.stats-tile-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}
.stats-tile-value.stat-positive { color: #22c55e; }
.stats-tile-value.stat-negative { color: #ef4444; }
.stats-tile-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
}
.stats-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.stats-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.stats-form-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.form-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
}
.form-dot.form-w {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 2px solid #22c55e;
}
.form-dot.form-l {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 2px solid #ef4444;
}
.stats-highlight {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Player Photos Section */
.pp-photos-section {
    padding: 16px 20px;
}
.pp-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.pp-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.pp-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.pp-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pp-photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #ff4444;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.pp-photo-item:hover .pp-photo-delete {
    opacity: 1;
}
.pp-photo-add {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px dashed var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: border-color 0.2s, color 0.2s;
}
.pp-photo-add:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pp-photo-add span {
    font-size: 1.5rem;
}
.pp-photo-add small {
    font-size: 0.65rem;
}

/* Player Stats Row */
.pp-stats-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px 20px;
}

.pp-stat {
    text-align: center;
}

.pp-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--cyan);
    line-height: 1;
}

.pp-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* ===== STATUS PICKER MODAL ===== */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.status-option:active {
    transform: scale(0.96);
    background: var(--accent-dim);
    border-color: var(--accent);
}

.status-option span {
    font-size: 1.2rem;
}

/* ===== REACTION BAR ===== */
.reaction-bar {
    margin: 16px 0;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.reaction-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-align: center;
    margin-bottom: 10px;
}

.reaction-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 50px;
}

.reaction-btn:active {
    transform: scale(1.15);
    background: var(--accent-dim);
    border-color: var(--accent);
}

.reaction-pop {
    animation: reactionBounce 0.4s ease;
}

@keyframes reactionBounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.35); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.reaction-emoji {
    font-size: 1.3rem;
}

.reaction-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Hype Meter */
.hype-meter {
    position: relative;
    height: 22px;
    background: var(--bg-input);
    border-radius: 100px;
    margin-top: 10px;
    overflow: hidden;
}

.hype-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 100px;
    transition: width 0.5s ease;
}

.hype-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* ===== TEAM PROFILE ===== */
.team-profile {
    padding: 60px 20px 100px;
}

.team-profile-hero {
    text-align: center;
    margin-bottom: 24px;
}

.team-profile-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.team-profile-team-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.04em;
    margin: 0;
}

.team-profile-season {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.team-stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.team-stat {
    text-align: center;
    flex: 1;
}

.team-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--cyan);
    line-height: 1;
}

.team-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.team-profile-user {
    text-align: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.team-user-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.team-user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ===== GAME EDIT BUTTON (inline on cards) ===== */
.game-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    transition: var(--transition);
    padding: 0;
}

.game-edit-btn:active {
    background: var(--accent-dim);
    color: var(--accent);
    transform: scale(0.9);
}

/* ─── Play Tag Section ──────────────────────────────── */

.tag-section {
    padding: 16px 0;
}

.tag-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tag-bar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.tag-type-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    text-transform: uppercase;
    min-height: 36px;
    touch-action: manipulation;
}

.tag-type-toggle:active {
    background: var(--accent-dim);
}

/* Quick Clip button */
.clip-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 1.1rem;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    min-height: 36px;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
}
.clip-btn:hover {
    border-color: var(--accent);
}
.clip-btn.clipping {
    background: var(--accent);
    border-color: var(--accent);
    animation: clipPulse 0.5s infinite alternate;
}
@keyframes clipPulse {
    from { box-shadow: 0 0 4px var(--accent-glow); }
    to { box-shadow: 0 0 12px var(--accent-glow); }
}

/* Clip markers on video timeline */
.clip-marker {
    position: absolute;
    bottom: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0.8;
    border-radius: 2px;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s;
}
.clip-marker:hover {
    opacity: 1;
    height: 6px;
}

/* Clip tag item styling */
.tag-item.tag-clip .tag-item-label {
    color: var(--accent);
}

.tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.tag-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    min-height: 44px;
    touch-action: manipulation;
}

.tag-btn:active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: scale(0.92);
}

.tag-btn.tag-saved {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    animation: tagPulse 0.4s ease;
}

@keyframes tagPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ─── Tag Timeline ──────────────────────────────────── */

.tag-timeline {
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.tag-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tag-timeline-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.tag-count {
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 44px;
    touch-action: manipulation;
    flex-wrap: wrap;
}

.tag-item:active {
    background: var(--accent-dim);
}

.tag-item-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    min-width: 48px;
    font-variant-numeric: tabular-nums;
}

.tag-item-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.tag-item-type {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--surface-raised);
    color: var(--text-muted);
}

.tag-item-type.offensive { color: #4ade80; background: rgba(74,222,128,0.12); }
.tag-item-type.defensive { color: #60a5fa; background: rgba(96,165,250,0.12); }
.tag-item-type.transition { color: #facc15; background: rgba(250,204,21,0.12); }
.tag-item-type.dead_ball { color: #a78bfa; background: rgba(167,139,250,0.12); }
.tag-item-type.negative { color: #f87171; background: rgba(248,113,113,0.12); }

.tag-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    opacity: 0.5;
    font-size: 16px;
}

.tag-item-delete:hover {
    opacity: 1;
    color: #f87171;
}

.tag-item-players, .tag-item-playlist {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    font-size: 14px;
}
.tag-item-players:hover, .tag-item-playlist:hover { opacity: 1; }

/* ===== Player Tag Modal ===== */
.player-tag-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--primary);
    padding: 16px;
    z-index: 1000;
    border-radius: 16px 16px 0 0;
    max-height: 50vh;
    overflow-y: auto;
}
.player-tag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text);
}
.player-tag-header button {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.player-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.player-tag-chip {
    padding: 10px 14px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.player-tag-chip.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: #000;
}

/* ===== AI Analysis — Coach AI ===== */
.ai-analysis-section {
    padding: 16px;
    margin-top: 8px;
}
.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.ai-analysis-title {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.ai-analyze-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.ai-analyze-btn:active { transform: scale(0.95); }
.ai-analyze-btn:disabled { opacity: 0.5; transform: none; }

/* Frame count slider */
.ai-frame-slider {
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border-glass);
}
.ai-slider-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-slider-label input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}
.ai-slider-label input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}
#ai-frame-value {
    min-width: 32px;
    text-align: right;
    color: var(--accent);
    font-weight: 600;
}

/* Empty state */
.ai-empty-state {
    text-align: center;
    padding: 32px 16px;
}
.ai-empty-icon { font-size: 48px; margin-bottom: 12px; }
.ai-empty-state p { color: var(--text); font-size: 15px; margin: 4px 0; }
.ai-empty-sub { color: var(--text-muted) !important; font-size: 13px !important; }

/* Progress steps */
.ai-progress {
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--surface);
    opacity: 0.4;
    transition: all 0.3s;
}
.ai-progress-step.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    animation: ai-pulse 1.5s infinite;
}
.ai-progress-step.done {
    opacity: 0.7;
    animation: none;
}
.ai-progress-step.done .ai-step-icon::after {
    content: ' ✓';
    color: var(--success);
}
.ai-step-icon { font-size: 20px; }
@keyframes ai-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.15); }
}

/* Coach Tab Bar */
.coach-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.coach-tab-bar::-webkit-scrollbar { display: none; }

.coach-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.coach-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.coach-tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.coach-tab-emoji {
    font-size: 1.1rem;
}
.coach-tab-title {
    display: none;
}
@media (min-width: 600px) {
    .coach-tab-title { display: inline; }
}

.coach-panel {
    display: none;
}
.coach-panel.active {
    display: block;
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Drills card */
.ai-drills-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.ai-drills-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}
.ai-drills-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.ai-drills-list li:last-child { border-bottom: none; }
.ai-drills-list li::before {
    content: '🏋️ ';
}

/* Progress detail */
.ai-progress-detail {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Coach header */
.ai-coach-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.ai-coach-avatar { font-size: 28px; }
.ai-coach-name { font-weight: 800; font-size: 16px; color: var(--text); }
.ai-vision-badge, .ai-text-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.ai-vision-badge { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.ai-text-badge { background: rgba(250, 204, 21, 0.15); color: #eab308; }

/* Play of the Game */
.ai-potg {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.ai-potg-label {
    font-weight: 800;
    font-size: 12px;
    color: #f59e0b;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.ai-potg p { margin: 0; font-size: 14px; color: var(--text); line-height: 1.5; }

/* Analysis cards */
.ai-summary-card, .ai-moments-card, .ai-grades-card, .ai-coaching-card, .ai-development-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.ai-card-label {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.ai-summary-card p, .ai-coaching-card p, .ai-development-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}
.ai-development-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(16, 185, 129, 0.08));
    border-color: rgba(34, 197, 94, 0.3);
}

/* Key moments */
.ai-moment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}
.ai-moment-item:last-child { border-bottom: none; }
.ai-moment-time {
    font-family: monospace;
    font-size: 13px;
    color: var(--primary);
    min-width: 40px;
    font-weight: 700;
}
.ai-moment-desc { flex: 1; font-size: 13px; color: var(--text); }
.ai-moment-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
}
.ai-moment-highlight { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.ai-moment-turning_point { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ai-moment-coaching_moment { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

/* Player grades */
.ai-grades-grid { display: flex; flex-direction: column; gap: 8px; }
.ai-grade-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.ai-grade-number {
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
    min-width: 32px;
}
.ai-grade-letter {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
}
.ai-grade-a { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.ai-grade-b { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.ai-grade-c { background: rgba(250, 204, 21, 0.2); color: #eab308; }
.ai-grade-note { font-size: 13px; color: var(--text-muted); flex: 1; }

/* AI meta */
.ai-meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* Per-play explain */
.tag-item-explain {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    font-size: 14px;
}
.tag-item-explain:hover { opacity: 1; }
.tag-explain-result {
    width: 100%;
    padding: 0;
}
.ai-explain-bubble {
    margin-top: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border-left: 3px solid #6366f1;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}
.ai-thinking {
    font-size: 12px;
    color: #818cf8;
    animation: ai-pulse-text 1s infinite;
}
@keyframes ai-pulse-text {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== Playlists ===== */
.playlist-section {
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}
.playlist-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.playlist-section-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}
.playlist-create-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.playlist-list { display: flex; flex-direction: column; gap: 8px; }
.playlist-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    position: relative;
}
.playlist-card-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
}
.playlist-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.playlist-delete-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}
.playlist-empty {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 16px 0;
}

/* Playlist Viewer Overlay */
.playlist-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.playlist-viewer {
    background: var(--bg);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 16px;
}
.playlist-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.playlist-viewer-header h3 { margin: 0; color: var(--text); }
.playlist-viewer-header button {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
}
.playlist-clip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.playlist-clip-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #000;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}
.playlist-clip-label { flex: 1; font-size: 14px; color: var(--text); }
.playlist-clip-time { font-family: monospace; font-size: 13px; color: var(--text-muted); }
.reel-generate-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.reel-generate-btn:hover { opacity: 0.85; }
.reel-generate-btn:disabled { opacity: 0.5; cursor: wait; }

/* ===== OWNERS CORNER ===== */
.owners-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.owners-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.owners-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.owners-content { padding: 16px; }
.owners-tab-panel { display: none; }
.owners-tab-panel.active { display: block; }
.owners-placeholder { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.owners-placeholder-icon { font-size: 48px; margin-bottom: 12px; }

/* Ideas */
.ideas-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ideas-toolbar select {
    flex: 1;
    min-width: 100px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
}
.ideas-add-btn {
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

/* Idea form panel */
.idea-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease;
}
.idea-form-input,
.idea-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color var(--transition);
}
.idea-form-input:focus,
.idea-form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.idea-form-textarea {
    resize: vertical;
    min-height: 60px;
}
.idea-form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.idea-form-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
.idea-form-actions {
    display: flex;
    gap: 8px;
}
.idea-form-cancel {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.idea-form-submit {
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.idea-form-submit:hover { background: var(--accent-hover); }

.ideas-list { display: flex; flex-direction: column; gap: 12px; }
.ideas-empty { color: var(--text-muted); text-align: center; padding: 40px; }
.idea-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.idea-card-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.idea-status-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: var(--surface);
}
.idea-status-badge.status-done { background: #1a3a1a; color: #4ade80; }
.idea-status-badge.status-building { background: #3a2a1a; color: #fbbf24; }
.idea-status-badge.status-planned { background: #1a2a3a; color: #60a5fa; }
.idea-status-badge.status-deferred { background: #2a2a2a; color: #9ca3af; }
.idea-category { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.idea-priority { font-size: 11px; }
.idea-card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.idea-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.idea-card-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.idea-votes {
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--surface);
}
.idea-votes:hover { background: var(--border); }
.idea-author { font-size: 12px; color: var(--text-muted); flex: 1; }
.idea-status-select {
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}
.idea-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.5;
}
.idea-delete-btn:hover { opacity: 1; }

/* Pricing Calculator */
.pricing-calc { max-width: 600px; }
.pricing-title { color: var(--text); margin-bottom: 16px; font-size: 16px; }
.pricing-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.pricing-field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.pricing-field input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
}
.pricing-divider { grid-column: 1 / -1; border-top: 1px solid var(--border); margin: 4px 0; }
.pricing-results { margin-top: 8px; }
.pricing-section { margin-bottom: 20px; }
.pricing-section h4 { color: var(--text); font-size: 14px; margin-bottom: 8px; }
.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--surface);
}
.pricing-row.total { color: var(--text); font-weight: 600; border-bottom: none; padding-top: 8px; }
.text-green { color: #4ade80; }
.text-red { color: #ef4444; }

/* Lang Toggle */
.lang-toggle-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.lang-toggle-btn:hover { background: var(--surface); }

/* Usage Dashboard */
.usage-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.usage-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.usage-card-icon { font-size: 28px; margin-bottom: 6px; }
.usage-card-value { font-size: 22px; font-weight: 700; color: var(--text); font-family: 'Bebas Neue', sans-serif; }
.usage-card-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Costs architecture picker */
.costs-arch-picker { margin-bottom: 16px; }
.costs-arch-picker label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.costs-arch-picker select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
}
.costs-calc { max-width: 600px; }
.costs-subtitle { font-size: 13px; color: var(--text-muted); margin: -4px 0 12px; }

/* ===== INVESTORS TAB ===== */
.investor-page {
    max-width: 700px;
    padding-bottom: 40px;
}
.investor-section {
    margin-bottom: 28px;
}
.investor-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.investor-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
}
.investor-brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.investor-tagline {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.investor-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.investor-highlights {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.investor-stat-pill {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-size: 12px;
}
.pill-label {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pill-value {
    color: var(--accent);
    font-weight: 700;
}

/* Roadmap columns */
.investor-roadmap {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .investor-roadmap { grid-template-columns: 1fr; }
}
.roadmap-column {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}
.roadmap-col-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-secondary);
}
.roadmap-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.roadmap-item {
    font-size: 13px;
    padding: 8px 10px;
    background: var(--bg-elevated);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    line-height: 1.4;
}
.roadmap-item .roadmap-cat {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 2px;
}
.roadmap-empty {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Growth cards */
.investor-growth-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 480px) {
    .investor-growth-grid { grid-template-columns: repeat(2, 1fr); }
}
.growth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
}
.growth-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}
.growth-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Team bios */
.investor-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.team-bio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 16px;
    text-align: center;
}
.bio-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border: 2px solid var(--accent);
}
.bio-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.bio-role {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.bio-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
