/* Base Styling */
.sleep-tool {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(145deg, #0D1B2A, #1B263B);
    color: #E0E0E0;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 8px 8px 20px #0a141f, -8px -8px 20px #122339;
    width: 90%;
    max-width: 420px;
    margin: auto;
    text-align: center;
    backdrop-filter: blur(6px);
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
}

/* Headings */
h2 {
    color: #A3E635;
    padding: 10px 0;
    text-shadow: 0 1px 3px #000;
}

/* Input Groups */
.input-group {
    width: 100%;
    margin-bottom: 22px;
    text-align: left;
}

.input-group p {
    font-weight: bold;
    color: #A3E635;
    margin-bottom: 6px;
    text-align: center;
}

/* Input Fields */
input[type="time"],
input[type="range"],
select {
    display: block;
    margin: 0 auto;
    padding: 12px;
    width: 80%;
    background: #1e2f44;
    border: 2px solid #A3E635;
    border-radius: 12px;
    color: #E0E0E0;
    font-size: 17px;
    box-shadow: inset 2px 2px 5px #0d1b2a, inset -2px -2px 5px #263a50;
    transition: all 0.2s ease-in-out;
}

input[type="time"]:focus,
input[type="range"]:focus,
select:focus {
    outline: none;
    border-color: #FFC56E;
    box-shadow: 0 0 8px #FFC56E;
}

/* Time Styling */
input[type="time"] {
    text-align: center;
    font-weight: bold;
}

/* Age Label */
#ageLabel {
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
    display: block;
    color: #FFC56E;
}

/* Buttons */
button {
    background: linear-gradient(145deg, #ffc56e, #ffb84d);
    color: #1B263B;
    padding: 14px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 4px 4px 10px #0d1b2a, -4px -4px 10px #263a50;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 12px #0d1b2a, -6px -6px 12px #263a50;
}

button:active {
    transform: translateY(1px);
}

/* Result Container */
#resultContainer {
    margin-top: 20px;
    width: 100%;
}

/* Result Grid */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
    width: 100%;
}

/* Result Boxes */
.result-box {
    background: linear-gradient(145deg, #1e2f44, #263a50);
    padding: 20px;
    border-radius: 18px;
    font-size: 18px;
    color: #E0E0E0;
    border: 1.5px solid #A3E635;
    box-shadow: 6px 6px 12px #0d1b2a, -6px -6px 12px #263a50;
    transition: transform 0.2s;
}

.result-box:hover {
    transform: scale(1.03);
}

.result-box span {
    display: block;
    font-size: 14px;
    color: #FFC56E;
}

/* Description */
#description {
    margin-top: 20px;
    font-size: 16px;
    color: #C0C0C0;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: inset 1px 1px 3px #0d1b2a, inset -1px -1px 3px #263a50;
}

/* Hidden Utility */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    button {
        width: 100%;
    }
}