/* Ambient Sound Mixer Custom Styles */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Main Controls Card */
.main-controls {
    background: white;
    padding: 30px;
    margin-bottom: 25px;
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
}

.master-volume {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 10px;
}

.master-volume label {
    font-weight: 600;
    color: #495057;
}

.master-volume input[type="range"] {
    width: 200px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;
    border-radius: 4px;
    outline: none;
}

.master-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.master-volume input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
}

#masterVolumeValue {
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.preset-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.preset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.preset-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.preset-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.preset-description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.preset-sounds {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Sound Grid */
.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.sound-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.sound-card:hover {
    border-color: #667eea;
}

.sound-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.sound-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.sound-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-icon {
    font-size: 2rem;
}

.sound-name {
    font-weight: 600;
    color: #495057;
}

.sound-toggle {
    background: #dee2e6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    background: #667eea;
    color: white;
}

.sound-toggle.active {
    background: #667eea;
    color: white;
}

.sound-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.sound-volume {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-volume label {
    font-size: 0.9rem;
    color: #6c757d;
    min-width: 60px;
}

.sound-volume input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;
    border-radius: 3px;
    outline: none;
}

.sound-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.sound-volume input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
}

.sound-volume-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    min-width: 45px;
    text-align: right;
}

/* Saved Mixes */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.saved-mixes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-mix-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.saved-mix-item:hover {
    background: #e9ecef;
}

.saved-mix-info {
    flex: 1;
}

.saved-mix-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.saved-mix-sounds {
    font-size: 0.85rem;
    color: #6c757d;
}

.saved-mix-date {
    font-size: 0.8rem;
    color: #adb5bd;
}

.saved-mix-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    animation: modalFadeIn 0.3s;
}

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

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Info Card */
.info-card {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
}

.info-card p {
    margin-bottom: 15px;
    color: #495057;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    color: #495057;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    padding: 30px 0;
    opacity: 0.9;
}

.footer p {
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .playback-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-large {
        width: 100%;
    }

    .master-volume {
        justify-content: center;
    }

    .preset-grid,
    .sound-grid {
        grid-template-columns: 1fr;
    }
}

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

.playing-indicator {
    display: inline-block;
    animation: pulse 1.5s infinite;
    margin-left: 5px;
}
