* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2d6a4f;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 0;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2d6a4f;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #40916c;
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
    color: #555;
}

.intro {
    background: #d8f3dc;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #95d5b2;
    margin-bottom: 30px;
}

.instructions {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.instructions ol {
    margin-left: 20px;
    margin-top: 10px;
}

.instructions li {
    margin-bottom: 10px;
    color: #555;
}

.audio-controls {
    background: #e9f5f0;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
}

.volume-control {
    margin-bottom: 30px;
}

.volume-control label {
    display: block;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-slider {
    flex: 1;
    height: 50px;
    -webkit-appearance: none;
    appearance: none;
    background: #95d5b2;
    border-radius: 25px;
    outline: none;
    cursor: pointer;
}

.volume-slider:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 60px;
    background: #2d6a4f;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb {
    width: 60px;
    height: 60px;
    background: #2d6a4f;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.volume-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #2d6a4f;
    min-width: 60px;
    text-align: center;
}

.sound-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sound-button {
    width: 100%;
    padding: 25px;
    font-size: 1.3em;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.sound-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.sound-button:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 3px;
}

.sound-button:active {
    transform: translateY(0);
}

.sound-button.playing {
    animation: pulse 0.5s ease-in-out;
}

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

.btn-fireworks {
    background: linear-gradient(135deg, #e63946 0%, #f77f00 100%);
}

.btn-thunder {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
}

.btn-barking {
    background: linear-gradient(135deg, #40916c 0%, #2d6a4f 100%);
}

/* Sound Effect Loop Styles */
.loop-controls {
    background: #fff4e6;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
}

.loop-description {
    margin-bottom: 20px;
}

.loop-description p {
    color: #555;
    font-style: italic;
}

.loop-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.category-select label,
.delay-input label {
    display: block;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.category-dropdown {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1em;
    border: 2px solid #95d5b2;
    border-radius: 10px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.category-dropdown:hover {
    border-color: #52b788;
}

.category-dropdown:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 2px;
    border-color: #2d6a4f;
}

.delay-input-field {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1em;
    border: 2px solid #95d5b2;
    border-radius: 10px;
    background: white;
    color: #333;
    transition: border-color 0.3s ease;
}

.delay-input-field:hover {
    border-color: #52b788;
}

.delay-input-field:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 2px;
    border-color: #2d6a4f;
}

.loop-button-container {
    display: flex;
    justify-content: center;
}

.loop-button {
    width: 100%;
    padding: 20px 40px;
    font-size: 1.3em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #52b788 0%, #2d6a4f 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.loop-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.loop-button:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 3px;
}

.loop-button:active {
    transform: translateY(0);
}

.loop-button.loop-active {
    background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
    animation: pulse-slow 2s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

.loop-countdown {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-align: center;
    border: 3px solid #95d5b2;
}

.countdown-label {
    font-size: 1em;
    color: #555;
    font-weight: 500;
    margin-bottom: 10px;
}

.countdown-timer {
    font-size: 3em;
    font-weight: bold;
    color: #2d6a4f;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-sublabel {
    font-size: 0.9em;
    color: #777;
    font-style: italic;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    color: #777;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .sound-button {
        padding: 20px;
        font-size: 1.1em;
    }
    
    .loop-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    
    .loop-controls {
        padding: 20px;
    }
}

/* White Noise Page Specific Styles */
.audio-player-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid #e8f5e9;
}

.audio-player-card h3 {
    color: #2d6a4f;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.player-description {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 20px;
    font-style: italic;
}

.player-controls {
    margin-top: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, #52b788 0%, #40916c 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #40916c 0%, #2d6a4f 100%);
    transform: translateY(-2px);
}

.btn-primary.playing {
    background: linear-gradient(135deg, #d62828 0%, #9d0208 100%);
}

.btn-primary.playing:hover {
    background: linear-gradient(135deg, #9d0208 0%, #6a040f 100%);
}

.navigation-links {
    text-align: center;
    margin: 30px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #95d5b2 0%, #74c69d 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, #74c69d 0%, #52b788 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

.nav-link:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 3px;
}

.therapy-type {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid #52b788;
}

.therapy-type h3 {
    color: #2d6a4f;
    font-size: 1.6em;
    margin-bottom: 15px;
}

.therapy-type ul {
    margin-left: 20px;
    margin-top: 10px;
}

.therapy-type li {
    margin-bottom: 8px;
    color: #555;
}

.therapy-type .navigation-links {
    margin-top: 20px;
    margin-bottom: 0;
}

/* PWA Install Button Styles */
#pwa-install-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin: 20px 0;
    background: linear-gradient(135deg, #95D5B2 0%, #7FC09E 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(149, 213, 178, 0.3);
    animation: slideDown 0.3s ease-out;
}

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

.pwa-install-btn {
    background: white;
    color: #2d6a4f;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 44px;
    min-width: 44px;
}

.pwa-install-btn:hover {
    background: #f0f9f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-install-btn:focus {
    outline: 3px solid #2d6a4f;
    outline-offset: 2px;
}

.pwa-install-btn:active {
    transform: translateY(0);
}

.pwa-dismiss-btn {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    line-height: 1;
}

.pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.pwa-dismiss-btn:focus {
    outline: 3px solid white;
    outline-offset: 2px;
}

.pwa-dismiss-btn:active {
    transform: scale(0.95);
}

/* PWA Update Notification Styles */
.pwa-update-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 500px;
    width: calc(100% - 40px);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.pwa-update-content {
    padding: 20px;
}

.pwa-update-message {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: white;
}

.pwa-update-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.pwa-update-btn {
    background: white;
    color: #2d6a4f;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 44px;
    flex: 1;
    max-width: 200px;
}

.pwa-update-btn:hover {
    background: #f0f9f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-update-btn:focus {
    outline: 3px solid white;
    outline-offset: 2px;
}

.pwa-update-btn:active {
    transform: translateY(0);
}

.pwa-update-dismiss-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    flex: 1;
    max-width: 120px;
}

.pwa-update-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.pwa-update-dismiss-btn:focus {
    outline: 3px solid white;
    outline-offset: 2px;
}

.pwa-update-dismiss-btn:active {
    transform: scale(0.95);
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
    #pwa-install-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 12px 12px 0 0;
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .pwa-install-btn {
        flex: 1;
    }
    
    .pwa-update-toast {
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateX(0);
        max-width: 100%;
        width: 100%;
        border-radius: 12px 12px 0 0;
    }
    
    .pwa-update-actions {
        flex-direction: column;
    }
    
    .pwa-update-btn,
    .pwa-update-dismiss-btn {
        max-width: 100%;
        width: 100%;
    }
}

