:root {
    --deep-blue: #001a4d;    /* Background */
    --royal-blue: #4169E1;   /* Primary Accents */
    --navy-blue: #002366;    /* Card Backgrounds */
    --soft-blue: #8ba4f9;    /* Borders/Hover */
    --ivory: #FFFFF0;        /* Main Text */
    --ivory-dim: #d1d1c7;    /* Secondary Text */
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--deep-blue);
    color: var(--ivory);
    margin: 0;
    padding: 20px;
}

/* Tool Container Card */
.tool-ui {
    background: var(--navy-blue);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    width: 95%;
    max-width: 500px;
    margin: 40px auto;
    border: 1px solid var(--royal-blue);
    text-align: center;
}

h3 {
    color: var(--soft-blue);
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

label {
    display: block;
    margin: 15px 0 8px;
    font-weight: 500;
    color: var(--ivory-dim);
    text-align: left;
}

/* Inputs */
input[type="number"], input[type="text"] {
    width: 100%;
    padding: 12px;
    background: var(--deep-blue);
    border: 2px solid var(--royal-blue);
    border-radius: 10px;
    color: var(--ivory);
    font-size: 1.1rem;
    outline: none;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--royal-blue);
    margin: 15px 0;
}

/* Result Area */
.res {
    margin-top: 30px;
    padding: 20px;
    background: rgba(65, 105, 225, 0.2); /* Transparent Royal Blue */
    border-radius: 12px;
    color: var(--ivory);
    font-size: 1.4rem;
    font-weight: bold;
    border-left: 5px solid var(--royal-blue);
}

.back-link {
    display: block;
    margin-top: 25px;
    color: var(--soft-blue);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--ivory);
    text-decoration: underline;
}