/* Sleep page specific styles */

/* Full-screen Hero Section */
.sleep-hero.full-screen {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
    color: white;
}

.sleep-hero[data-bg="night-rain"] {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.80) 100%),
                url('https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=1920') center/cover no-repeat fixed;
}

.sleep-hero[data-bg="starry-sky"] {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.90) 0%, rgba(30, 41, 59, 0.85) 100%),
                url('https://images.unsplash.com/photo-1446776653964-20c1d3a81b06?w=1920') center/cover no-repeat fixed;
}

.sleep-hero[data-bg="distant-thunder"] {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88) 0%, rgba(51, 65, 85, 0.80) 100%),
                url('https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?w=1920') center/cover no-repeat fixed;
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.sleep-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Background Options - Positioned on the side */
.background-options {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.background-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.background-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.background-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Bedtime Breathing Section */
.bedtime-breathing {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: white;
    text-align: center;
}

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

.bedtime-breathing h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    font-weight: 300;
}

.breathing-rhythm-section {
    margin-bottom: 3rem;
}

.breathing-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    font-weight: 400;
}

.rhythm-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.rhythm-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.rhythm-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.rhythm-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.rhythm-default {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.breathing-guide {
    margin: 3rem 0;
}

/* Breathing Visual - Diffusing Circles */
.breathing-visual {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-outer,
.circle-middle,
.circle-inner {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.circle-outer {
    width: 100%;
    height: 100%;
    animation: diffuse-outer 10s ease-in-out infinite;
}

.circle-middle {
    width: 70%;
    height: 70%;
    animation: diffuse-middle 10s ease-in-out infinite 2s;
}

.circle-inner {
    width: 40%;
    height: 40%;
    animation: diffuse-inner 10s ease-in-out infinite 4s;
}

.breathing-visual.active .circle-outer,
.breathing-visual.active .circle-middle,
.breathing-visual.active .circle-inner {
    animation-play-state: running;
}

.breathing-control {
    margin-bottom: 1rem;
}

.breathing-note {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-top: 1rem;
}

/* Sleep Sounds Section */
.sleep-sounds {
    padding: 6rem 2rem;
    background: #f8f9fa;
    text-align: center;
}

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

.sleep-sounds h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: #1a202c;
    font-weight: 300;
}

.sounds-purpose {
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.sounds-purpose h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
    font-weight: 400;
}

.sounds-purpose ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.sounds-purpose li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: #4a5568;
    padding-left: 1.5rem;
    position: relative;
}

.sounds-purpose li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1.5rem;
    line-height: 1;
}

.sounds-types h3 {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: #2d3748;
    font-weight: 400;
}

.sound-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Card-style Sound Selection */
.sound-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.sound-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sound-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

.sound-card:hover::before {
    transform: scaleX(1);
}

.sound-card.playing {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.sound-card.playing::before {
    transform: scaleX(1);
}

.sound-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.sound-card h4 {
    font-size: 1.25rem;
    margin: 0;
    color: #2d3748;
    font-weight: 500;
}

.sound-play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
}

.sound-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.sound-play-btn.playing {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sound-play-btn .play-icon {
    font-size: 0.8rem;
}

.sound-audio {
    display: none;
}

/* Deep Sleep Tip Section */
.deep-sleep-tip {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    text-align: center;
}

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

.deep-sleep-tip h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.4;
}

.tip-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.tip-content {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.7;
    min-height: 3rem;
    transition: opacity 0.3s ease;
}

.tip-switch-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.tip-switch-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Gentle Reminder Section - Whisper Style */
.gentle-reminder {
    padding: 4rem 2rem;
    background: #f8f9fa;
    text-align: center;
}

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

.reminder-text {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.8;
    font-style: italic;
    opacity: 0.6;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes diffuse-outer {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
}

@keyframes diffuse-middle {
    0%, 100% {
        transform: scale(0.7);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

@keyframes diffuse-inner {
    0%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    50% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .background-options {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .sleep-hero.full-screen {
        min-height: calc(100vh - 70px);
    }
    
    .background-options {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin-top: 2rem;
        gap: 0.75rem;
    }
    
    .background-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
    
    .breathing-visual {
        width: 250px;
        height: 250px;
    }
    
    .sound-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sound-card {
        padding: 1.5rem;
    }
    
    .tip-content {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .sleep-hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .breathing-visual {
        width: 200px;
        height: 200px;
    }
    
    .bedtime-breathing,
    .sleep-sounds,
    .deep-sleep-tip {
        padding: 4rem 1.5rem;
    }
    
    .gentle-reminder {
        padding: 3rem 1.5rem;
    }
    
    .reminder-text {
        font-size: 0.85rem;
    }
}
