/* === Race to Series A - Shared Styles === */
:root {
    --bg-dark: #0a0b0e;
    --bg-card: #12141a;
    --bg-elevated: #1a1d24;
    --bg-hover: #22262f;
    
    --text-primary: #f0f0f0;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-gold: #fbbf24;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    
    --font-main: 'Space Grotesk', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }

/* ========================================
   ADMIN PAGE
   ======================================== */

.admin-page {
    min-height: 100vh;
    padding-bottom: 4rem;
}

.race-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon { font-size: 1.5rem; }

.brand-text {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.4rem 1rem;
    border-radius: 100px;
}

.admin-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.admin-header p {
    color: var(--text-secondary);
}

/* Firebase Warning */
.firebase-warning {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content h3 {
    color: var(--accent-warning);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.warning-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.warning-content ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.warning-content ol li {
    margin-bottom: 0.5rem;
}

.warning-content a {
    color: var(--accent-warning);
}

.warning-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.warning-note {
    font-style: italic;
    color: var(--text-muted) !important;
}

/* Status Card */
.status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.status-card.active {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-card.active .status-dot {
    background: var(--accent-success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.status-text {
    font-weight: 500;
}

.status-info {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sections */
.admin-main section {
    margin-bottom: 2rem;
}

.admin-main h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Add Team Form */
.add-team-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.add-team-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.add-team-form input:focus {
    border-color: var(--accent-primary);
}

.add-team-form input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-icon { font-size: 1.25rem; }

/* Emoji Selector */
.emoji-select {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.emoji-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    transform: scale(1.1);
}

.emoji-btn.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.emoji-btn.used {
    opacity: 0.3;
    cursor: not-allowed;
}

.emoji-btn:disabled {
    cursor: not-allowed;
}

.quick-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-add-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quick-btn {
    padding: 0.4rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Teams List */
.teams-list {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.team-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s ease;
}

.team-item:last-child { border-bottom: none; }

.team-item:hover { background: var(--bg-elevated); }

.team-item.finished {
    background: rgba(251, 191, 36, 0.05);
}

.team-emoji {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
}

.team-info {
    flex: 1;
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.team-progress {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.25rem;
}

.team-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ctrl-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ctrl-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.ctrl-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.step-display {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    min-width: 24px;
    text-align: center;
}

.delete-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.delete-btn:hover { opacity: 1; }

/* Race Controls */
.race-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-start, .btn-stop, .btn-reset, .btn-danger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-start {
    background: var(--gradient-success);
    color: white;
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-stop {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-reset {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-reset:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Links Section */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.link-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.link-icon { font-size: 2rem; }

.link-title {
    font-weight: 600;
}

.link-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   REMOTE PAGE (MOBILE)
   ======================================== */

.remote-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.remote-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
}

/* Select Screen */
.remote-header {
    text-align: center;
    margin-bottom: 3rem;
}

.remote-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.remote-header h1 {
    font-size: 1.75rem;
}

.select-container {
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.select-container h2 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.team-select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    margin-bottom: 1rem;
    outline: none;
    cursor: pointer;
}

.team-select:focus {
    border-color: var(--accent-primary);
}

.btn-join {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-join:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-join:not(:disabled):hover {
    transform: translateY(-2px);
}

/* Waiting Screen */
.waiting-content {
    text-align: center;
}

.waiting-animation {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.waiting-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: waitingBounce 1.4s ease-in-out infinite;
}

.waiting-dot:nth-child(2) { animation-delay: 0.2s; }
.waiting-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes waitingBounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-12px); opacity: 1; }
}

.waiting-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.waiting-content p {
    color: var(--text-secondary);
}

.team-label {
    margin-top: 2rem;
    color: var(--text-muted);
}

/* Active Screen */
#activeScreen {
    justify-content: flex-start;
    padding-top: 1rem;
}

.active-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin-bottom: 2rem;
}

.team-badge {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.team-badge-full {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.badge-emoji {
    font-size: 1.5rem;
}

.badge-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.progress-mini {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.objective-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    margin-bottom: 2rem;
}

.objective-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 1rem;
}

.objective-step {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.objective-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.objective-desc {
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 100px;
    margin-bottom: 2rem;
    position: relative;
    overflow: visible;
}

.track-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 0.5s var(--ease-out);
}

.track-markers {
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.marker {
    width: 24px;
    height: 24px;
    background: var(--bg-dark);
    border: 2px solid var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.marker.completed {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.marker.current {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.2);
}

.btn-complete {
    width: 100%;
    max-width: 400px;
    padding: 1.25rem 2rem;
    background: var(--gradient-success);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.btn-complete:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.btn-complete:disabled {
    opacity: 0.7;
}

.btn-rocket {
    font-size: 1.5rem;
}

.next-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Celebrate Screen */
.celebrate-content {
    text-align: center;
    position: relative;
}

.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.celebrate-check {
    width: 100px;
    height: 100px;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    animation: checkPop 0.5s var(--ease-out);
}

@keyframes checkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.celebrate-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

/* Finished Screen */
.finished-content {
    text-align: center;
}

.unicorn-animation {
    font-size: 5rem;
    animation: unicornBounce 1s ease-in-out infinite;
}

@keyframes unicornBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.finished-content h1 {
    font-size: 2rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.finished-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.finished-team {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.trophy-row {
    font-size: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.finished-msg {
    color: var(--text-secondary);
}

/* ========================================
   LEADERBOARD PAGE
   ======================================== */

.leaderboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0b0e 0%, #0f1015 100%);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon { font-size: 1.5rem; }

.header-left h1 {
    font-size: 1.25rem;
}

.header-center {
    justify-self: center;
}

.race-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border-radius: 100px;
}

.race-status.active {
    color: var(--accent-success);
    background: rgba(16, 185, 129, 0.1);
}

.race-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.race-status.active .status-dot {
    background: var(--accent-success);
}

.header-right {
    justify-self: end;
}

.timer {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Kanban Board */
.kanban-board {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    overflow-x: auto;
}

.kanban-column {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.winner-column {
    border-color: var(--accent-gold);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.05) 0%, var(--bg-card) 100%);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.column-icon { font-size: 1.25rem; }

.column-header h2 {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
}

.column-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.column-cards {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.team-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out);
}

.team-card:hover {
    transform: scale(1.02);
    border-color: var(--border-medium);
}

.team-card.just-moved {
    animation: cardSlide 0.6s var(--ease-out), cardGlow 1s ease-out;
}

@keyframes cardSlide {
    0% { transform: translateX(-30px) scale(0.9); opacity: 0; }
    50% { transform: translateX(5px) scale(1.05); }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes cardGlow {
    0% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.6); }
    100% { box-shadow: none; }
}

.team-card.winner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-color: var(--accent-gold);
    animation: winnerPulse 2s ease-in-out infinite;
}

@keyframes winnerPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 40px rgba(251, 191, 36, 0.5); }
}

.card-emoji {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease;
}

.team-card:hover .card-emoji {
    transform: scale(1.1);
}

.card-emoji.winner-glow {
    animation: emojiFloat 2s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.1); }
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-type {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
}

.first-badge {
    font-size: 1.25rem;
    animation: fireBadge 0.5s ease-out;
}

@keyframes fireBadge {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Responsive */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .race-nav {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .add-team-form {
        flex-direction: column;
    }
    
    .race-controls {
        flex-direction: column;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    /* Remote page mobile improvements */
    .remote-screen {
        padding: 1.5rem;
    }
    
    .remote-icon {
        font-size: 3rem;
    }
    
    .remote-header h1 {
        font-size: 1.5rem;
    }
    
    .objective-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .objective-title {
        font-size: 1.25rem;
    }
    
    .btn-complete {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .active-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .progress-track {
        width: 100%;
        max-width: 300px;
    }
    
    .leaderboard-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: center;
    }
    
    .header-left, .header-right {
        justify-self: center;
    }
    
    .kanban-board {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .column-header h2 {
        font-size: 0.75rem;
    }
}

