:root {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text: #1f2937;
    --text-light: #6b7280;
    --primary: #7c3aed;
    --primary-light: #ede9fe;
    --primary-hover: #6d28d9;
    --border: #e5e7eb;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 600px;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.highlight {
    color: #fff;
    /* White highlight on colored bg */
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
}

.calculator-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.date-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 600px) {
    .date-inputs {
        flex-direction: column;
    }

    .arrow-icon {
        transform: rotate(90deg);
    }
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

input[type="date"] {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 1rem;
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--text);
    outline: none;
    transition: all 0.2s;
    background: #f9fafb;
    width: 100%;
}

input[type="date"]:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    padding: 0.2rem 0;
    font-weight: 600;
    transition: color 0.2s;
}

.text-btn:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.arrow-icon {
    font-size: 1.5rem;
    color: var(--text-light);
    opacity: 0.5;
}

/* Results */
.result-display {
    text-align: center;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

.main-result {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#days-count {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    letter-spacing: -0.04em;
}

.main-result .label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    -webkit-text-fill-color: var(--text-light);
    /* Reset fill for label */
}

.sub-results {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.sub-results p {
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 500;
}

.work-days {
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.work-days .icon {
    font-size: 1.4rem;
}

.actions {
    display: flex;
    justify-content: center;
}

.secondary-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.secondary-btn:hover,
.secondary-btn:focus {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.3);
}