body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    background-color: #1a1a1a !important;
    color: #f8f9fa !important;
    line-height: 1.6;
}

.text-white {
    color: #ffffff !important;
}

.text-muted {
    color: #adb5bd !important;
}

h3, h4, h5 {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.card {
    background-color: #2d2d2d !important;
    border: 1px solid #495057 !important;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card-header {
    background-color: #343a40 !important;
    border-bottom: 1px solid #495057 !important;
    color: #ffffff;
    font-weight: 600;
}

.card-body {
    color: #f8f9fa;
}

.form-label {
    color: #e9ecef !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-select {
    background-color: #343a40 !important;
    border: 1px solid #495057 !important;
    color: #ffffff !important;
    border-radius: 8px;
}

.form-select:focus {
    background-color: #343a40 !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    color: #ffffff !important;
}

.form-select option {
    background-color: #343a40;
    color: #ffffff;
    padding: 0.5rem;
}

.form-check-label {
    color: #e9ecef !important;
    font-weight: 500;
}

/* Animación para indicadores de activación */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    15% {
        opacity: 1;
        transform: translateX(0);
    }
    85% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Pulso para elementos activos */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.status-active {
    animation: pulse 2s infinite;
    color: #28a745;
    text-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
}

.status-inactive {
    font-size: 4rem;
    color: #6c757d;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes pulse-glow {
    0% { 
        transform: scale(1); 
        text-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    }
    50% { 
        transform: scale(1.1); 
        text-shadow: 0 0 30px rgba(40, 167, 69, 1), 0 0 40px rgba(40, 167, 69, 0.8);
    }
    100% { 
        transform: scale(1); 
        text-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    }
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    text-shadow: none;
    border: none;
}

.btn-primary {
    background-color: #0d6efd;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #bb2d3b;
}

.btn-outline-light {
    border: 1px solid #dee2e6;
    color: #dee2e6;
}

.btn-outline-light:hover {
    background-color: #dee2e6;
    color: #212529;
}

.form-range {
    background: transparent;
}

.form-range::-webkit-slider-track {
    background: #495057;
    border-radius: 5px;
    height: 8px;
}

.form-range::-webkit-slider-thumb {
    background: #0d6efd;
    border: none;
    border-radius: 50%;
    height: 20px;
    width: 20px;
}

.form-range::-moz-range-track {
    background: #495057;
    border-radius: 5px;
    height: 8px;
    border: none;
}

.form-range::-moz-range-thumb {
    background: #0d6efd;
    border: none;
    border-radius: 50%;
    height: 20px;
    width: 20px;
}

.text-primary {
    color: #66b3ff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.text-success {
    color: #66d9a6 !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.text-warning {
    color: #ffeb99 !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

small {
    color: #adb5bd !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#volume-display {
    color: #66b3ff;
    font-weight: 600;
}

#next-alert {
    font-size: 1.1rem;
    color: #ffc107 !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.logo-header {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.logo-header:hover {
    transform: scale(1.05);
}

.app-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-header {
        width: 60px;
        height: 60px;
    }
    
    .app-title {
        font-size: 1.4rem;
    }
    
    .status-active,
    .status-inactive {
        font-size: 3rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* PWA específico */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mejoras de accesibilidad */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Animación suave para transiciones */
.card, .btn, .form-select, .form-range {
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Indicador de carga para audio */
.audio-loading {
    opacity: 0.6;
    pointer-events: none;
}
