.night-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.dark-mode .night-sky {
    opacity: 1;
}

/* Stars */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    /* animation: twinkle 3s infinite alternate; */
}

/* @keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
} */

/* Moon */
.moon {
    position: fixed;
    top: 20%;
    right: 20%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, #fef9e7, #f7dc6f);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(247, 220, 111, 0.6),
        0 0 80px rgba(247, 220, 111, 0.4),
        0 0 120px rgba(247, 220, 111, 0.2);
    z-index: -1;
    /* animation: moonGlow 4s infinite alternate; */
}

@media (max-width: 768px) {
    .moon {
        width: 60px;
        height: 60px;
        top: 120px;
        right: 40px;
    }
}

*/ .moon::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 15px;
    height: 15px;
    background: rgba(200, 200, 200, 0.3);
    border-radius: 50%;
    box-shadow: 20px -5px 0 -3px rgba(200, 200, 200, 0.2),
        25px 10px 0 -5px rgba(200, 200, 200, 0.15);
}

@keyframes moonGlow {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(247, 220, 111, 0.6),
            0 0 80px rgba(247, 220, 111, 0.4),
            0 0 120px rgba(247, 220, 111, 0.2);
    }

    50% {
        box-shadow: 0 0 70px rgba(255, 255, 255, 0.6),
            0 0 100px rgba(255, 255, 255, 0.4),
            0 0 140px rgba(255, 255, 255, 0.2);
    }
}

/* Enhanced Calculator Container */
.calculator-container {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.dark-mode .calculator-container {
    background: rgba(26, 32, 44, 0.9);
}

.calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color), var(--secondary-color));
}

/* Calculator Inputs Layout */
.calculator-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 25px 0;
}

@media (min-width: 768px) {
    .calculator-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 767px) {
    .calculator-container {
        padding: 20px;
    }

    .calculator-inputs {
        gap: 20px;
    }

    .time-input-compact,
    .cycle-section,
    .mode-btn-vertical {
        padding: 15px;
    }

    .mode-icon-container {
        width: 45px;
        height: 45px;
    }
}

/* Mode Selector - Vertical */
.mode-selector-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.mode-btn-vertical {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-align: left;
    color: var(--dark-color);
    width: 100%;
}

.dark-mode .mode-btn-vertical {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.mode-btn-vertical.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(76, 201, 240, 0.1));
    transform: translateY(-2px);
}

.mode-btn-vertical:hover:not(.active) {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.mode-icon-container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    flex-shrink: 0;
}

.mode-content {
    flex: 1;
}

.mode-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.mode-description {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.dark-mode .mode-description {
    color: rgba(255, 255, 255, 0.7);
}

/* Age Dropdown */
.age-dropdown-container {
    margin-bottom: 20px;
}

.age-dropdown {
    position: relative;
    width: 100%;
}

.age-dropdown-toggle {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--dark-color);
    font-size: 1rem;
}

.dark-mode .age-dropdown-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.age-dropdown-toggle.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(76, 201, 240, 0.1));
}

.age-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .age-dropdown-menu {
    background: rgba(40, 40, 40, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.age-dropdown-menu.show {
    display: block;
}

.age-dropdown-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--dark-color);
    transition: var(--transition);
}

.dark-mode .age-dropdown-item {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.age-dropdown-item:last-child {
    border-bottom: none;
}

.age-dropdown-item:hover,
.age-dropdown-item.selected {
    background: rgba(67, 97, 238, 0.2);
}

.age-dropdown-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.age-dropdown-range {
    font-weight: 600;
    margin-bottom: 3px;
}

.age-dropdown-hours {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.dark-mode .age-dropdown-hours {
    color: rgba(255, 255, 255, 0.7);
}

/* Time Input */
.time-input-compact {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.dark-mode .time-input-compact {
    background: rgba(255, 255, 255, 0.05);
}

.time-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.time-input-row label {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .time-input-row label {
    color: white;
}

#time-input {
    padding: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    color: var(--dark-color);
    width: 100%;
}

.dark-mode #time-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.time-preset-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.time-preset {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .time-preset {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.time-preset:hover,
.time-preset.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Cycle Controls */
.cycle-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.dark-mode .cycle-section {
    background: rgba(255, 255, 255, 0.05);
}

.cycle-visual {
    margin: 15px 0;
}

.cycle-bars {
    display: flex;
    gap: 5px;
    height: 50px;
    align-items: flex-end;
}

.cycle-bar {
    flex: 1;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px 5px 0 0;
    transition: var(--transition);
    min-height: 10px;
}

.dark-mode .cycle-bar {
    background: rgba(255, 255, 255, 0.1);
}

.cycle-bar.active {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
}

.cycle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.control-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.control-btn:hover {
    transform: scale(1.1);
}

.cycle-display {
    text-align: center;
    min-width: 120px;
}

#cycle-count {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent-color);
}

#cycle-hours {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.dark-mode #cycle-hours {
    color: rgba(255, 255, 255, 0.7);
}

.cycle-slider {
    margin-top: 20px;
}

#cycle-slider {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    outline: none;
    margin: 10px 0;
}

.dark-mode #cycle-slider {
    background: rgba(255, 255, 255, 0.1);
}

#cycle-slider::-webkit-slider-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    border: 3px solid white;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 10px;
}

.dark-mode .slider-labels {
    color: rgba(255, 255, 255, 0.7);
}

/* Calculate Button */
.calculate-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0;
    transition: var(--transition);
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
}

.calculate-button.hidden {
    display: none;
}

@media (max-width: 767px) {
    .calculate-button {
        padding: 20px;
        font-size: 1.2rem;
        margin-top: 10px;
    }
}

/* Alarm Set Button */
.alarm-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 10px 0;
    transition: var(--transition);
    display: none;
}

.alarm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

/* Error Message */
.error-message {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    display: none;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Results Section */
.results-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .results-section {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.results-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

@media (min-width: 480px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

.result-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}

.dark-mode .result-card {
    background: rgba(255, 255, 255, 0.05);
}

.result-card.best {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(76, 201, 240, 0.1));
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.result-header h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin: 0;
}

.dark-mode .result-header h3 {
    color: white;
}

.result-quality {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.result-quality.excellent {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.result-quality.good {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.result-quality.fair {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.result-time {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-color);
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .result-time {
    color: white;
}

.result-duration {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.dark-mode .result-duration {
    color: rgba(255, 255, 255, 0.7);
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.calculate-again-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    display: none;
    transition: var(--transition);
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

.calculate-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
}

.share-button {
    padding: 15px 30px;
    background: linear-gradient(45deg, #10b981, #34d399);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    display: none;
    transition: var(--transition);
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

/* Affiliate Products Section */
.affiliate-products {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.dark-mode .affiliate-products {
    background: rgba(26, 32, 44, 0.9);
}

.affiliate-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #10b981, #34d399, #059669);
}

.affiliate-title {
    color: var(--dark-color);
    font-size: 1.5rem;

    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .affiliate-title {
    color: white;
}

#affiliate-disclosure {
    text-align: center;
    font-size: 0.9rem;
    color: #2e2e2e;
    margin-bottom: 20px;
    font-style: italic;
}

.dark-mode #affiliate-disclosure {
    color: rgba(255, 255, 255, 0.7);
}

.products-container {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.products-scroll {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    animation: scrollProducts 30s linear infinite;
}

.products-scroll:hover {
    animation-play-state: paused;
}

/* Landscape Product Cards - FIXED */
.product-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    /* Changed from center to flex-start */

    /* Increased gap */
    padding: 20px;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    background: #fff;
    min-width: 480px;
    /* Increased width */
    max-width: 550px;

    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Product Image - FIXED to prevent text overflow */
.product-image {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

/* Hide any fallback text in image container */
.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.03);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card:hover .product-image::after {
    opacity: 1;
}

/* Product Content */
.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    gap: 12px;
    /* Added gap between elements */
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark-color);
    line-height: 1.3;
}

.product-description {
    font-size: 0.95rem;
    color: var(--gray-color);
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

/* Product Footer - REORGANIZED */
.product-footer {
    display: flex;
    flex-direction: column;
    /* Changed to column */
    gap: 10px;
    /* Added gap */

}

.product-button {
    padding: 12px 24px;
    background: linear-gradient(45deg, #10b981, #34d399);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    width: 100%;
}

.product-button:hover {
    background: linear-gradient(45deg, #059669, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.affiliate-note {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 5px 0;
    border-top: 1px dashed #e2e8f0;
    /* Added separator */
    width: 100%;
}

/* Dark Mode */
.dark-mode .product-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .product-title {
    color: white;
}

.dark-mode .product-description {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .product-image {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode .affiliate-note {
    color: rgba(255, 255, 255, 0.5);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Animation for scrolling - Updated for wider cards */
@keyframes scrollProducts {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-480px * 6 - 20px * 6));
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-card {
        min-width: 420px;
    }

    @keyframes scrollProducts {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-420px * 6 - 20px * 6));
        }
    }
}

@media (max-width: 768px) {
    .products-scroll {
        animation: mobileCarousel 24s cubic-bezier(0.85, 0, 0.15, 1) infinite;
        gap: 20px;
    }

    .products-scroll:hover {
        animation-play-state: paused;
    }

    .product-card {
        min-width: 100%;
        flex: 0 0 100%;
        gap: 15px;
        padding: 15px;
        flex-direction: row;
        align-items: center;
    }

    .product-image {
        width: 100px;
        height: 100px;
    }

    .product-title {
        font-size: 1.1rem;
    }

    .product-description {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .product-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .product-image {
        width: 100%;
        height: 140px;
    }

    .product-content {
        width: 100%;
        gap: 8px;
    }

    .product-description {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* Mobile Carousel Animation: 3s hold + 1s slide for 6 items */
@keyframes mobileCarousel {

    0%,
    12.5% {
        transform: translateX(0);
    }

    16.66%,
    29.16% {
        transform: translateX(calc(-100% - 20px));
    }

    33.33%,
    45.83% {
        transform: translateX(calc(-200% - 40px));
    }

    50%,
    62.5% {
        transform: translateX(calc(-300% - 60px));
    }

    66.66%,
    79.16% {
        transform: translateX(calc(-400% - 80px));
    }

    83.33%,
    95.83% {
        transform: translateX(calc(-500% - 100px));
    }

    100% {
        transform: translateX(calc(-600% - 120px));
    }
}

/* Information Sections */
.info-section {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 40px);
}

.dark-mode .info-section {
    background: rgba(26, 32, 44, 0.9);
}

.info-section h2 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-content p {
    color: var(--gray-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.dark-mode .info-content p {
    color: rgba(255, 255, 255, 0.8);
}

/* Sleep Cycle Diagram */
.sleep-cycle-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 992px) {
    .sleep-cycle-info {
        flex-direction: row;
        align-items: center;
    }
}

.cycle-diagram {
    display: flex;
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cycle-stage {
    flex: 1;
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
}

.cycle-stage:last-child {
    border-right: none;
}

.cycle-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.cycle-name {
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.cycle-duration {
    font-size: 0.8rem;
    opacity: 0.8;
}

.cycle-explanation {
    flex: 1;
}

.cycle-explanation p {
    margin-bottom: 15px;
    color: var(--gray-color);
}

.dark-mode .cycle-explanation p {
    color: rgba(255, 255, 255, 0.8);
}

.cycle-explanation ul {
    list-style: none;
    padding-left: 20px;
    margin-bottom: 20px;
}

.cycle-explanation li {
    color: var(--gray-color);
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}

.dark-mode .cycle-explanation li {
    color: rgba(255, 255, 255, 0.8);
}

.cycle-explanation li:before {
    content: "•";
    color: var(--accent-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Age Recommendations Table */
.age-recommendations {
    margin-top: 20px;
}

.recommendation-table {
    overflow-x: auto;
    margin: 25px 0;
}

.recommendation-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.dark-mode .recommendation-table table {
    background: rgba(255, 255, 255, 0.05);
}

.recommendation-table th {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.recommendation-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--gray-color);
}

.dark-mode .recommendation-table td {
    color: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.recommendation-table tr:last-child td {
    border-bottom: none;
}

.recommendation-table tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .recommendation-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.disclaimer-note {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.disclaimer-note i {
    color: #f59e0b;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.disclaimer-note p {
    margin: 0;
    color: var(--gray-color);
}

.dark-mode .disclaimer-note p {
    color: rgba(255, 255, 255, 0.8);
}

/* FAQ Section */
.faq-container {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.dark-mode .faq-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--dark-color);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    font-weight: 600;
}

.dark-mode .faq-question {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.faq-question:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .faq-question:hover {
    background: rgba(255, 255, 255, 0.08);
}

.faq-question i {
    transition: var(--transition);
}

.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 {
    color: var(--gray-color);
    line-height: 1.6;
}

.dark-mode .faq-answer p {
    color: rgba(255, 255, 255, 0.8);
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--box-shadow);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .share-modal-content {
    background: rgba(40, 40, 40, 0.95);
}

.share-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #10b981, #34d399, #059669);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-modal-title {
    color: var(--dark-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .share-modal-title {
    color: white;
}

.share-modal-close {
    background: transparent;
    border: none;
    color: var(--gray-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .share-modal-close {
    color: rgba(255, 255, 255, 0.7);
}

.share-modal-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark-color);
    text-align: center;
}

.dark-mode .share-option {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.share-option:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
}

.share-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    height: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 15px;
    color: white;
}

.share-icon.whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.share-icon.telegram {
    background: linear-gradient(45deg, #0088cc, #0077b5);
}

.share-icon.messenger {
    background: linear-gradient(45deg, #006AFF, #0084FF);
}

.share-icon.twitter {
    background: linear-gradient(45deg, #1DA1F2, #0d8bd9);
}

.share-icon.facebook {
    background: linear-gradient(45deg, #1877F2, #0c63d4);
}

.share-icon.copy {
    background: linear-gradient(45deg, #6c757d, #495057);
}

.share-option span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark-color);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.dark-mode .toast {
    background: rgba(40, 40, 40, 0.95);
    color: white;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--primary-color);
}

/* Best Result Card */
.best-result-card {
    margin-top: 30px;
    padding: 25px;
}

.best-result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.best-result-header i {
    font-size: 2rem;
    color: #f59e0b;
}

.best-result-header h3 {
    color: var(--dark-color);
    margin: 0;
}

.dark-mode .best-result-header h3 {
    color: white;
}

.best-result-content {
    text-align: center;
}

.time-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.time-block {
    text-align: center;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.dark-mode .time-label {
    color: rgba(255, 255, 255, 0.7);
}

.time-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.dark-mode .time-value {
    color: var(--accent-color);
}

.time-separator {
    color: var(--gray-color);
    font-size: 1.5rem;
}

.dark-mode .time-separator {
    color: rgba(255, 255, 255, 0.7);
}

.duration-display {
    margin-top: 20px;
}

.duration-label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.dark-mode .duration-label {
    color: rgba(255, 255, 255, 0.7);
}

.duration-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 10px;
}

.dark-mode .duration-value {
    color: var(--accent-color);
}

.duration-note {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.dark-mode .duration-note {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 767px) {
    .calculator-container {
        padding: 20px;
    }

    .calculator-inputs {
        gap: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .calculate-again-btn,
    .share-button {
        min-width: 100%;
    }

    .time-display {
        flex-direction: column;
        gap: 15px;
    }

    .time-separator {
        transform: rotate(90deg);
    }

    .cycle-diagram {
        flex-direction: column;
    }

    .cycle-stage {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 15px;
        border-right: none;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

    .cycle-stage:last-child {
        border-bottom: none;
    }

    .info-section {
        padding: 20px;
    }
}

/* Ensure everything is clickable */
button,
.age-dropdown-toggle,
.age-dropdown-item,
.result-card,
.faq-question {
    cursor: pointer;
}

/* Fix for mobile scrolling */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}