﻿/* ===== CSS Variables ===== */
:root {
    --primary-color: #4361ee;
    --secondary-color: #ff6b35;
    --accent-color: #9b51e0;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --dark-color: #1a202c;
    --gray-color: #4a5568;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
    --calculator-bg: rgba(26, 32, 44, 0.9);
}

/* ===== Reset & Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    transition: var(--transition);
}

/* ===== Utility Classes ===== */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

/* ===== Accessibility ===== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ===== Animations ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseBackground {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes cycleBreath {

    0%,
    100% {
        height: 20px;
    }

    50% {
        height: 40px;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(74, 111, 165, 0.5);
    }

    to {
        box-shadow: 0 0 30px rgba(74, 111, 165, 0.8), 0 0 40px rgba(107, 72, 255, 0.4);
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }

    50% {
        opacity: 1;
        transform: translate(var(--x, 0), var(--y, 0)) scale(1);
    }
}

@keyframes floatIcon {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(100vw, 100vh) rotate(360deg);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(100px, 50px) rotate(90deg);
    }

    50% {
        transform: translate(50px, 100px) rotate(180deg);
    }

    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes cycleBarAnimation {

    0%,
    100% {
        height: 20px;
    }

    50% {
        height: 40px;
    }
}

/* Time Indicator Styles moved to style.css to avoid duplication */

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 60px 0 60px;
    /* Reduced from 100px to remove extra space */
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1) 0%, rgba(255, 107, 53, 0.05) 100%);
    overflow: hidden;
    /*min-height: 70vh;*/
    display: flex;
    align-items: center;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(74, 111, 165, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    animation: pulseBackground 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-text {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.highlight {
    color: var(--secondary-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: rgba(255, 107, 53, 0.2);
    z-index: -1;
    transform: skewX(-15deg);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-animation-area {
    margin: 2rem auto;
    max-width: 600px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(74, 111, 165, 0.3);
    margin-bottom: 2rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 111, 165, 0.4);
}

.cycle-visual-hero {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    height: 80px;
    align-items: flex-end;
}

.cycle-bar-hero {
    width: 20px;
    background: linear-gradient(to top, var(--primary-color), var(--accent-color));
    border-radius: 8px 8px 0 0;
    animation: cycleBreath 2s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.2s);
}

.cycle-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
}

.scroll-indicator {
    margin-top: 3rem;
    color: var(--primary-color);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(74, 111, 165, 0.3);
    animation: floatIcon 20s linear infinite;
    animation-delay: calc(var(--delay) * -5s);
}

@media (max-width: 768px) {
    .floating-icon {
        display: none;
        /* Hide floating icons on mobile for performance */
    }

    .hero-bg-animation {
        animation: none;
        /* Disable pulse animation on mobile */
        background: radial-gradient(circle at 20% 50%, rgba(74, 111, 165, 0.1) 0%, transparent 60%);
    }


    .scroll-indicator {
        animation: none;
        /* Disable bounce */
        opacity: 0.8;
    }
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: -80px auto 50px;
    position: relative;
    z-index: 10;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ===== Calculator Section ===== */
.calculator-section {
    padding: 4rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-color);
    font-size: 2rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Visual Feedback */
.visual-feedback {
    margin-bottom: 2rem;
}

.feedback-bar {
    height: 10px;
    background: linear-gradient(to right, var(--danger-color), var(--warning-color), var(--success-color));
    border-radius: 5px;
    margin-bottom: 5px;
    overflow: hidden;
}

.feedback-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 1s ease;
    border-radius: 5px;
}

.feedback-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Calculator Inputs Layout */
.calculator-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Mode Selector */
.mode-selector-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-btn-vertical {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(74, 111, 165, 0.1);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.mode-btn-vertical.active {
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1), rgba(107, 72, 255, 0.1));
    border-color: var(--primary-color);
}

.mode-btn-vertical:hover:not(.active) {
    border-color: var(--primary-color);
    background: rgba(74, 111, 165, 0.05);
}

.mode-icon-container {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.mode-content {
    flex: 1;
}

.mode-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.mode-description {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Input Sections */
.input-section-compact {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    border: 1px solid rgba(74, 111, 165, 0.2);
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Age Dropdown */
.age-dropdown-container {
    margin-bottom: 1.5rem;
}

.age-dropdown {
    position: relative;
}

.age-dropdown-toggle {
    width: 100%;
    padding: 15px;
    background: white;
    border: 2px solid rgba(74, 111, 165, 0.2);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.age-dropdown-toggle:hover {
    border-color: var(--primary-color);
}

.age-selected-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.age-selected-icon {
    font-size: 1.2rem;
}

.age-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    z-index: 100;
    display: none;
}

.age-dropdown-menu.active {
    display: block;
}

.age-option {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.age-option:hover {
    background: rgba(74, 111, 165, 0.1);
}

.age-option-icon {
    font-size: 1.5rem;
    width: 30px;
}

/* Time Input */
.time-input-compact label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
}

.time-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.time-input-row input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(74, 111, 165, 0.2);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.time-input-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.time-preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.time-preset {
    padding: 10px;
    background: rgba(74, 111, 165, 0.1);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
    cursor: pointer;
}

.time-preset:hover {
    background: var(--primary-color);
    color: white;
}

/* Cycle Visual */
.cycle-visual {
    margin: 20px 0;
}

.cycle-bars {
    display: flex;
    gap: 5px;
    height: 60px;
    align-items: flex-end;
}

.cycle-bar {
    flex: 1;
    background: linear-gradient(to top, #e0e0e0, #b0b0b0);
    border-radius: 5px 5px 0 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 10px;
}

.cycle-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3));
}

.cycle-bar.active {
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
    transform: scaleY(1.1);
}

/* Cycle Controls */
.cycle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

.cycle-display {
    text-align: center;
    min-width: 150px;
}

#cycle-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    display: block;
}

#cycle-hours {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.cycle-slider {
    margin-top: 1rem;
}

.cycle-slider input[type="range"] {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--danger-color), var(--warning-color), var(--success-color));
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.cycle-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Calculate Button */
.calculate-button {
    width: 19%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.glow-effect {
    animation: glow 2s ease-in-out infinite alternate;
}

.button-sparkle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    animation: sparkle 1.5s infinite;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(220, 53, 69, 0.2);
    text-align: center;
    margin-top: 1rem;
    display: none;
}

/* ===== Results Section ===== */
.results-section {
    animation: fadeIn 0.5s ease;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.result-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.result-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.result-card.recommended {
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1), rgba(107, 72, 255, 0.1));
    border-color: var(--primary-color);
}

.cycle-count {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.result-time {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.result-duration {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Best Result Card */
.best-result-card {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1), rgba(107, 72, 255, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
}

.best-result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.best-result-header i {
    color: #FFD700;
    font-size: 2rem;
}

.best-result-header h3 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.best-result-content {
    text-align: center;
}

.time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.time-block {
    text-align: center;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.time-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.time-separator {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.duration-display {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 111, 165, 0.2);
}

.duration-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-right: 10px;
}

.duration-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.duration-note {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-left: 10px;
}

/* ===== Affiliate Products ===== */
.affiliate-products {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(107, 72, 255, 0.05));
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.affiliate-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.affiliate-title i {
    color: #FFD700;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.product-content {
    padding-left: 0.75rem;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-description {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.product-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

/* ===== Recommendation ===== */
.recommendation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(107, 72, 255, 0.05));
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--border-radius);
}

.recommendation-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), #ff9d35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recommendation-content {
    flex: 1;
}

.recommendation-content p {
    margin-bottom: 10px;
    color: var(--gray-color);
}

.recommendation-content .note {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-style: italic;
}

/* ===== Share Results ===== */
.share-results {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    background: rgba(74, 111, 165, 0.1);
    border: none;
    border-radius: 50px;
    font-weight: 500;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===== Calculate Again ===== */
.calculate-again-container {
    text-align: center;
    margin-top: 2rem;
}

.calculate-again-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--secondary-color), #ff9d35);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.calculate-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

/* ===== Sleep Cycle Visualizer ===== */
.visualizer-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(107, 72, 255, 0.05), rgba(74, 111, 165, 0.05));
}

.sleep-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sleep-stage {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.sleep-stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.sleep-stage[data-stage="awake"] {
    border-bottom: 4px solid var(--danger-color);
}

.sleep-stage[data-stage="light"] {
    border-bottom: 4px solid var(--warning-color);
}

.sleep-stage[data-stage="deep"] {
    border-bottom: 4px solid var(--info-color);
}

.sleep-stage[data-stage="rem"] {
    border-bottom: 4px solid var(--accent-color);
}

.stage-percentage {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stage-description {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.visualization-timeline {
    height: 60px;
    background: rgba(74, 111, 165, 0.1);
    border-radius: 30px;
    margin: 2rem 0;
    overflow: hidden;
    display: flex;
}

.timeline-bar {
    height: 100%;
    transition: all 1s ease;
}

.timeline-bar.awake {
    background: var(--danger-color);
    width: 5%;
}

.timeline-bar.light {
    background: var(--warning-color);
    width: 50%;
}

.timeline-bar.deep {
    background: var(--info-color);
    width: 20%;
}

.timeline-bar.rem {
    background: var(--accent-color);
    width: 25%;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.visualizer-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.visualizer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 111, 165, 0.3);
}

/* ===== Sleep Tips Section ===== */
.tips-section {
    padding: 4rem 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.tip-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.tip-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tip-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.tip-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.tip-card p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* Sleep Tips Button */
.sleep-tips-button-container {
    text-align: center;
    margin-top: 3rem;
}

.sleep-tips-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.sleep-tips-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 111, 165, 0.3);
    gap: 20px;
}

/* ===== Info Section ===== */
.info-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.info-section h2 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

.info-section h2 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* ===== Global Sleep Insights ===== */
.global-sleep-insights {
    margin: 3rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8f4fc;
    max-width: 1200px;
}

.global-sleep-insights h2 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1rem;
    border-bottom: 3px solid #4361ee;
    font-weight: 700;
}

.global-sleep-insights h2 i {
    color: #4361ee;
    font-size: 1.8rem;
}

.country-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.country-insight {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.8rem;
    border-left: 5px solid #4361ee;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.country-insight:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.15);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.2rem;
}

.country-code {
    background: #4361ee;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 8px;
    min-width: 45px;
    text-align: center;
}

.country-name {
    color: var(--dark-color);
    font-size: 1.4rem;
    margin: 0;
    font-weight: 700;
}

.country-description {
    color: var(--gray-color);
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
    font-size: 1.05rem;
    flex-grow: 1;
}

.country-stat {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    color: #2d3748;
    font-size: 1rem;
    border-left: 4px solid #2ecc71;
    font-weight: 600;
    margin-top: auto;
}

/* Sleep Hygiene Section */
.sleep-hygiene-section {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 2.2rem;
}

.hygiene-title {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hygiene-title i {
    color: #f72585;
}

.hygiene-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hygiene-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: var(--gray-color);
    line-height: 1.6;
    padding: 0.8rem 0;
    font-size: 1.05rem;
    transition: var(--transition);
    border-bottom: 1px solid #e2e8f0;
}

.hygiene-checklist li:last-child {
    border-bottom: none;
}

.hygiene-checklist li:hover {
    color: var(--dark-color);
    padding-left: 8px;
}

.check-icon {
    color: #2ecc71;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 2px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.temperature {
    background: #e3f2fd;
    padding: 4px 10px;
    border-radius: 6px;
    color: #1a56db;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.95rem;
    margin: 0 5px;
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(107, 72, 255, 0.05));
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.faq-item {
    background: white;
    /*padding: 2rem;*/
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.faq-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item h3::before {
    content: "Q:";
    color: var(--primary-color);
    font-weight: 700;
}

.faq-item p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* ===== Page Styles (Tips/Legal) ===== */
.page-hero {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease-out;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.content-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.content-card h3,
.content-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.8rem;
}

.content-card>p {
    color: var(--gray-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--gray-color);
    transition: var(--transition);
}

.info-list li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.info-list li i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-table thead {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
}

.info-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.info-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.info-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

.info-table td {
    padding: 15px;
    color: var(--gray-color);
}

.info-table td:first-child {
    font-weight: 600;
    color: var(--dark-color);
}

/* FAQ Container */
.faq-container {
    margin-top: 30px;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(76, 201, 240, 0.05) 100%);
}

.faq-question:hover {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--gray-color);
}

.faq-answer strong {
    color: var(--dark-color);
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Legal Sections */
.legal-content {
    margin: 40px 0;
}

.legal-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.legal-section h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

.legal-section p {
    line-height: 1.7;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.legal-section ul {
    margin: 15px 0 15px 20px;
    padding-left: 0;
}

.legal-section ul li {
    list-style-type: disc;
    margin-bottom: 10px;
    color: var(--gray-color);
    line-height: 1.6;
    padding-left: 5px;
}

.legal-section ul li::marker {
    color: var(--primary-color);
}

.legal-section ol {
    margin: 15px 0 15px 20px;
    padding-left: 0;
}

.legal-section ol li {
    list-style-type: decimal;
    margin-bottom: 10px;
    color: var(--gray-color);
    line-height: 1.6;
    padding-left: 5px;
}

.last-updated {
    text-align: center;
    margin-top: 60px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(76, 201, 240, 0.05) 100%);
    border-radius: 15px;
    color: var(--gray-color);
}

.last-updated i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Special Sections */
.content-section[style*="background: rgba(239,68,68,0.05)"] {
    background: rgba(239, 68, 68, 0.05);
    border-left: 4px solid #ef4444;
    animation: pulse 2s infinite;
}

.content-section[style*="background: rgba(245,158,11,0.05)"] {
    background: rgba(245, 158, 11, 0.05);
    border-left: 4px solid #f59e0b;
}

.content-section[style*="background: rgba(76,201,240,0.05)"] {
    background: rgba(76, 201, 240, 0.05);
    border-left: 4px solid #4cc9f0;
}

/* Disclaimer Section */
.disclaimer-section {
    margin: 3rem auto;
    padding: 0;
    background: #ffffffa6;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    width: calc(100% - 40px);
}

.disclaimer-section .container-narrow {
    padding: 2.5rem 20px;
}

.disclaimer-content {
    position: relative;
    padding: 30px;
    z-index: 2;
}

.disclaimer-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #fecaca;
}

.disclaimer-header i {

    font-size: 2rem;
    flex-shrink: 0;
}

.disclaimer-header h2 {

    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.disclaimer-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.disclaimer-main {

    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.disclaimer-note {
    background: #ffffff;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.disclaimer-note i {
    color: #f59e0b;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.disclaimer-note p {
    color: #1a202c;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Sources & References Section */
.sources-section {
    margin: 3rem auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #dbeafe;
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    width: calc(100% - 40px);
}

.sources-section .container-narrow {
    padding: 2.5rem 20px;
}

.sources-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dbeafe;
}

.sources-header i {
    color: #4361ee;
    font-size: 2rem;
    flex-shrink: 0;
}

.sources-header h2 {
    color: #1a202c;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.source-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.6;
    transition: var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.source-item:hover {
    color: #1a202c;
    transform: translateX(5px);
}

.source-dash {
    color: #4361ee;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: -2px;
}

.source-text {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== Dark Mode ===== */
.dark-mode {
    background-color: #0f1419;
    color: #e2e8f0;
}

.dark-mode .hero {
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.2) 0%, rgba(255, 107, 53, 0.1) 100%);
}

.dark-mode .hero-title,
.dark-mode .section-title,
.dark-mode .mode-title,
.dark-mode .product-title,
.dark-mode .best-result-header h3,
.dark-mode .tip-card h3,
.dark-mode .faq-item h3,
.dark-mode .content-card h3,
.dark-mode .content-card h4,
.dark-mode .legal-section h3,
.dark-mode .page-title,
.dark-mode .global-sleep-insights h2,
.dark-mode .country-name,
.dark-mode .hygiene-title {
    color: #e2e8f0;
}

.dark-mode .hero-subtitle,
.dark-mode .section-subtitle,
.dark-mode .mode-description,
.dark-mode .product-description,
.dark-mode .tip-card p,
.dark-mode .faq-item p,
.dark-mode .stat-label,
.dark-mode .page-subtitle,
.dark-mode .content-card>p,
.dark-mode .country-description,
.dark-mode .hygiene-checklist li,
.dark-mode .legal-section p,
.dark-mode .legal-section ul li,
.dark-mode .legal-section ol li,
.dark-mode .faq-answer p,
.dark-mode .source-item,
.dark-mode .time-label,
.dark-mode .duration-label,
.dark-mode .duration-note,
.dark-mode .result-duration,
.dark-mode .stage-description,
.dark-mode .timeline-labels {
    color: #a0aec0;
}

.dark-mode .tagline {
    color: #cbd5e0;
}

.dark-mode .time-indicator {
    background: rgba(26, 32, 44, 0.9);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .input-section-compact,
.dark-mode .age-dropdown-toggle,
.dark-mode .time-input-row input,
.dark-mode .cycle-slider input[type="range"] {
    background: rgba(26, 32, 44, 0.9);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .age-dropdown-menu,
.dark-mode .time-preset {
    background: rgba(26, 32, 44, 0.95);
    color: #e2e8f0;
}

.dark-mode .time-preset:hover {
    background: var(--primary-color);
    color: white;
}

.dark-mode .result-card,
.dark-mode .sleep-stage,
.dark-mode .glass-effect,
.dark-mode .stats-bar,
.dark-mode .mode-btn-vertical,
.dark-mode .tip-card,
.dark-mode .faq-item,
.dark-mode .global-sleep-insights,
.dark-mode .country-insight,
.dark-mode .sleep-hygiene-section,
.dark-mode .content-card,
.dark-mode .info-section,
.dark-mode .page-hero,
.dark-mode .sources-section {
    background: rgba(26, 32, 44, 0.9);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .mode-btn-vertical.active {
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.2), rgba(107, 72, 255, 0.2));
}

.dark-mode .time-value {
    color: #e2e8f0;
}

.dark-mode a {
    color: #ffffff;
}

.dark-mode a:hover {
    color: #63b3ed;
}

.dark-mode .section-title i,
.dark-mode .mode-icon-container i,
.dark-mode .best-result-header i,
.dark-mode .recommendation-icon i,
.dark-mode .tip-icon i,
.dark-mode .faq-item h3::before {
    color: inherit;
}

.dark-mode .info-section h2 {
    color: #ffffff;
}

.dark-mode .info-table {
    background: rgba(26, 32, 44, 0.9);
}

.dark-mode .info-table th {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.9) 0%, rgba(58, 12, 163, 0.9) 100%);
}

.dark-mode .info-table td {
    color: #cbd5e0;
}

.dark-mode .faq-question {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
}

.dark-mode .legal-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .faq-answer .content-card {
    background: rgba(26, 32, 44, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .faq-answer .content-card h4 {
    color: #ffffff;
}

.dark-mode .faq-answer .info-list li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .last-updated {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
    color: #a0aec0;
}

.dark-mode .legal-content .info-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.1);
}

.dark-mode .faq-answer ul li,
.dark-mode .faq-answer ol li {
    color: #cbd5e0;
}

.dark-mode .content-section[style*="background: rgba(239,68,68,0.05)"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border-left-color: #ef4444;
}

.dark-mode .content-section[style*="background: rgba(245,158,11,0.05)"] {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left-color: #f59e0b;
}

.dark-mode .content-section[style*="background: rgba(76,201,240,0.05)"] {
    background: rgba(76, 201, 240, 0.1) !important;
    border-left-color: #4cc9f0;
}

.dark-mode .disclaimer-section {
    background: #ef44441a;
}

.dark-mode .sources-section {
    background: #1a202ce6;
}

.dark-mode .disclaimer-header h2 {
    color: #d70d0d;
}

.dark-mode .sources-header h2 {
    color: #ffffff;
}

.dark-mode .disclaimer-main,
.dark-mode .disclaimer-note p {
    color: #cbd5e0;
}

.dark-mode .disclaimer-note {
    background: rgba(245, 158, 11, 0.1);
}

.dark-mode .disclaimer-note p {
    color: #ffffff;
}

.dark-mode .source-item:hover {
    color: #ffffff;
}

.dark-mode .hygiene-checklist li:hover {
    color: #ffffff;
}

.dark-mode .temperature {
    background: rgba(26, 86, 219, 0.3);
    color: #63b3ed;
}

.dark-mode .info-list li:hover {
    color: #63b3ed;
}

.dark-mode .country-stat {
    background: #5a6578;
    color: #e2e8f0;
    border-left-color: #2ecc71;
}

.dark-mode .country-stat strong {
    color: #ffffff;
}

.dark-mode .hygiene-checklist li {
    border-bottom-color: #718096;
}

/* ===== Stars Container ===== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .calculator-container {
        padding: 1rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .calculator-inputs {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .country-insights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0 40px;
        /*min-height: 80vh;*/
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .stats-bar {
        margin: -30px auto 30px;
        padding: 1.5rem;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .time-indicator {
        position: static;
        margin: 1rem auto;
        width: fit-content;
        animation: none;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .share-results {
        flex-direction: column;
        align-items: stretch;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .country-insights-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .global-sleep-insights {
        padding: 1.8rem;
        margin: 2rem 1rem;
    }

    .sleep-hygiene-section {
        padding: 1.8rem;
    }

    .disclaimer-section,
    .sources-section {
        margin: 2rem auto;
        /*width: calc(100% - 20px);*/
    }

    .disclaimer-section .container-narrow,
    .sources-section .container-narrow {
        padding: 1.8rem 15px;
    }

    .disclaimer-header,
    .sources-header {
        flex-wrap: wrap;
    }

    .disclaimer-header h2,
    .sources-header h2 {
        font-size: 1.5rem;
    }

    .disclaimer-main {
        font-size: 1rem;
    }

    .disclaimer-note {
        padding: 1.2rem;
        flex-direction: column;
        gap: 10px;
    }

    .source-item {
        font-size: 1rem;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .cta-button {
        padding: 15px 25px;
        font-size: 1rem;
    }

    .mode-btn-vertical {
        padding: 15px;
        gap: 10px;
    }

    .mode-icon-container {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .time-preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .floating-icon {
        font-size: 1.5rem;
    }

    .global-sleep-insights h2 {
        font-size: 1.4rem;
    }

    .country-name {
        font-size: 1.2rem;
    }

    .hygiene-title {
        font-size: 1.3rem;
    }

    .hygiene-checklist li {
        font-size: 1rem;
        gap: 12px;
    }

    .country-code {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .container-narrow {
        padding: 0 15px;
    }

    .disclaimer-section .container-narrow,
    .sources-section .container-narrow {
        padding: 1.5rem 15px;
    }

    .disclaimer-header h2,
    .sources-header h2 {
        font-size: 1.3rem;
    }

    .disclaimer-header i,
    .sources-header i {
        font-size: 1.5rem;
    }

    .disclaimer-note {
        padding: 1rem;
    }

    .source-item {
        font-size: 0.95rem;
    }
}

/* ===== Print Styles ===== */
@media print {

    .floating-shapes,
    .floating-icons,
    .scroll-indicator,
    .cta-button,
    .visualizer-btn,
    .share-results,
    .calculate-again-container,
    .back-to-top,
    .theme-toggle,
    .mobile-menu-btn,
    .affiliate-products,
    .time-indicator {
        display: none !important;
    }

    .glass-effect {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .hero {
        padding: 2rem 0;
        min-height: auto;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero-title,
    .section-title,
    .mode-title,
    .product-title,
    .best-result-header h3,
    .tip-card h3,
    .faq-item h3,
    .content-card h3,
    .content-card h4,
    .legal-section h3,
    .page-title,
    .global-sleep-insights h2,
    .country-name,
    .hygiene-title {
        color: #000 !important;
    }

    .hero-subtitle,
    .section-subtitle,
    .mode-description,
    .product-description,
    .tip-card p,
    .faq-item p,
    .stat-label,
    .page-subtitle,
    .content-card>p,
    .country-description,
    .hygiene-checklist li,
    .legal-section p,
    .legal-section ul li,
    .legal-section ol li,
    .faq-answer p,
    .source-item {
        color: #333 !important;
    }

    .result-card,
    .sleep-stage,
    .glass-effect,
    .stats-bar,
    .mode-btn-vertical,
    .tip-card,
    .faq-item,
    .global-sleep-insights,
    .country-insight,
    .sleep-hygiene-section,
    .content-card,
    .info-section,
    .page-hero,
    .sources-section {
        background: #fff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .faq-answer {
        max-height: none !important;
        padding: 20px !important;
        display: block !important;
    }
}

/* ===== Notifications ===== */
.notification-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    width: 300px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--info-color);
    transition: all 0.3s ease;
}

.notification.notification-success {
    border-left-color: var(--success-color);
}

.notification.notification-warning {
    border-left-color: var(--warning-color);
}

.notification.notification-error {
    border-left-color: var(--danger-color);
}

.notification-message {
    flex: 1;
    font-size: 0.95rem;
    color: var(--dark-color);
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.notification-close:hover {
    color: var(--dark-color);
}

.notification.fade-out {
    opacity: 0;
    transform: translateX(100%);
}