/* ============================================
   J.A.R.V.I.S. Interface Styles
   Futuristic Holographic AI Assistant
   ============================================ */

/* CSS Variables */
:root {
    /* Core Colors - Iron Man Inspired */
    --primary-cyan: #00D4FF;
    --primary-blue: #0080FF;
    --accent-gold: #FFD700;
    --accent-orange: #FF6B35;
    
    /* Dark Theme */
    --bg-primary: #0A0A0F;
    --bg-secondary: #12121A;
    --bg-tertiary: #1A1A28;
    --bg-glass: rgba(18, 18, 26, 0.85);
    
    /* Text Colors */
    --text-primary: #E8F4F8;
    --text-secondary: #8A9BA8;
    --text-muted: #5A6A78;
    
    /* Glow Effects */
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
    --glow-blue: 0 0 30px rgba(0, 128, 255, 0.4), 0 0 60px rgba(0, 128, 255, 0.2);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.4), 0 0 40px rgba(255, 215, 0, 0.2);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Ambient Background Effects */
.ambient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(ellipse at center, 
        rgba(0, 212, 255, 0.08) 0%, 
        rgba(0, 128, 255, 0.05) 30%,
        transparent 70%);
    pointer-events: none;
    z-index: -2;
    animation: ambientPulse 8s ease-in-out infinite;
}

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

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.03) 2px,
        rgba(0, 212, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: -1;
}

/* Main Container */
.jarvis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* ============================================
   Status Bar
   ============================================ */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    position: relative;
}

.status-dot.active {
    background: #00FF88;
    box-shadow: 0 0 10px #00FF88, 0 0 20px #00FF88;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: #00FF88;
    font-weight: 600;
}

.time-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: 3px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.connection-text {
    color: var(--text-secondary);
}

.signal-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}

.signal-bars span {
    width: 3px;
    background: var(--primary-cyan);
    border-radius: 1px;
    animation: signalPulse 1.5s ease-in-out infinite;
}

.signal-bars span:nth-child(1) { height: 4px; animation-delay: 0s; }
.signal-bars span:nth-child(2) { height: 6px; animation-delay: 0.1s; }
.signal-bars span:nth-child(3) { height: 8px; animation-delay: 0.2s; }
.signal-bars span:nth-child(4) { height: 12px; animation-delay: 0.3s; }

@keyframes signalPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ============================================
   Main Interface
   ============================================ */
.main-interface {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-lg);
    align-items: center;
}

/* Core Container - JARVIS Visual */
.core-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: rotateRing 10s linear infinite;
}

.core-ring.outer {
    width: 100%;
    height: 100%;
    border-top-color: var(--primary-cyan);
    border-right-color: rgba(0, 212, 255, 0.3);
    animation-duration: 15s;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.core-ring.middle {
    width: 75%;
    height: 75%;
    border-bottom-color: var(--primary-blue);
    border-left-color: rgba(0, 128, 255, 0.3);
    animation-duration: 10s;
    animation-direction: reverse;
}

.core-ring.inner {
    width: 50%;
    height: 50%;
    border-top-color: var(--accent-gold);
    border-bottom-color: rgba(255, 215, 0, 0.3);
    animation-duration: 8s;
}

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

.core-center {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--primary-cyan) 0%, var(--primary-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-cyan);
    animation: corePulse 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes corePulse {
    0%, 100% { transform: scale(1); box-shadow: var(--glow-cyan); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(0, 212, 255, 0.7), 0 0 80px rgba(0, 212, 255, 0.4); }
}

.core-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--bg-primary);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Voice Wave Visualization */
.voice-waves {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.voice-waves.active {
    opacity: 1;
}

.wave-bar {
    width: 6px;
    background: linear-gradient(to top, var(--primary-blue), var(--primary-cyan));
    border-radius: 3px;
    transition: height 0.1s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ============================================
   Response Panel
   ============================================ */
.response-panel {
    background: var(--bg-glass);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.response-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
    animation: scanLine 3s linear infinite;
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.panel-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--primary-cyan);
}

.panel-indicators {
    display: flex;
    gap: 6px;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: indicatorBlink 1.5s ease-in-out infinite;
}

.indicator:nth-child(1) { animation-delay: 0s; }
.indicator:nth-child(2) { animation-delay: 0.2s; }
.indicator:nth-child(3) { animation-delay: 0.4s; }

@keyframes indicatorBlink {
    0%, 100% { opacity: 0.3; background: var(--text-muted); }
    50% { opacity: 1; background: var(--primary-cyan); }
}

.response-content {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    overflow-y: auto;
}

.welcome-message {
    font-size: 1.2rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 4px;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-xs);
}

.typing-indicator.active {
    display: flex;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary-cyan);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ============================================
   Command Section
   ============================================ */
.command-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.input-container {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: var(--transition-normal);
}

.input-wrapper:focus-within {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.input-prompt {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary-cyan);
    font-weight: 700;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: var(--spacing-xs);
}

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

.voice-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.voice-btn:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.voice-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.6); }
}

.voice-btn svg {
    width: 20px;
    height: 20px;
}

.execute-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
}

.execute-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.execute-btn:active {
    transform: translateY(0);
}

/* Quick Commands */
.quick-commands {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    justify-content: center;
}

.quick-cmd {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quick-cmd:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

/* ============================================
   System Info Footer
   ============================================ */
.system-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.info-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.info-value {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-cyan);
}

/* Audio Warning */
.audio-warning {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass);
    border: 1px solid var(--primary-cyan);
    border-radius: 8px;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    z-index: 100;
    animation: fadeInOut 5s ease forwards;
    animation-delay: 3s;
    opacity: 0;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .main-interface {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .core-container {
        width: 200px;
        height: 200px;
    }
    
    .core-center {
        width: 60px;
        height: 60px;
    }
    
    .core-text {
        font-size: 1.5rem;
    }
    
    .system-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .status-bar {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        justify-content: center;
    }
    
    .time-display {
        order: -1;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .execute-btn {
        width: 100%;
    }
    
    .quick-commands {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--spacing-xs);
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Selection */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}