/* =============================================
   3147MOTORSPORT - Global Styles
   ============================================= */

:root {
    --bg: #0D0D0D;
    --bg-alt: #111111;
    --surface: #1A1A1A;
    --surface-hover: #222222;
    --border: #2A2A2A;
    --border-light: #333333;
    --text: #F0F0F0;
    --text-muted: #888888;
    --text-dim: #555555;
    --accent: #FF4500;
    --accent-hover: #FF5722;
    --accent-dim: rgba(255, 69, 0, 0.15);
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --info: #2196F3;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.accent {
    color: var(--accent);
}

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: 64px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -1px;
    line-height: 1;
}

.logo-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.nav-cta, .nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 69, 0, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-light);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

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

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

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* =============================================
   HERO
   ============================================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 64px;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.08) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, 30px) scale(1.1); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

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

/* Hero Dyno Preview */
.hero-dyno-preview {
    margin-top: 3rem;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.hero-dyno-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

.hero-dyno-preview canvas {
    display: block;
    width: 100%;
    height: 220px;
}

.dyno-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.dyno-peak {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}

.dyno-peak .accent {
    font-size: 2rem;
    color: var(--accent);
}

.dyno-info {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   SECTIONS
   ============================================= */

.section {
    padding: 6rem 0;
}

.section-dark {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* =============================================
   STEPS (How it works)
   ============================================= */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    padding: 2.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.step-icon {
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.step-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =============================================
   PRICING
   ============================================= */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: start;
}

.pricing-card {
    padding: 2.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.pricing-featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--surface), rgba(255, 69, 0, 0.05));
    transform: scale(1.03);
}

.pricing-featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 1.25rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.3rem;
}

.currency {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.amount {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -2px;
}

.pricing-period {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.6rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    padding-left: 1.5rem;
}

.pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* =============================================
   TAGS
   ============================================= */

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-primary {
    background: var(--accent);
    color: white;
}

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

.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    background: var(--bg-alt);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 300px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */

.dashboard-body {
    background: var(--bg);
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 64px;
}

.sidebar {
    width: 260px;
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-menu {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-item:hover {
    color: var(--text);
    background: var(--surface);
}

.sidebar-item.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.sidebar-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-plan {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.plan-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.plan-sessions {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

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

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.car-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.car-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.car-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.car-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.car-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.status-ready {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.status-tuning {
    background: rgba(255, 152, 0, 0.15);
    color: var(--warning);
}

.status-idle {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text-muted);
}

.car-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.car-spec {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.car-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.car-detail {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* =============================================
   ACTIVITY
   ============================================= */

.dashboard-section {
    margin-top: 2rem;
}

.dashboard-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-info { background: var(--info); }

.activity-content p {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* =============================================
   MODAL
   ============================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input option {
    background: var(--bg);
}

/* =============================================
   SESSION PAGE
   ============================================= */

.session-layout {
    padding-top: 64px;
    min-height: 100vh;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.session-info h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.session-car {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.session-id {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: monospace;
}

.session-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
}

.connection-dot.pulsing {
    background: var(--warning);
    animation: pulse 1.5s infinite;
}

.connection-dot.connected {
    background: var(--success);
    animation: pulse 2s infinite;
}

.connection-dot.complete {
    background: var(--info);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.6; box-shadow: 0 0 8px 2px currentColor; }
}

.status-connecting { border-color: var(--warning); }
.status-connected { border-color: var(--success); }
.status-complete { border-color: var(--info); }

/* Session Grid */
.session-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1px;
    background: var(--border);
    min-height: calc(100vh - 130px);
}

.panel {
    background: var(--bg);
    padding: 1.25rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.panel-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.panel-badge {
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Instructions */
.instruction-panel {
    grid-row: 1 / 3;
}

.instruction-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    opacity: 0.4;
    transition: all 0.4s ease;
}

.instruction-item.active {
    opacity: 1;
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.1);
}

.instruction-item.completed {
    opacity: 0.6;
}

.instruction-item.completed .instruction-icon {
    color: var(--success);
}

.instruction-icon {
    color: var(--text-dim);
    flex-shrink: 0;
    margin-top: 2px;
    transition: color 0.3s;
}

.instruction-item.active .instruction-icon {
    color: var(--accent);
}

.instruction-icon.waiting {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.instruction-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.instruction-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Progress Bar */
.session-progress {
    margin-top: auto;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #FF6B35);
    border-radius: 4px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Gauges */
.data-rate {
    font-size: 0.75rem;
    color: var(--success);
    font-family: monospace;
}

.gauges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.gauge-card {
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.gauge-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.gauge-value {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -1px;
}

.gauge-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.gauge-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.2s ease;
}

.rpm-fill { background: var(--accent); }
.afr-fill { background: var(--success); }
.hp-fill { background: #FF6B35; }
.iat-fill { background: var(--info); }
.ect-fill { background: var(--warning); }
.tps-fill { background: #9C27B0; }

.gauge-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-dim);
    font-family: monospace;
}

/* Chart */
.chart-panel {
    grid-column: 1 / -1;
}

.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 3px;
    border-radius: 1px;
}

.chart-area {
    height: 250px;
    position: relative;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.chart-area canvas {
    display: none;
    width: 100%;
    height: 100%;
}

.chart-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-dim);
}

.chart-placeholder p {
    font-size: 0.9rem;
}

/* Log Panel */
.log-panel {
    grid-column: 1 / -1;
}

.log-content {
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background: var(--surface);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.log-entry {
    padding: 0.2rem 0;
    line-height: 1.5;
}

.log-time {
    color: var(--text-dim);
}

.log-info .log-msg { color: var(--text-muted); }
.log-warning .log-msg { color: var(--warning); }
.log-success .log-msg { color: var(--success); }
.log-error .log-msg { color: var(--danger); }
.log-system .log-msg { color: var(--info); }

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

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

    .instruction-panel {
        grid-row: auto;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-cta, .nav-user {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .pricing-featured {
        transform: none;
    }

    .pricing-featured:hover {
        transform: translateY(-4px);
    }

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

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

    .session-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .session-info {
        flex-direction: column;
        gap: 0.5rem;
    }

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

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

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* =============================================
   SELECTION
   ============================================= */

::selection {
    background: rgba(255, 69, 0, 0.3);
    color: white;
}
