/* =============================================
   Claude Command Center - Cockpit UI
   ============================================= */

/* CSS Variables */
:root {
    --primary: #ff6b35;
    --primary-light: #ff8c5a;
    --primary-dark: #e55a2b;
    --accent: #f7931e;
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(15, 15, 25, 0.95);
    --bg-card: rgba(20, 20, 35, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #8892a0;
    --text-muted: #4a5568;
    --border-color: rgba(255, 107, 53, 0.3);
    --glow-primary: rgba(255, 107, 53, 0.6);
    --glow-soft: rgba(255, 107, 53, 0.2);
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --purple: #a855f7;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 107, 53, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.3;
}

/* Vignette */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Particles Container */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: float-particle 8s infinite;
}

@keyframes float-particle {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* Cockpit Container */
.cockpit {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 30px var(--glow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.logo-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: rotate-ring 10s linear infinite;
    box-shadow: 0 0 20px var(--glow-primary);
}

.logo-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--primary);
}

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

.logo-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px var(--glow-primary);
}

.title-container {
    display: flex;
    flex-direction: column;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 10px var(--glow-primary));
}

.subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    letter-spacing: 6px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 20px;
}

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

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

.status-text {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--success);
    letter-spacing: 1px;
}

.current-time {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    flex: 1;
}

/* Panel Base */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 40px var(--glow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

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

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
}

.panel-icon {
    color: var(--primary);
    font-size: 16px;
    animation: pulse-icon 3s infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.panel-title {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary);
    flex: 1;
}

.panel-badge {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--success) 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
    animation: badge-glow 2s infinite;
}

.panel-badge.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.panel-badge.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #ef4444 100%);
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.4);
}

@keyframes badge-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Gauge */
.gauge-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 30px auto 40px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-value {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 30px var(--glow-primary);
    line-height: 1;
}

.gauge-unit {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.gauge-label {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-top: 5px;
}

.gauge-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.gauge-ring-1 {
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    animation: rotate-ring 20s linear infinite reverse;
}

.gauge-ring-2 {
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-style: dashed;
    animation: rotate-ring 30s linear infinite;
}

/* Gauge +/- Buttons */
.gauge-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 10;
}

.gauge-btn-minus {
    left: -80px;
}

.gauge-btn-plus {
    right: -80px;
}

.gauge-btn .btn-icon {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 107, 53, 0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

.gauge-btn .btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary);
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 1;
}

.gauge-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--primary-light);
    box-shadow: 0 0 20px var(--glow-primary), inset 0 0 15px rgba(255, 107, 53, 0.2);
}

.gauge-btn:hover .btn-icon {
    color: var(--primary);
    text-shadow: 0 0 15px var(--glow-primary);
    transform: scale(1.1);
}

.gauge-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gauge-btn:active .btn-pulse {
    animation: btn-pulse-effect 0.4s ease-out;
}

@keyframes btn-pulse-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.6;
    }
    100% {
        width: 150%;
        height: 150%;
        opacity: 0;
    }
}

/* Gauge value update animation */
.gauge-value.updating {
    animation: value-pop 0.3s ease-out;
}

@keyframes value-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 0 0 50px var(--glow-primary), 0 0 80px var(--primary);
    }
    100% {
        transform: scale(1);
    }
}

/* Slider */
.slider-section {
    margin-top: 20px;
}

.slider-label {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.slider-wrapper {
    position: relative;
    height: 20px;
}

.cyber-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 4px;
    outline: none;
    position: relative;
    z-index: 2;
}

.cyber-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow:
        0 0 20px var(--glow-primary),
        0 0 40px var(--glow-soft);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cyber-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow:
        0 0 30px var(--glow-primary),
        0 0 60px var(--glow-soft);
}

.cyber-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px var(--glow-primary);
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px;
    transform: translateY(-50%);
    z-index: 1;
    box-shadow: 0 0 15px var(--glow-primary);
    transition: width 0.1s;
}

.slider-glow {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 20px;
    background: linear-gradient(90deg, var(--glow-primary), transparent);
    border-radius: 10px;
    transform: translateY(-50%);
    z-index: 0;
    filter: blur(10px);
    transition: width 0.1s;
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    color: var(--text-muted);
}

/* Progress Blocks */
.time-block, .usage-block {
    margin-bottom: 20px;
}

.time-block-header, .usage-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.time-icon, .usage-icon {
    font-size: 14px;
}

.time-label, .usage-label {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    flex: 1;
}

.time-value, .usage-value {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--purple);
}

.usage-value {
    color: var(--primary);
}

.progress-track {
    position: relative;
    height: 12px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.progress-track.orange {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple) 0%, #8b5cf6 100%);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
    position: relative;
}

.progress-fill.orange {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 0 15px var(--glow-primary);
}

.progress-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

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

/* Insight Card */
.insight-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.insight-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--glow-soft);
}

.insight-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.insight-content {
    flex: 1;
}

.insight-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.insight-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.15);
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-soft);
}

.stat-icon {
    font-size: 20px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Config Block */
.config-block {
    margin-bottom: 20px;
}

.config-label {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

.config-row {
    display: flex;
    gap: 10px;
}

.cyber-select {
    flex: 1;
    padding: 10px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.cyber-select:hover, .cyber-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow-soft);
}

.cyber-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.next-reset {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 107, 53, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.next-reset-label {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.next-reset-value {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

/* History Block */
.history-block {
    margin-bottom: 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.history-avg {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    color: var(--primary);
    padding: 4px 8px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.history-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100px;
    gap: 6px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.15);
}

.history-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bar-container {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px var(--glow-primary);
}

.bar:hover {
    box-shadow: 0 0 20px var(--glow-primary);
    transform: scaleY(1.05);
}

.bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.bar:hover .bar-value {
    opacity: 1;
}

.bar-label {
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
}

.bar-label.today {
    color: var(--primary);
    font-weight: 700;
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 20px;
    width: 100%;
    font-family: 'Rajdhani', sans-serif;
}

/* History Edit Hint */
.history-edit-hint {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: var(--bg-panel);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 0 50px var(--glow-primary);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon {
    font-size: 20px;
}

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 25px 20px;
}

.modal-date {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 25px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.modal-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-slider {
    flex: 1;
}

.modal-value {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
    text-shadow: 0 0 10px var(--glow-primary);
}

.modal-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 5px;
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-cancel {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-btn-cancel:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.modal-btn-save {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 0 15px var(--glow-soft);
}

.modal-btn-save:hover {
    box-shadow: 0 0 25px var(--glow-primary);
    transform: translateY(-1px);
}

/* Clickable bars */
.history-bar .bar-container {
    cursor: pointer;
}

.history-bar .bar-container:hover .bar {
    box-shadow: 0 0 25px var(--glow-primary);
}

/* Trend Block */
.trend-block {
    padding: 15px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.15);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trend-scale {
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    color: var(--primary);
    padding: 2px 6px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.trend-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.trend-chart-wrapper {
    position: relative;
    width: 100%;
    height: 70px;
}

.line-chart {
    width: 100%;
    height: 100%;
}

.trend-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b35;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px rgba(255, 107, 53, 0.6);
}

/* Recommendation Panel */
.recommendation-panel {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(247, 147, 30, 0.15) 100%);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 50px var(--glow-soft),
        inset 0 0 50px rgba(255, 107, 53, 0.05);
    animation: panel-pulse 3s infinite;
}

@keyframes panel-pulse {
    0%, 100% { box-shadow: 0 0 50px var(--glow-soft), inset 0 0 50px rgba(255, 107, 53, 0.05); }
    50% { box-shadow: 0 0 70px var(--glow-primary), inset 0 0 70px rgba(255, 107, 53, 0.1); }
}

.recommendation-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--glow-soft), transparent);
    animation: rotate-bg 8s linear infinite;
    opacity: 0.3;
}

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

.rec-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.rec-icon {
    color: var(--primary);
    font-size: 16px;
    animation: pulse-icon 2s infinite;
}

.rec-title {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.rec-value-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
}

.rec-value {
    font-family: 'Orbitron', monospace;
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--glow-primary));
    animation: value-glow 2s infinite;
}

.rec-value.complete {
    font-size: 42px;
    background: linear-gradient(135deg, var(--success) 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(74, 222, 128, 0.8));
    animation: complete-glow 1.5s infinite;
}

@keyframes value-glow {
    0%, 100% { filter: drop-shadow(0 0 20px var(--glow-primary)); }
    50% { filter: drop-shadow(0 0 30px var(--primary)); }
}

@keyframes complete-glow {
    0%, 100% {
        filter: drop-shadow(0 0 25px rgba(74, 222, 128, 0.8));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(74, 222, 128, 1));
        transform: scale(1.05);
    }
}

.rec-unit {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: var(--text-secondary);
}

.rec-message {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(20px);
}

.version {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.powered {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.conn-text {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    color: var(--success);
    letter-spacing: 1px;
}

/* Hidden result for compatibility */
#result {
    display: block;
}

#result.show {
    display: block;
}

/* Progress Section Hidden */
#progressSection {
    display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }

    .panel-side {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .cockpit {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-left {
        flex-direction: column;
    }

    .header-right {
        align-items: center;
    }

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

    .panel-side {
        grid-column: span 1;
    }

    .title {
        font-size: 22px;
    }

    .gauge-container {
        width: 180px;
        height: 180px;
    }

    .gauge-value {
        font-size: 36px;
    }

    .rec-value {
        font-size: 42px;
    }

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

    .footer {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animations for page load */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: fade-in-up 0.6s ease-out backwards;
}

.panel-main { animation-delay: 0.1s; }
.panel-center { animation-delay: 0.2s; }
.panel-side { animation-delay: 0.3s; }
.recommendation-panel { animation: fade-in-up 0.6s ease-out 0.4s backwards; }

/* Gauge tick animation */
.gauge-tick {
    stroke: rgba(255, 107, 53, 0.3);
    stroke-width: 2;
    stroke-linecap: round;
}

.gauge-tick.active {
    stroke: var(--primary);
    filter: drop-shadow(0 0 3px var(--primary));
}
