:root {
    --primary-hue: 250;
    --primary-color: hsl(var(--primary-hue), 85%, 65%);
    --bg-color: #0d0f1a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f2f5;
    --text-secondary: #a0a5b5;
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: hsl(var(--primary-hue), 85%, 65%, 0.5);
    --success-color: #20d88a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
    position: relative;
    overflow-x: hidden;
}

.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

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

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, rgba(0,0,0,0) 70%);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(236,72,153,0.3) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(16,185,129,0.2) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -50px); }
    66% { transform: translate(-20px, 20px); }
}

.container {
    width: 100%;
    max-width: 600px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.calculator-card {
    animation-delay: 0.2s;
}

.form-group, .input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.4;
}

label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

input, select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "▼";
    font-size: 0.8rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

select option {
    background: #1a1c29;
    color: #fff;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.result-card {
    display: none;
}

.result-card.hidden {
    display: none;
}

.result-card.show {
    display: block;
    animation: fadeInUp 0.6s ease-out forwards;
}

.result-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(0,0,0,0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

td {
    font-size: 1.1rem;
}

td:last-child {
    font-weight: 600;
    color: var(--success-color);
}

.summary-info {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

.summary-info span {
    color: var(--text-primary);
    font-weight: 500;
}

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

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

@media (max-width: 600px) {
    .glass {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
}
