/* Audio Scout Teleprompter - Ultra-Clean Mobile Recording Studio */

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

/* Ensure smooth 60fps animations */
* {
    transition: color 200ms ease-out, 
                background-color 200ms ease-out, 
                border-color 200ms ease-out, 
                transform 200ms ease-out,
                opacity 200ms ease-out;
}

/* Touch-optimized button sizes */
button, .touch-manipulation {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Custom animations for record button */
@keyframes gentlePulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes pulseRing {
    0% {
        opacity: 0.8;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

/* Smooth backdrop blur for header */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

/* Teleprompter-specific styles */
.teleprompter-text {
    user-select: none;
    cursor: pointer;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.teleprompter-highlight {
    background: rgba(59, 130, 246, 0.2);
    padding: 0 4px;
    border-radius: 4px;
}

/* Smooth scrolling for teleprompter */
.teleprompter-scroll {
    scroll-behavior: smooth;
}

/* Header navigation hover effects */
nav button:hover {
    transform: translateY(-1px);
}

/* Enhanced card shadows */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .teleprompter-scroll {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    button {
        border: 2px solid currentColor;
    }
    
    .teleprompter-text {
        text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
    }
}

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

/* Optimized for one-handed use */
@media (max-width: 768px) {
    /* Position record button in thumb-friendly zone */
    .fixed.bottom-6 {
        bottom: max(24px, env(safe-area-inset-bottom, 24px));
    }
    
    /* Ensure transcript doesn't interfere with thumb zone */
    .transcript-panel {
        bottom: max(140px, calc(120px + env(safe-area-inset-bottom)));
    }
    
    /* Mobile-optimized teleprompter text */
    .teleprompter-text {
        padding: 0 16px;
        text-align: left;
    }
    
    /* Touch-friendly menu items */
    nav button {
        padding: 12px 16px;
        border-radius: 8px;
        width: 100%;
        text-align: left;
    }
}

/* Landscape mobile adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .fixed.bottom-6 {
        bottom: 16px;
    }
    
    .pt-20 {
        padding-top: 60px;
    }
}

/* Clean loading spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Typography optimizations */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iOS input zoom prevention */
@media (max-width: 768px) {
    input[type="text"],
    input[type="range"],
    textarea {
        font-size: 16px;
    }
}

/* Gesture-friendly spacing */
.touch-target {
    padding: 12px;
    margin: 4px;
}

/* Visual hierarchy through subtle opacity changes */
.text-soft-gray {
    color: #71717A;
}

.border-subtle-border {
    border-color: #E4E4E7;
}

.bg-soft-bg {
    background-color: #FAFAFA;
}

/* Minimal scrollbar styling */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #E4E4E7;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4D4D8;
}

/* Enhanced mobile menu animations */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms ease-out, transform 200ms ease-out;
}

/* Teleprompter controls styling */
.teleprompter-controls {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Range input styling for better mobile experience */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #E4E4E7;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    border: none;
}

/* Improved button hover states */
button {
    transition: all 200ms ease-out;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Enhanced accessibility for color contrast */
@media (prefers-color-scheme: dark) {
    /* Dark mode support can be added here if needed */
}

/* Record button pulse animation optimization */
.record-button-ring {
    animation: recordPulse 2s ease-in-out infinite;
}

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

/* Error state styling */
.error-state {
    color: #EF4444;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 12px;
}

/* Success state styling */
.success-state {
    color: #10B981;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    padding: 12px;
}

/* Transcript confidence indicators */
.confidence-high { opacity: 1; }
.confidence-medium { opacity: 0.8; }
.confidence-low { 
    opacity: 0.6; 
    text-decoration: underline dotted;
}