:root {
    --max-width: 800px;
    --primary-color: #49368d;
    --secondary-color: #50c878;
    --warning-color: #ff6b6b;
    --optimal-color: #50c878;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-color: #ddd;
    --spacing: 0.25rem;
    --color-amber-50: oklch(.987 .022 95.277);
    --color-amber-200: oklch(.924 .12 95.746);
    --color-amber-600: oklch(.666 .179 58.318);
    --color-amber-900: oklch(.414 .112 45.904);
    --color-green-50: oklch(.982 .018 155.826);
    --color-green-100: oklch(.962 .044 156.743);
    --color-green-200: oklch(.925 .084 155.995);
    --color-green-300: oklch(.871 .15 154.449);
    --color-green-500: oklch(.723 .219 149.579);
    --color-green-600: oklch(.627 .194 149.214);
    --color-green-800: oklch(.448 .119 151.328);
    --color-indigo-50: oklch(.962 .018 272.314);
    --color-indigo-100: oklch(.93 .034 272.788);
    --color-indigo-400: oklch(.673 .182 276.935);
    --color-indigo-600: oklch(.511 .262 276.966);
    --color-purple-50: oklch(.977 .014 308.299);
    --color-pink-50: oklch(.971 .014 343.198);
    --color-gray-100: oklch(.967 .003 264.542);
    --color-gray-200: oklch(.928 .006 264.531);
    --color-gray-300: oklch(.872 .01 258.338);
    --color-gray-600: oklch(.446 .03 256.802);
    --color-white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -- Overwrite VanillaHTML */
*:focus,
*:focus-visible {
    outline-color: none;
    outline-style: none;
    outline-width: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #120c29;
    background: linear-gradient(115deg,rgba(18, 12, 41, 1) 0%, rgba(90, 30, 130, 1) 68%, rgba(237, 147, 83, 1) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-light);
    font-size: 1.0em; /* -- Overwrite VanillaHTML */
}

header {
    background: linear-gradient(358deg, var(--primary-color), rgba(18, 12, 41, 1));
    color: var(--color-indigo-100);
    padding: 10px;
    text-align: center;
}

header h1 {
    font-size: 2.0em;
    margin-bottom: 5px;
}

section {  /* -- Overwrite VanillaHTML */
    border: none;
    display: block;
}

.logo-img {
    height: 60px;
    max-height: 60px;
}

.language-switcher {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    gap: 10px;
    font-size: 0.7em;
}

.language-switcher a {
    padding: 5px 12px;
    background: white;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    transition: all 0.3s ease;
}

.language-switcher a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.language-switcher a.active {
    background: var(--primary-color);
    background: linear-gradient(185deg, rgba(18, 12, 41, 1) 0%, rgba(90, 30, 130, 1) 65%, rgba(237, 147, 83, 1) 100%);
    color: white;
}

.container {
    max-width: var(--max-width);
    margin: 25px auto 0;
    /*background: rgba(245, 245, 245, 0.5); */
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.subtitle {
    font-size: 1.0em;
    opacity: 0.9;
}

.calculator-section {
    padding: 15px 40px 5px 40px;
}

.input-group {
    display: grid;
    width: 100%;
    max-width: 400px;
    margin: 0px auto 15px auto;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-indigo-100);
    font-size: 1.0em;
}

.time-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.time-input {
    flex: 1;
    padding: 5px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.0em;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.separator {
    font-size: 1.0em;
    font-weight: bold;
    color: var(--text-light);
}

.number-input {
    width: 100%;
    padding: 5px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.0em;
    transition: border-color 0.3s ease;
}

.number-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.results-section {
    padding: 0 40px 15px 40px;
}

.results-section h1, .info-section h1, .terms-section h1 {
    font-size: 2.0em;
    margin-bottom: 15px;
}

.results-section h2, .info-section h2, .terms-section h2 {
    font-size: 1.6em;
    margin: 20px 0 15px;
    color: var(--color-indigo-100);
}

.results-section h3,  .info-section h3, .terms-section h3 {
    font-size: 1.4em;
    margin: 20px 0 15px;
    color: var(--color-indigo-100);
}

.suggestion-card {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 10px 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.suggestion-card.optimal {
    border-color: var(--optimal-color);
    background: #f0fdf4;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bedtime {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--primary-color);
}

.duration {
    font-size: 0.8em;
    color: var(--text-light);
}

.optimal-badge {
    background: var(--optimal-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.sleep-bar-container {
    background: #e0e0e0;
    height: 16px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.sleep-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #357abd);
    border-radius: 10px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    color: white;
    font-weight: 500;
    font-size: 0.7em;
}

.sleep-bar.optimal {
    background: linear-gradient(90deg, var(--optimal-color), #3da35d);
}

.info-section {
    padding: 0 40px 40px;
}

.warning-box {
    background: #fff5f5;
    border-left: 4px solid var(--warning-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: var(--text-dark);
    line-height: 1.6;
}

.explanation-box {
    background: #f0f9ff;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.6;
}

.explanation-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.explanation-box p {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .container {
        margin: 40px auto 0;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .calculator-section,
    .results-section,
    .info-section {
        padding: 20px;
    }
    
    .bedtime {
        font-size: 1.4em;
    }
}

.gap-1, .gap-2, .gap-3 {
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.gap-1 {
    gap: calc(var(--spacing) * 1);
}

.gap-2 {
    gap: calc(var(--spacing) * 2);
}

.gap-3 {
    gap: calc(var(--spacing) * 3);
}

.p-2 {
    padding: calc(var(--spacing) * 2) calc(var(--spacing) * 2) calc(var(--spacing) * 1) calc(var(--spacing) * 2);
}

.bg-gray-100 {
    background-color: var(--color-gray-100);
}

.bg-gray-200 {
    background-color: var(--color-gray-200);
}

.bg-green-50 {
    background-color: var(--color-green-50);
}

.bg-green-100 {
    background-color: var(--color-green-100);
}

.bg-green-200 {
    background-color: var(--color-green-200);
}

.bg-green-500 {
    background-color: var(--color-green-500);
}

.rounded-full {
    border-radius: 3.40282e38px;
}

.text-gray-600 {
    color: var(--color-gray-600);
}

.text-green-600 {
    color: var(--color-green-600);
}

.w-5 {
    width: calc(var(--spacing) * 5);
}

.h-5 {
    height: calc(var(--spacing) * 5);
}

.terms-section {
    padding: 15px 40px 25px 40px;
    color: var(--color-indigo-100);
}

.terms-section ul {
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 40px;
}

.footer {
    width: 100%;
    max-width: var(--max-width);
    margin: 1.25em auto 0.8em auto;
    padding: 0px;
    box-sizing: inherit;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8em;
}

.footer a {
    color: var(--text-light);
}

/* -- Ads */
.ad-hor, .ad-hor-top, .ad-hor-mid, .ad-hor-bott {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto 1.25em auto;
    padding: 0px;
    box-sizing: inherit;
    align-items: center;
    text-align: center;
}

.ad-hor-top {
    padding-top: 0px;
    padding-bottom: 8px;
}

.ad-hor-mid {
    padding-top: 8px;
    padding-bottom: 8px;
}

.ad-hor-bott {
    padding-top: 8px;
    padding-bottom: 0px;
}

.ad-vert, .ad-vert-lft, .ad-vert-rght {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
    width: 100%;
    max-width: 120px;
    margin: 0 8px 3em 8px;
}
