/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
}

/* CSS Variables */
:root {
    --primary: #154E9B;
    --secondary: #4784F1;
    --accent: #E0EFFF;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --white: #ffffff;
    --green: #10b981;
    --orange: #f59e0b;
    --yellow: #fbbf24;
    --red: #ef4444;
    --purple: #8b5cf6;
}

/* Utility Classes */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-small {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

.min-h-screen {
    min-height: 100vh;
}

.bg-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes counter {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out 0.4s both;
}

.animate-counter {
    animation: counter 0.5s ease-out;
}

/* Background Decorations */
.bg-decorations {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.decoration-1 {
    top: 5rem;
    right: 2.5rem;
    width: 8rem;
    height: 8rem;
    background: linear-gradient(135deg, rgba(71, 132, 241, 0.1) 0%, rgba(21, 78, 155, 0.05) 100%);
}

.decoration-2 {
    bottom: 10rem;
    left: 2.5rem;
    width: 12rem;
    height: 12rem;
    background: linear-gradient(45deg, rgba(224, 239, 255, 0.3) 0%, rgba(71, 132, 241, 0.1) 100%);
    filter: blur(80px);
}

.decoration-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24rem;
    height: 24rem;
    background: linear-gradient(135deg, rgba(21, 78, 155, 0.05) 0%, rgba(71, 132, 241, 0.05) 100%);
    filter: blur(120px);
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-gray);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    z-index: 10;
    padding: 4rem 0 6rem;
}

.hero-content {
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 48rem;
    margin: 0 auto 2rem;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
}

/* Info Cards */
.info-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-light);
    display: block;
}

.info-value {
    font-weight: 600;
    color: var(--primary);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    background-size: contain;
    background-repeat: no-repeat;
}

.calculator-icon {
    background-color: var(--primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='8' y='8' width='2' height='2'/%3E%3Crect x='14' y='8' width='2' height='2'/%3E%3Crect x='8' y='14' width='2' height='2'/%3E%3Crect x='14' y='14' width='2' height='2'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='8' y='8' width='2' height='2'/%3E%3Crect x='14' y='8' width='2' height='2'/%3E%3Crect x='8' y='14' width='2' height='2'/%3E%3Crect x='14' y='14' width='2' height='2'/%3E%3C/svg%3E") no-repeat center;
}

.dollar-icon {
    background-color: var(--secondary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") no-repeat center;
}

.file-icon {
    background-color: var(--green);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14,2 14,8 20,8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10,9 9,9 8,9'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14,2 14,8 20,8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10,9 9,9 8,9'/%3E%3C/svg%3E") no-repeat center;
}

.trending-icon {
    background-color: var(--orange);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 6 13.5 15.5 8.5 10.5 1 18'/%3E%3Cpolyline points='17 6 23 6 23 12'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 6 13.5 15.5 8.5 10.5 1 18'/%3E%3Cpolyline points='17 6 23 6 23 12'/%3E%3C/svg%3E") no-repeat center;
}

.feature-card h3 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Calculator Section */
.calculator-section {
    position: relative;
    z-index: 10;
    padding-bottom: 6rem;
}

.calculator-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    overflow: hidden;
    margin-bottom: 3rem;
}

.card-header {
    padding: 2rem;
    color: white;
}

.card-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-header p {
    opacity: 0.9;
}

.card-content {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.125rem;
    pointer-events: none;
}

input[type="text"], select {
    width: 100%;
    height: 3.5rem;
    padding: 0 1rem;
    font-size: 1.125rem;
    border: 1px solid var(--border-gray);
    border-radius: 0.5rem;
    background: var(--bg-gray);
    transition: all 0.2s ease;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(21, 78, 155, 0.1);
}

input[type="text"].has-prefix {
    padding-left: 2rem;
}

select {
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.error-message {
    color: var(--red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Radio Group */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.radio-item input[type="radio"] {
    width: auto;
    height: auto;
    margin: 0;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(21, 78, 155, 0.25);
    transition: all 0.2s ease;
}

.calculate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(21, 78, 155, 0.3);
}

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

/* Results Section */
.results-section {
    margin-top: 3rem;
}

.results-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.results-header {
    background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
    color: white;
    padding: 2rem;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.results-header p {
    opacity: 0.9;
}

.results-content {
    padding: 2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    text-align: center;
    animation: counter 0.5s ease-out;
}

.summary-value {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.summary-value.primary { color: var(--primary); }
.summary-value.secondary { color: var(--secondary); }
.summary-value.green { color: var(--green); }
.summary-value.orange { color: var(--orange); }

/* Tax Breakdown */
.breakdown-section {
    margin-top: 2rem;
}

.breakdown-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.breakdown-item {
    border: 1px solid var(--border-gray);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
}

.breakdown-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.breakdown-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.breakdown-title h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.breakdown-amount {
    font-size: 1.125rem;
    font-weight: 700;
}

.breakdown-amount.primary { color: var(--primary); }
.breakdown-amount.orange { color: var(--orange); }
.breakdown-amount.purple { color: var(--purple); }

.progress-bar {
    height: 0.75rem;
    background: var(--bg-gray);
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 0.375rem;
    transition: width 1.5s ease-out;
    width: 0%;
}

.progress-fill.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.progress-fill.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.breakdown-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Quarterly Payments */
.quarterly-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 0.75rem;
}

.quarterly-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.quarterly-header h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.quarterly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quarterly-item {
    text-align: center;
}

.quarterly-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.quarterly-value.secondary {
    color: var(--secondary);
}

.quarterly-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.quarterly-dates {
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.4;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.875rem;
}

.export-btn.download {
    background: var(--green);
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

.export-btn.download:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

.export-btn.print {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.export-btn.print:hover {
    background: var(--bg-gray);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.export-icon {
    width: 1rem;
    height: 1rem;
}

/* Disclaimer */
.disclaimer {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.disclaimer-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.disclaimer-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.disclaimer h6 {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.disclaimer p {
    font-size: 0.875rem;
    color: #a16207;
    line-height: 1.5;
}

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    background: #1f2937;
    color: white;
    padding: 3rem 0;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-description {
    color: #d1d5db;
    max-width: 32rem;
    margin: 0 auto 2rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .quarterly-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .breakdown-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breakdown-details {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 2rem 0 4rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .info-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .radio-grid {
        grid-template-columns: 1fr;
    }
    
    .card-content, .results-content {
        padding: 1.5rem;
    }
}