/* Smart Radio Recorder Styling */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Enhanced focus states */
input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Button hover effects */
button:hover:not(:disabled) {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Volume slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
}

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

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    border: none;
}

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

/* Connection status animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Permission status styling */
.permission-requesting {
    animation: pulse 1s infinite;
}

/* VU Meter styling */
.vu-meter-bar {
    transition: background-color 0.1s ease-out;
}

/* Recording button styles */
.recording-button {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.recording-button.active {
    animation: pulse 1s infinite;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.8);
}

/* Card shadows and depth */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Audio player styling */
audio {
    height: 40px;
    border-radius: 8px;
    outline: none;
}

audio::-webkit-media-controls-panel {
    background-color: #f8fafc;
    border-radius: 8px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .flex-col.md\\:flex-row {
        flex-direction: column;
    }
    
    .space-x-6 > * + * {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .w-32 {
        width: 6rem;
    }
}

/* Typography improvements */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Enhanced button states */
button {
    transition: all 0.2s ease-in-out;
}

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

/* Status indicator improvements */
.status-dot {
    position: relative;
}

.status-dot.connected::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Source button enhancements */
.source-button {
    position: relative;
    overflow: hidden;
}

.source-button.needs-permission::before {
    content: '🔒';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Recording indicators */
.recording-pulse {
    animation: pulse 1s ease-in-out infinite;
}

/* Level meter enhancements */
.level-meter {
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.1));
    border-radius: 8px;
}

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

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success states */
.success-pulse {
    animation: pulse 0.5s ease-in-out 3;
}