/* Add custom font styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #FFB98B;
    --secondary-color: #A78BFA;
    --background-color: #1a1135;
    --text-color: #FFFFFF;
    --accent-color: #22D3EE;
    --glow-color: rgba(255, 185, 139, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --container-padding: clamp(1rem, 3vw, 1.5rem);
    --h1-font-size: clamp(2rem, 5vw, 3rem);
    --h2-font-size: clamp(1.5rem, 4vw, 2rem);
    --body-font-size: clamp(0.875rem, 2vw, 1rem);
    --input-font-size: clamp(1.25rem, 3vw, 2rem);
}

html {
    scroll-behavior: smooth;
    height: 100%;
    overflow: hidden;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, #1a1135 0%, #2d1b50 100%);
    color: var(--text-color);
    line-height: 1.4;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Moon */
body::before {
    content: '';
    position: fixed;
    top: 40px;
    right: 40px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ffd7aa);
    border-radius: 50%;
    box-shadow: 0 0 50px #ffd7aa;
    z-index: 0;
}

/* Stars */
.stars {
    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 var(--duration) ease-in-out infinite;
    opacity: 0;
}

/* Generate 50 stars with different positions and sizes */
.star:nth-child(1) { --size: 2px; --x: 15%; --y: 60%; --duration: 3s; --delay: 1s; }
.star:nth-child(2) { --size: 1px; --x: 25%; --y: 20%; --duration: 4s; --delay: 2s; }
.star:nth-child(3) { --size: 3px; --x: 35%; --y: 80%; --duration: 5s; --delay: 3s; }
.star:nth-child(4) { --size: 2px; --x: 45%; --y: 40%; --duration: 3s; --delay: 2s; }
.star:nth-child(5) { --size: 1px; --x: 55%; --y: 70%; --duration: 4s; --delay: 1s; }
.star:nth-child(6) { --size: 3px; --x: 65%; --y: 30%; --duration: 5s; --delay: 3s; }
.star:nth-child(7) { --size: 2px; --x: 75%; --y: 90%; --duration: 3s; --delay: 2s; }
.star:nth-child(8) { --size: 1px; --x: 85%; --y: 50%; --duration: 4s; --delay: 1s; }
.star:nth-child(9) { --size: 3px; --x: 95%; --y: 10%; --duration: 5s; --delay: 3s; }
.star:nth-child(10) { --size: 2px; --x: 5%; --y: 85%; --duration: 3s; --delay: 2s; }

.star:nth-child(n) {
    width: var(--size);
    height: var(--size);
    top: var(--y);
    left: var(--x);
    animation-delay: var(--delay);
}

/* Floating clouds */
.cloud {
    position: fixed;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    animation: floatCloud linear infinite;
    z-index: 1;
}

.cloud:nth-child(1) {
    width: 200px;
    height: 60px;
    top: 20%;
    animation-duration: 90s;
}

.cloud:nth-child(2) {
    width: 150px;
    height: 45px;
    top: 45%;
    animation-duration: 120s;
}

.cloud:nth-child(3) {
    width: 180px;
    height: 50px;
    top: 70%;
    animation-duration: 100s;
}

/* Sleep-related decorative elements */
.sleep-elements {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: 
        radial-gradient(circle at 20% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 85%, rgba(255, 255, 255, 0.1) 0%, transparent 45%);
    z-index: 1;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes floatCloud {
    from { transform: translateX(-200px); }
    to { transform: translateX(calc(100vw + 200px)); }
}

/* Add these elements to the HTML dynamically */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.3;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
    height: 100%;
    position: relative;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(5px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-color);
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Custom scrollbar styling */
.container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track {
    background: var(--background-color);
}

.container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
    border: 2px solid var(--background-color);
}

.calculator-section {
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(167, 139, 250, 0.1) 100%
    );
    border-radius: 24px;
    padding: var(--container-padding);
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.calculator-section:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 12px 40px rgba(34, 211, 238, 0.1);
}

h1 {
    font-family: 'Poppins', sans-serif;
    font-size: var(--h1-font-size);
    font-weight: 600;
    color: #B4C6FF;
    text-shadow: 0 0 20px rgba(180, 198, 255, 0.4);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.calculator-section h2 {
    font-size: var(--h2-font-size);
    font-weight: 600;
    color: #FFE0B2;
    text-shadow: 0 0 15px rgba(255, 224, 178, 0.4);
    margin-bottom: 1rem;
    text-align: center;
}

.time-input {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

input[type="time"] {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 224, 178, 0.3);
    border-radius: 25px;
    padding: 0.8rem 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-size: var(--input-font-size);
    font-weight: 600;
    color: #FFE0B2;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.4);
    min-width: min(180px, 100%);
    width: 100%;
    max-width: 300px;
}

input[type="time"]:focus {
    outline: none;
    border-color: #FFE0B2;
    box-shadow: 0 0 25px rgba(255, 224, 178, 0.2);
}

button {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 224, 178, 0.3);
    border-radius: 25px;
    padding: 1rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    color: #FFE0B2;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: min(150px, 100%);
    width: 100%;
    max-width: 300px;
    height: auto;
    min-height: 48px;
    white-space: normal;
    line-height: 1.2;
    margin: 0.5rem 0;
}

button:hover {
    background: rgba(255, 224, 178, 0.1);
    border-color: #FFE0B2;
    box-shadow: 0 0 25px rgba(255, 224, 178, 0.2);
    transform: translateY(-2px);
}

.results {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0.5rem 0;
}

.time-slot {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    gap: 0.25rem;
}

.time-slot strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.3;
    width: 100%;
    text-align: center;
}

.time-slot small {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

.time-slot:hover {
    border-color: #FFE0B2;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 224, 178, 0.1);
}

.info-section {
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(167, 139, 250, 0.1) 100%
    );
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(8px);
    margin-top: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--container-padding);
    width: 100%;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--container-padding);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    font-size: var(--body-font-size);
}

.info-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.info-card h3 {
    color: #FFE0B2;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.4);
}

.info-card ul {
    list-style: none;
    margin: 0.75rem 0;
}

.info-card li {
    margin: 0.4rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.info-card li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.info-card strong {
    color: var(--accent-color);
}

.sleep-facts {
    margin-top: 2rem;
    text-align: center;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.fact:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.fact-number {
    color: #FFE0B2;
    font-size: 2rem;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(255, 224, 178, 0.4);
}

.fact-text {
    color: var(--text-color);
    font-size: 0.85rem;
    opacity: 0.8;
}

footer {
    margin-top: 1rem;
    padding: 1rem 0;
}

/* Responsive design optimization */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }

    body::before {
        /* Moon adjustment */
        width: 60px;
        height: 60px;
        top: 20px;
        right: 20px;
    }

    .container {
        padding: 1rem;
        height: auto;
        min-height: 100vh;
    }

    .calculator-section {
        margin: 0.5rem 0;
        padding: 1rem;
    }

    h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        margin: 1rem 0;
        padding: 0 0.5rem;
        text-align: center;
        word-wrap: break-word;
    }

    h2 {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
        margin: 0.75rem 0;
        padding: 0 0.5rem;
        text-align: center;
        word-wrap: break-word;
    }

    .time-input {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        align-items: stretch;
    }

    input[type="time"] {
        width: 100%;
        max-width: none;
        height: 48px;
        font-size: 1.25rem;
        margin: 0.5rem 0;
        text-align: center;
    }

    button {
        width: 100%;
        max-width: none;
        margin: 0.5rem 0;
    }

    .time-slot {
        margin: 0.5rem 0;
        padding: 1rem;
        font-size: 1rem;
    }

    .time-slot strong {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
    }

    .info-section {
        padding: 1rem 0;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .info-card {
        padding: 1rem;
        margin: 0.5rem 0;
        font-size: 0.95rem;
    }

    .info-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .info-card ul {
        padding-left: 1rem;
    }

    .info-card li {
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .time-slot {
        padding: 0.75rem;
    }

    .time-slot strong {
        font-size: 1.4rem;
    }

    .time-slot small {
        font-size: 0.9rem;
    }

    .sleep-now-btn {
        font-size: 1.6rem;
        padding: 0.8rem 1.8rem;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.5rem;
    }

    .time-slot {
        padding: 0.75rem 0.5rem;
        min-height: 80px;
    }

    .time-slot strong {
        font-size: 1rem;
    }

    .time-slot small {
        font-size: 0.85rem;
    }

    .cloud:nth-child(1) {
        width: 150px;
        height: 45px;
    }

    .cloud:nth-child(2) {
        width: 100px;
        height: 30px;
    }

    .cloud:nth-child(3) {
        width: 120px;
        height: 35px;
    }

    .sleep-elements {
        height: 150px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    :root {
        --container-padding: 0.75rem;
    }

    .container {
        padding: 0.75rem;
    }

    h1 {
        font-size: clamp(1.5rem, 4vw, 1.75rem);
    }

    h2 {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    }

    .calculator-section {
        padding: 0.75rem;
    }

    input[type="time"] {
        font-size: 1.1rem;
        height: 44px;
    }

    button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .time-slot {
        padding: 0.75rem 0.5rem;
        min-height: 70px;
    }

    .time-slot strong {
        font-size: 0.95rem;
    }

    .time-slot small {
        font-size: 0.8rem;
    }

    body::before {
        /* Moon adjustment for very small screens */
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
}

/* Ensure touch targets are large enough on mobile */
@media (hover: none) and (pointer: coarse) {
    button,
    input[type="time"],
    .time-slot,
    .info-card {
        min-height: 44px;
        padding: max(0.8rem, 12px);
    }
}

/* Modern loading animation for time slots */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time-slot {
    animation: fadeInUp 0.3s ease forwards;
    animation-delay: calc(var(--index) * 0.1s);
}

/* Sleep Now button special style */
.sleep-now-btn {
    background: rgba(255, 224, 178, 0.1);
    border: 2px solid rgba(255, 224, 178, 0.4);
    border-radius: 30px;
    padding: 1rem 2rem;
    font-size: 1.8rem;
    margin-top: 1.5rem;
}

.sleep-now-btn:hover {
    background: rgba(255, 224, 178, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 224, 178, 0.3);
}

.sleep-myths {
    margin-top: 2rem;
    text-align: center;
}

.sleep-myths h3 {
    color: #FFE0B2;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.4);
}

.myths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.myth-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.myth-card:hover {
    border-color: #ff9b9b;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 155, 155, 0.1);
}

.myth-card h4 {
    color: #ff9b9b;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.myth-card p {
    color: #a5f3fc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.myths-tips {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.myths-tips h4 {
    color: #FFE0B2;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.3);
    text-align: center;
}

.myths-tips ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
}

.myths-tips li {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    padding-left: 1.5rem;
    position: relative;
}

.myths-tips li::before {
    content: '🎯';
    position: absolute;
    left: 0;
    font-size: 1rem;
}

.myths-tips strong {
    color: #a5f3fc;
    font-weight: 500;
}

@media (max-width: 768px) {
    .myths-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .myth-card {
        padding: 1rem;
    }

    .myth-card h4 {
        font-size: 1rem;
    }

    .myth-card p {
        font-size: 0.9rem;
    }

    .myths-tips {
        padding: 1.25rem;
        margin-top: 1.5rem;
    }

    .myths-tips h4 {
        font-size: 1.2rem;
    }

    .myths-tips ul {
        grid-template-columns: 1fr;
    }

    .myths-tips li {
        font-size: 0.9rem;
    }
}

.age-sleep-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.age-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.age-group:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.1);
}

.age-group h4 {
    color: #FFE0B2;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.age-group ul {
    list-style: none;
    margin: 0;
}

.age-group li {
    margin: 0.75rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.age-group strong {
    color: #a5f3fc;
    font-weight: 500;
}

.sleep-tips {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.sleep-tips h4 {
    color: #FFE0B2;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.3);
}

.sleep-tips ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
}

.sleep-tips li {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    padding-left: 1.5rem;
    position: relative;
}

.sleep-tips li::before {
    content: '💡';
    position: absolute;
    left: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .age-sleep-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .age-group {
        padding: 1rem;
    }

    .age-group h4 {
        font-size: 1.1rem;
    }

    .age-group li {
        font-size: 0.9rem;
    }

    .sleep-tips {
        padding: 1.25rem;
    }

    .sleep-tips h4 {
        font-size: 1.2rem;
    }

    .sleep-tips ul {
        grid-template-columns: 1fr;
    }
}

/* Hide Windows Activation Message */
.windows-activation-message {
    display: none !important;
}

/* Prevent text selection on touch */
@media (hover: none) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Calculator Layout Styles */
.calculator-container,
.results-container {
    background: rgba(44, 40, 77, 0.8);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin: 2rem auto;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.title {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.time-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    align-items: center;
}

input[type="time"] {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    width: 150px;
}

.calculate-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.sleep-now-btn {
    display: block;
    width: 80%;
    max-width: 300px;
    margin: 2rem auto;
    padding: 1rem;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sleep-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#results-text {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

#results-text br {
    content: "";
    display: block;
    margin: 0.8rem 0;
}

.results-explanation {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.1rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
}

.back-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.3s ease 0.3s forwards;
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation keyframes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .calculator-view {
        padding: 1.5rem;
    }

    .time-input-group {
        flex-direction: column;
    }

    .time-input-group input[type="time"] {
        width: 100%;
        max-width: 280px;
    }

    .time-input-group button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .calculator-view {
        padding: 1rem;
    }

    .time-section h2 {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    }
}

/* About Section Styles */
.section-title {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 224, 178, 0.2);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #FFE0B2;
    text-shadow: 0 0 15px rgba(255, 224, 178, 0.4);
    text-align: center;
}

.cycle-button, #cycle-info-5 {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(167, 139, 250, 0.2) 100%);
    border: 2px solid rgba(255, 224, 178, 0.4);
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
    color: #FFE0B2;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 1rem auto;
}

.cycle-button:hover, #cycle-info-5:hover {
    background: rgba(255, 224, 178, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 224, 178, 0.2);
}

.info-card-set {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.info-card-set.active-set {
    display: grid;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.info-card h3 {
    color: #FFE0B2;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 10px rgba(255, 224, 178, 0.3);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    margin: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.info-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
    line-height: 1;
}

.info-card strong {
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .info-card-set {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .info-card-set {
        grid-template-columns: 1fr;
    }

    .cycle-button {
        font-size: 1.1rem;
        padding: 0.7rem 1.2rem;
    }

    .info-card {
        padding: 1rem;
    }

    .info-card h3 {
        font-size: 1.2rem;
    }

    .info-card li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    }

    .cycle-button {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }

    .info-card {
        padding: 0.75rem;
    }

    .info-card h3 {
        font-size: 1.1rem;
    }

    .info-card li {
        font-size: 0.85rem;
        padding-left: 1.25rem;
    }
}

#info-grid-container-5 {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

#info-grid-container-5 .info-card-set {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

#info-grid-container-5 .info-card-set.active-set {
    display: grid;
}

#cycle-info-5 {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(167, 139, 250, 0.2) 100%);
    border: 2px solid rgba(255, 224, 178, 0.4);
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
    color: #FFE0B2;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 1rem auto;
}

#cycle-info-5:hover {
    background: rgba(255, 224, 178, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 224, 178, 0.2);
}

/* Responsive adjustments for all info sections */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        margin: 0.5rem 0;
    }
    
    #cycle-info-5,
    .cycle-button {
        width: 100%;
        max-width: 300px;
        font-size: 0.9rem;
    }
}

.time-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.time-display {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 0.8rem 1.5rem;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    justify-content: center;
}

.time-display:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.time-picker {
    display: none;
    background: rgba(44, 40, 77, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    margin-top: 0.5rem;
}

.time-picker.active {
    display: flex;
    gap: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.picker-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.picker-values {
    height: 200px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    padding: 0.5rem;
}

.picker-values::-webkit-scrollbar {
    display: none;
}

.picker-value {
    padding: 0.5rem 1rem;
    text-align: center;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    border-radius: 8px;
    min-width: 60px;
}

.picker-value:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.picker-value.selected {
    background: var(--primary-color);
    color: white;
}

.picker-arrow {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.period-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem;
}

.period-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    min-width: 60px;
}

.period-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.period-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.separator {
    animation: blink 1s infinite;
    opacity: 0.8;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-header {
    font-size: 1.4rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time-recommendations {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin: 2rem 0;
}

.time-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.3rem;
}

.time-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.cycle-info {
    font-size: 1rem;
    opacity: 0.8;
    margin-left: 1rem;
    color: var(--text-color);
}

.results-explanation {
    color: var(--text-color);
    opacity: 0.9;
    font-size: 1.1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: left;
    line-height: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.results-explanation br {
    content: "";
    display: block;
    margin: 0.5rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .time-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 1.2rem;
    }

    .cycle-info {
        margin-left: 0;
        font-size: 0.9rem;
    }

    .result-header {
        font-size: 1.2rem;
        padding: 1rem;
    }

    .results-explanation {
        font-size: 1rem;
        padding: 1rem;
    }
}

.time-option:nth-child(1) { animation-delay: 0.1s; }
.time-option:nth-child(2) { animation-delay: 0.2s; }
.time-option:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} 