:root {
    --bg: linear-gradient(135deg, #74ebd5, #acb6e5);
    --text: #000;
    --card: rgba(255, 255, 255, 0.25);
    --btn: #4CAF50;
    --btn-hover: #45a049;
    --error: #d60000;
}

/* 🌙 DARK MODE */
body.dark {
    --bg: #121212;
    --text: #ffffff;
    --card: rgba(255, 255, 255, 0.08);
    --btn: #2e7d32;
    --btn-hover: #1b5e20;
    --error: #ff4d4d;
}

/* RESET (IMPORTANT FIX) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BASE */
body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 20px;
}

/* HEADER */
header {
    text-align: center;
    margin-top: 20px;
}

/* MAIN CARD */
.container {
    margin-top: 30px;
    background: var(--card);
    backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* INPUT */
input {
    padding: 12px;
    width: 100%;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
}

/* BUTTON */
button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--btn);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

button:hover {
    background: var(--btn-hover);
    transform: scale(1.03);
}

/* OUTPUT TEXT */
#result,
#birthday,
#lived {
    margin-top: 12px;
    font-weight: bold;
    font-size: 16px;
}

/* ERROR */
#error {
    color: var(--error);
    font-weight: bold;
    margin-top: 10px;
}

/* LINKS */
a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* FOOTER */
footer {
    margin-top: auto;
    padding: 15px;
    font-size: 12px;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 500px) {
    .container {
        width: 90%;
        padding: 20px;
    }
}
