/* Mobile-First Audio Scout Styles */

.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-georgia {
    font-family: 'Georgia', serif;
}

/* OLED-Optimized True Black Theme */
body {
    background-color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-friendly tap targets (minimum 44px) */
button, input[type="range"], .touch-manipulation {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Discrete waveform animation optimized for mobile */
@keyframes breathing {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

@keyframes waveform-pulse {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.1); }
    100% { transform: scaleY(1); }
}

/* Record button pulse effect for mobile */
@keyframes recordPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.1);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

.record-pulse {
    animation: recordPulse 2s infinite;
}

/* Custom teleprompter scrollbar - mobile optimized */
.teleprompter-scroll::-webkit-scrollbar {
    width: 8px;
}

.teleprompter-scroll::-webkit-scrollbar-track {
    background: rgba(45, 55, 72, 0.3);
    border-radius: 4px;
}

.teleprompter-scroll::-webkit-scrollbar-thumb {
    background: #48BB78;
    border-radius: 4px;
}

.teleprompter-scroll::-webkit-scrollbar-thumb:hover {
    background: #38A169;
}

/* Enhanced range slider for mobile */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 44px;
}

input[type="range"]::-webkit-slider-track {
    background: #374151;
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #48BB78;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-track {
    background: #374151;
    height: 6px;
    border-radius: 3px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    background: #48BB78;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Smooth transitions optimized for 60fps */
* {
    transition: color 150ms ease, 
                background-color 150ms ease, 
                border-color 150ms ease, 
                transform 150ms ease,
                opacity 150ms ease;
    will-change: auto;
}

/* Focus states for accessibility */
input:focus,
textarea:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #48BB78;
}

/* Mobile-specific textarea optimization */
@media (max-width: 768px) {
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        line-height: 1.6;
    }
    
    /* Optimize for thumb zone */
    .thumb-zone {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 10;
    }
}

/* Glassmorphism effect - performance optimized */
.glass {
    background: rgba(45, 55, 72, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Confidence highlighting */
.confidence-high {
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 2px;
}

.confidence-medium {
    background-color: rgba(251, 191, 36, 0.1);
    border-radius: 2px;
}

.confidence-low {
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 2px;
}

/* Mobile menu slide animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Battery saving mode - reduce animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    button, input, textarea {
        border: 2px solid currentColor;
    }
}

/* Dark mode optimization for OLED */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #000000;
    }
}

/* Landscape mode adjustments for mobile */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .teleprompter-scroll {
        height: 150px;
    }
    
    .recording-interface {
        padding: 1rem;
    }
}

/* Safe area support for modern mobile devices */
@supports (padding: max(0px)) {
    .safe-area {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Loading state for waveform */
.waveform-loading {
    animation: breathing 2s ease-in-out infinite;
}

/* Professional studio theme variables */
:root {
    --studio-dark: #1A365D;
    --studio-charcoal: #2D3748;
    --studio-mint: #48BB78;
    --studio-black: #000000;
    --thumb-zone-bottom: 80px;
    --thumb-zone-right: 20px;
}