:root {
    --primary: #0ea5e9;
    /* Sky 500 */
    --primary-dark: #0284c7;
    /* Sky 600 */
    --primary-light: #e0f2fe;
    /* Sky 100 */

    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;

    --text-main: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --border: #e2e8f0;
    /* Slate 200 */
    --error: #ef4444;
    /* Red 500 */

    --radius-lg: 16px;
    --radius-md: 8px;

    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 20px 16px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    line-height: 1.5;
}

/* --- CONTAINER --- */
.app-container {
    width: 100%;
    max-width: 600px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    margin-top: 2vh;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.content-padding {
    padding: 32px 24px;
}

/* --- LANG SWITCHER --- */
.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.lang-btn.active {
    color: var(--primary-dark);
    background: var(--primary-light);
    border-color: #bae6fd;
}

/* --- HEADER & LOGO --- */
header {
    text-align: center;
    margin-bottom: 32px;
    margin-top: 10px;
}

.logo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-bottom: 16px; */
    font-weight: bold;
    font-size: 24px;
}

.logo-img {
    max-width: 200px;
    height: auto;
    display: block;
    width: 100%;
    /* Removed placeholder styles (border, background) for the real image */
}

.gcm-logo-img {
    height: 70px;
    width: 111px;
    margin-right: 10px;
    float: left;
}

.footer-info {
    display: inline-block;
}

@media(min-width: 550px) {
    .footer-info {
        display: block;
    }
}

.subtitle {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-secondary);
    max-width: 90%;
    margin: 0 auto;
}

#text-subtitle, #text-subtitle2 {
    font-size: 17px;
}

@media(min-width: 550px) {
    .subtitle {
        font-size: 18px;
    }

    #text-subtitle, #text-subtitle2 {
        display: inline-block;
        font-size: 19px;
    }
}

/* --- CRITERIA BOX --- */
.criteria-card {
    background-color: #f0f9ff;
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 32px;
}

.criteria-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.criteria-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.criteria-list li {
    margin-bottom: 4px;
}

.highlight-danger {
    color: #dc2626;
    font-weight: 600;
}

/* --- FORM --- */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

/* Exposure Radio Cards */
.exposure-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media(min-width: 500px) {
    .exposure-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.radio-card {
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.card-content {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    height: 100%;
    transition: all 0.2s;
    background: white;
    display: flex;
    flex-direction: column;
}

.radio-card input:checked+.card-content {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}

.card-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.radio-card input:checked+.card-content .card-title {
    color: var(--primary-dark);
}

.card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Inputs & Spinners */
.input-group {
    position: relative;
}

input[type="number"] {
    width: 100%;
    padding: 14px 40px 14px 16px;
    /* padding: 14px 16px 14px 16px; */
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-main);
    transition: all 0.2s;
    background: white;
    -moz-appearance: textfield;
    appearance: auto;
}

/* Force spinners to show and stick to the right */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    display: none;
}
/* input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button !important;
    opacity: 1 !important;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    cursor: pointer;
    display: block;
    width: 25px;
} */

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

input[type="number"].error, div.card-content.error {
    border-color: var(--error) !important;
    background-color: #fef2f2 !important;
}

.unit {
    position: absolute;
    /* right: 45px; */
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    background-color: transparent;
}

.footnote {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -16px;
    font-style: italic;
}

/* --- DISCLAIMER & ACTION --- */
.disclaimer-box {
    margin-top: 32px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
}

.disclaimer-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.disclaimer-box input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.disclaimer-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.disclaimer-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--primary-dark);
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-left: 30px;
}

.btn-calculate {
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-calculate:hover {
    background-color: #0369a1;
    transform: translateY(-1px);
}

.btn-calculate:active {
    transform: scale(0.98);
}

.btn-calculate:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- RESULTS --- */
#result-section {
    display: none;
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.res-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.res-value {
    font-size: 64px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
    margin: 8px 0;
    letter-spacing: -2px;
}

.res-source {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- FOOTER --- */
footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: #64748b;
    line-height: 1.6;
}

footer strong {
    color: var(--text-main);
}

.contact-info {
    margin-top: 16px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

/* --- MODAL (Full Disclaimer) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #dc2626;
}

.modal-body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-close-btn {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.modal-close-btn:hover {
    background: #e2e8f0;
}