/* ---------- global vibe ---------- */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #121212;   /* same charcoal */
    color: #f5f5f5;              /* high-contrast text */
}

/* ---------- headings ---------- */
h1, h2 {
    text-align: center;
    margin: 1rem 0;
    font-weight: 700;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }

/* ---------- section container for the drink rows ---------- */
#drinks {
    max-width: 700px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* each autogenerated fieldset */
.drink {
    background: #1e1e1e;
    border: 2px solid #2ea461;
    border-radius: 8px;
    padding: 1rem 1.2rem 1.2rem;
    position: relative;
}
.drink legend {
    padding: 0 0.5rem;
    font-weight: 700;
}

/* delete “✕” button that appears inside each fieldset */
.drink .del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #2ea461;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;

    /* NEW – true centering */
    display: flex;           /* centers child glyph */
    align-items: center;     /* ^ vertically */
    justify-content: center; /* ^ horizontally */
    line-height: 0;          /* kill baseline offset */
}
.drink .del:hover { background: #c02c2c; }

/* labels & inputs */
label {
    display: block;
    margin-top: 0.6rem;
    font-weight: 500;
}
input[type="number"],
input[type="datetime-local"] {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.3rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
    color: #f5f5f5;
}
input:focus {
    outline: none;
    border-color: #2ea461;
    box-shadow: 0 0 0 3px rgba(46, 164, 97, 0.35);
}

/* ---------- primary buttons ---------- */
button {
    display: inline-block;
    background: #2ea461;
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    margin: 0.6rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}
button:hover            { background: #248a4f; }
button:active           { transform: translateY(1px); } /* subtle press */

/* keep Add-Drink + Calculate centered */
#add, #calc {
    display: block;
    margin: 0.5rem auto;
}

/* ---------- clock & result ---------- */
#clock {
    font-variant-numeric: tabular-nums;
}
#result {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #37ff8b;   /* bright neon green so the answer pops */
}

/* ---------- hr separator ---------- */
hr {
    border: 0;
    height: 1px;
    background: #444;
    max-width: 700px;
    margin: 2rem auto;
}

/* ---------- responsiveness ---------- */
@media (max-width: 600px) {
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.4rem; }
    button { width: 90%; }
}

/* ---------- clearer, centered live clock ---------- */
p:has(#clock) {
    text-align: center;           /* centers the whole “Current time” line  */
    font-size: 1.1rem;
    margin: 1.2rem 0;
}

#clock {
    font-family: 'Roboto Mono', monospace;   /* evenly-spaced digits */
    font-size: 2.2rem;                       /* nice and big         */
    color: #37ff8b;                          /* bright neon green    */
    letter-spacing: 0.04em;                  /* tiny gap for clarity */
}

/* ---------- pretty, theme-matched <input type="time"> ---------- */
input[type="time"] {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.3rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
    color: #f5f5f5;
    font-family: inherit;
}

/* Chrome / Edge: colour the little “clock” icon */
input[type="time"]::-webkit-calendar-picker-indicator {
    background: #2ea461;
    color: #fff;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
}

/* Remove default inner padding so the digits line up */
input[type="time"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }

/* Firefox spinner + focus ring harmonised */
input[type="time"]::-moz-focus-inner { border: 0; }
input[type="time"]:focus {
    outline: none;
    border-color: #2ea461;
    box-shadow: 0 0 0 3px rgba(46, 164, 97, 0.35);
}
