:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #10b981;
    --primary-hover: #059669;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: float 12s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(16,185,129,0.3) 0%, rgba(16,185,129,0) 70%);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, rgba(59,130,246,0) 70%);
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out forwards;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff; /* fallback */
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out forwards;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
}

.input-group label small {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-size: 0.8rem;
}

.input-group input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    color: var(--text-main);
    font-size: 1.15rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-group input:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.input-group input:focus {
    border-color: var(--input-focus);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.input-group input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.checkbox-group {
    margin: 1.5rem 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.hidden-fields {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.hidden-fields.show {
    max-height: 600px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
}

.section-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.form-divider {
    border: none;
    border-top: 1px dashed var(--glass-border);
    margin: 1.5rem 0;
}

.result-display {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.result-display.highlight {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
}

.result-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.result-value {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.4rem;
}

#resultado {
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    text-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.unit {
    font-size: 1.6rem;
    color: var(--text-muted);
    font-weight: 600;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide arrows in input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

@media (max-width: 480px) {
    h1 { font-size: 2.3rem; }
    .glass-panel { padding: 2rem; }
    #resultado { font-size: 3rem; }
}
