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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.card h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.helper-text {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

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

.loading {
    display: inline-block;
}

.error-card {
    border-left: 5px solid #e53e3e;
}

.error-card h2 {
    color: #e53e3e;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.results-table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.results-table tr:hover {
    background-color: #f7fafc;
}

/* Tax breakdown table styles */
.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tax-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tax-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.tax-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.tax-table tr:hover {
    background-color: #edf2f7;
}

.tax-breakdown {
    margin: 15px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tax-breakdown h5 {
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 1rem;
    text-align: center;
}

.comparison-highlight {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

.comparison-highlight.negative {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.breakdown-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 8px;
}

.breakdown-section h4 {
    color: #4a5568;
    margin-bottom: 10px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 5px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-card li:last-child {
    border-bottom: none;
}

.creator-card a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.creator-card a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.disclaimer {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Navigation Styles */
.module-nav {
    margin-bottom: 30px;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.nav-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 250px;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Module Styles */
.tax-module {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tax-module.active {
    display: block;
}

.module-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.module-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.module-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

/* Business Tax Results Styling */
.results-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.results-header h4 {
    color: #4a5568;
    margin-bottom: 10px;
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.comparison-column {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e2e8f0;
}

.comparison-column h4 {
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #4299e1;
    background: rgba(66, 153, 225, 0.05);
    border-radius: 5px;
    padding: 10px;
}

.savings-summary {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.savings-summary.positive {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    border: 2px solid #68d391;
}

.savings-summary.negative {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    border: 2px solid #f56565;
}

.savings-summary.neutral {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    border: 2px solid #a0aec0;
}

.savings-amount {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}

.savings-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Additional styles for modular components */
.savings-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.savings-breakdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.breakdown-item.highlight {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    padding-top: 10px;
    margin-top: 5px;
    font-weight: bold;
}

.summary-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.highlight {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
}

.summary-item.total {
    background: rgba(46, 204, 113, 0.1);
    border-radius: 5px;
    padding: 12px;
    margin-top: 10px;
    border: 2px solid rgba(46, 204, 113, 0.3);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.comparison-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.summary-message {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.number-format {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.positive {
    color: #38a169;
}

.negative {
    color: #e53e3e;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }

    .nav-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .nav-tab {
        max-width: none;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .module-header h2 {
        font-size: 1.6rem;
    }

    .module-header p {
        font-size: 1rem;
    }

    .comparison-table {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .comparison-column {
        padding: 15px;
    }

    .savings-amount {
        font-size: 1.5rem;
    }

    .savings-text {
        font-size: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Responsive tax table for mobile */
    .tax-table {
        font-size: 0.8rem;
    }
    
    .tax-table th,
    .tax-table td {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .tax-table th {
        font-size: 0.7rem;
    }
    
    /* Stack tax breakdown on mobile for better readability */
    .tax-breakdown {
        padding: 10px;
    }
    
    .tax-breakdown h5 {
        font-size: 0.9rem;
    }
}

.regime-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.regime-column {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.regime-column:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #cbd5e0;
}

.regime-column h4 {
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 1.1rem;
}

.regime-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    background: #f7fafc;
}

.regime-card.current {
    border-color: #667eea;
}

.regime-card.proposed {
    border-color: #48bb78;
}

.regime-card h3 {
    color: #4a5568;
    margin-bottom: 15px;
    text-align: center;
}

.key-value {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.key-value:last-child {
    border-bottom: none;
}

.value {
    font-weight: 600;
}

@media (max-width: 600px) {
    .regime-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .regime-column {
        padding: 15px;
    }
    
    .regime-column h4 {
        font-size: 1rem;
        padding: 8px;
    }
}