:root {
    --bg-color: #111827;
    --card-bg: rgba(31, 41, 55, 0.75);
    --primary-color: #10b981;
    /* Emerald Green */
    --primary-hover: #059669;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: rgba(148, 163, 184, 0.2);
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    position: relative;
    overflow-x: hidden;
}

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

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.3;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #059669;
    /* Greenish */
    animation: pulse 12s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #3b82f6;
    /* Blueish */
    animation: pulse 15s infinite alternate-reverse;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    z-index: 10;
}

.calculator-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-header {
    text-align: center;
    margin-bottom: 24px;
}

.icon-container {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.card-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.author-name {
    color: var(--primary-color) !important;
    font-weight: 600;
    margin-bottom: 12px !important;
    -webkit-text-fill-color: initial !important;
    /* Override potential inheritance */
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.social-link:hover .social-img {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2));
}



/* Form Styles */
.input-group {
    margin-bottom: 20px;
}

.row {
    display: flex;
    gap: 16px;
}

.half {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.input-wrapper,
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    z-index: 2;
}

.arrow-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.8rem;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
    appearance: none;
}

.input-wrapper input {
    padding-left: 30px;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Helper Text Link */
.helper-text {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.helper-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.helper-text a:hover {
    color: #34d399;
    text-decoration: underline;
}

/* Button */
.primary-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse-green 2s infinite;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

/* Result Section */
.result-container {
    margin-top: 30px;
    background: rgba(17, 24, 39, 0.4);
    border-radius: 16px;
    overflow: hidden;
    animation: slideDown 0.4s ease-out;
}

.hidden {
    display: none;
}

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

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

.result-header {
    padding: 16px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.status-exempt {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
}

.status-partial {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.status-taxable {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.75rem;
    /* Smaller font for long text */
    padding: 12px 20px;
    line-height: 1.4;
    font-weight: 500;
}

.result-body {
    padding: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 15px 0;
}

.main-result {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 10px;
}

.green-text {
    color: #34d399;
}

.red-text {
    color: #f87171;
}

.highlight {
    color: #60a5fa;
}

.disclaimer {
    margin-top: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    line-height: 1.4;
}

/* Date Input Styles */
.date-row {
    display: flex;
    gap: 10px;
}

.month-select {
    flex: 2;
    /* 2/3 width */
}

.date-row input[type="number"] {
    flex: 1;
    /* 1/3 width */
    padding-left: 14px;
    /* Reset padding since it's not a currency input */
}

.date-row select,
.date-row input {
    height: 46px;
}

@keyframes breathing {
    0% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(251, 191, 36, 0.2);
    }

    50% {
        transform: scale(1.02);
        text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(251, 191, 36, 0.2);
    }
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 25px rgba(52, 211, 153, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }
}

.breathing-effect {
    animation: breathing 3s infinite ease-in-out;
}

@media (max-width: 500px) {
    .row {
        flex-direction: column;
        gap: 0;
    }

    .half {
        width: 100%;
        margin-bottom: 20px;
    }

    .primary-btn {
        background: linear-gradient(135deg, #34d399 0%, #059669 100%);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }
}

/* Read-only input styling */
input[readonly] {
    background: rgba(30, 41, 59, 0.4);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.1);
}

input[readonly]:focus {
    box-shadow: none;
    border-color: rgba(148, 163, 184, 0.1);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}