/* J.A.R.V.I.S. Interface Styles */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b35;
    --accent-color: #7b2cbf;
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(10, 20, 40, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glow-primary: 0 0 20px rgba(0, 212, 255, 0.5);
    --glow-secondary: 0 0 30px rgba(0, 212, 255, 0.3);
    --hud-glow: 0 0 40px rgba(0, 212, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

.app-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a1628 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.boot-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.boot-content {
    text-align: center;
    animation: bootPulse 2s ease-in-out infinite;
}

.boot-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    letter-spacing: 0.5rem;
    margin-bottom: 0.5rem;
}

.boot-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.3rem;
    margin-bottom: 2rem;
}

.boot-progress {
    width: 250px;
    height: 3px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.boot-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    animation: bootProgress 3s ease-out forwards;
    box-shadow: 0 0 10px var(--primary-color);
}

.boot-status {
    font-size: 0.8rem;
    color: var(--primary-color);
    letter-spacing: 0.2rem;
    animation: textFlicker 3s infinite;
}

@keyframes bootPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes bootProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

/* Main Interface */
.main-interface {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: radial-gradient(ellipse at center top, #0d1b2a 0%, #0a0a0f 50%, #000000 100%);
    opacity: 1;
    transition: opacity 0.5s ease;
}

.main-interface.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-panel);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: var(--glow-primary);
}

.time-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: 0.1rem;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15rem;
    color: var(--primary-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* HUD Container */
.hud-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 25px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.outer-ring {
    width: 220px;
    height: 220px;
    border-top: 2px solid var(--primary-color);
    border-right: 2px solid rgba(0, 212, 255, 0.3);
    border-bottom: 2px solid rgba(0, 212, 255, 0.1);
    border-left: 2px solid rgba(0, 212, 255, 0.3);
    animation: rotateCW 15s linear infinite;
    box-shadow: var(--hud-glow);
}

.middle-ring {
    width: 180px;
    height: 180px;
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-top: 2px solid var(--secondary-color);
    animation: rotateCCW 10s linear infinite;
}

.inner-ring {
    width: 140px;
    height: 140px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-bottom: 2px solid var(--primary-color);
    animation: rotateCW 8s linear infinite;
}

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

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

.hud-core {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, rgba(0, 212, 255, 0.05) 100%);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.hud-core:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.6);
}

.hud-core.listening {
    animation: corePulse 1s ease-in-out infinite;
    border-color: var(--secondary-color);
    box-shadow: 0 0 50px rgba(255, 107, 53, 0.6);
}

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

.core-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: ripple 2s ease-out infinite;
    opacity: 0;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

.core-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.8));
    transition: all 0.3s ease;
}

.hud-core.listening .core-icon {
    filter: drop-shadow(0 0 15px rgba(255, 107, 53, 0.8));
}

/* Particles */
.hud-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hud-particles::before,
.hud-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.6;
}

.hud-particles::before {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation: particleFloat 4s ease-in-out infinite;
}

.hud-particles::after {
    width: 3px;
    height: 3px;
    top: 70%;
    right: 15%;
    animation: particleFloat 5s ease-in-out infinite reverse;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.6; }
    50% { transform: translateY(-20px) translateX(10px); opacity: 1; }
}

/* Waveform */
.waveform-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 50px;
    margin: 0 auto 20px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.waveform-container.active {
    opacity: 1;
}

.wave-bar {
    width: 4px;
    height: 20px;
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; height: 15px; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 25px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 35px; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 30px; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; height: 40px; }
.wave-bar:nth-child(6) { animation-delay: 0.5s; height: 35px; }
.wave-bar:nth-child(7) { animation-delay: 0.6s; height: 25px; }
.wave-bar:nth-child(8) { animation-delay: 0.7s; height: 30px; }
.wave-bar:nth-child(9) { animation-delay: 0.8s; height: 20px; }
.wave-bar:nth-child(10) { animation-delay: 0.9s; height: 15px; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.waveform-container.active .wave-bar {
    animation-duration: 0.5s;
}

/* Command Display */
.command-display {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-panel);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.command-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--primary-color);
    letter-spacing: 0.3rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.command-text {
    font-size: 1rem;
    color: var(--text-primary);
    min-height: 24px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.command-text.listening {
    color: var(--secondary-color);
    animation: textPulse 1s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Info Panels */
.info-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.panel:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: var(--glow-secondary);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--primary-color);
    letter-spacing: 0.15rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.panel-icon {
    font-size: 1rem;
}

.panel-content {
    font-size: 0.85rem;
}

/* Weather Panel */
.weather-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.weather-temp {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.weather-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* System Panel */
.system-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.stat-row span:first-child {
    width: 35px;
    color: var(--primary-color);
    font-weight: 600;
}

.stat-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.stat-row span:last-child {
    width: 35px;
    text-align: right;
    color: var(--text-secondary);
}

/* News Ticker */
.news-ticker {
    display: flex;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.ticker-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--secondary-color);
    letter-spacing: 0.15rem;
    margin-right: 12px;
    padding-right: 12px;
    border-right: 1px solid rgba(0, 212, 255, 0.3);
    white-space: nowrap;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ticker-content span {
    display: inline-block;
    animation: tickerScroll 20s linear infinite;
    padding-left: 100%;
}

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

/* Response Overlay */
.response-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.response-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.response-content {
    text-align: center;
    padding: 30px;
    background: var(--bg-panel);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    box-shadow: var(--hud-glow);
    max-width: 90%;
    animation: responsePulse 2s ease-in-out infinite;
}

@keyframes responsePulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 50px rgba(0, 212, 255, 0.6); }
}

.response-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: iconPulse 1s ease-in-out infinite;
}

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

.response-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    line-height: 1.5;
}

/* Scan Lines */
.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 100;
    opacity: 0.5;
}

/* Glow Overlay */
.glow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at 50% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    z-index: 50;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .hud-container {
        width: 180px;
        height: 180px;
        margin: 15px auto;
    }
    
    .outer-ring { width: 180px; height: 180px; }
    .middle-ring { width: 145px; height: 145px; }
    .inner-ring { width: 110px; height: 110px; }
    .hud-core { width: 80px; height: 80px; }
    .core-icon { font-size: 2rem; }
    
    .info-panels {
        margin-bottom: 10px;
    }
    
    .panel {
        padding: 10px;
    }
}

@media (max-height: 600px) {
    .waveform-container {
        height: 35px;
        margin-bottom: 10px;
    }
    
    .command-display {
        margin-bottom: 15px;
        padding: 10px;
    }
    
    .news-ticker {
        padding: 8px 10px;
    }
}