/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.5);
}

/* Animations */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes scan {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

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

/* Holographic Effects */
.holographic-text {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5),
                 0 0 20px rgba(6, 182, 212, 0.3),
                 0 0 30px rgba(6, 182, 212, 0.1);
}

.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Fold 7 Specific Optimizations */
@media (max-width: 360px) {
    /* Cover screen mode */
    .font-orbitron {
        font-size: 0.75rem;
    }
    
    #jarvis-orb {
        width: 8rem;
        height: 8rem;
    }
    
    #jarvis-orb .relative {
        width: 6rem;
        height: 6rem;
    }
}

@media (min-width: 720px) and (max-width: 900px) {
    /* Flex mode / Half folded */
    main {
        flex-direction: row;
    }
    
    section:first-child {
        flex: 0 0 40%;
    }
}

/* Voice Wave Animation */
.voice-wave {
    display: inline-block;
    width: 3px;
    height: 20px;
    background: linear-gradient(to top, #06b6d4, #22d3ee);
    margin: 0 2px;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.voice-wave:nth-child(2) { animation-delay: 0.1s; }
.voice-wave:nth-child(3) { animation-delay: 0.2s; }
.voice-wave:nth-child(4) { animation-delay: 0.3s; }
.voice-wave:nth-child(5) { animation-delay: 0.4s; }

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

/* Input Focus Effects */
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2),
                0 0 20px rgba(6, 182, 212, 0.1);
}

/* Button Hover Glow */
button:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* Telegram Integration Indicator */
.telegram-active {
    animation: telegram-pulse 2s infinite;
}

@keyframes telegram-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* Chat Message Animations */
.message-enter {
    animation: slideIn 0.3s ease-out forwards;
}

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

/* Arc Reactor Glow */
.arc-glow {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5),
                inset 0 0 20px rgba(245, 158, 11, 0.2);
}

/* Responsive Typography */
@media (max-height: 600px) {
    #jarvis-orb {
        width: 10rem;
        height: 10rem;
    }
    
    .mt-8 {
        margin-top: 1rem;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #020617;
    }
}

/* Selection Color */
::selection {
    background: rgba(6, 182, 212, 0.3);
    color: white;
}

/* Loading Spinner */
.jarvis-spinner {
    border: 3px solid rgba(6, 182, 212, 0.1);
    border-top-color: #06b6d4;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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