/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: rgb(51, 51, 51);
    background-color: rgb(240, 243, 247);
}

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

/* Main content styles */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 2.5rem;
    color: rgb(6, 33, 36);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgb(27, 156, 74);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1rem;
    color: rgb(63, 68, 75);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Calculator styles */
.calculator-container {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.calculator-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.option-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 2px solid rgb(240, 243, 247);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.option-section:hover {
    border-color: rgb(27, 156, 74);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 156, 74, 0.1);
}

.option-title {
    font-size: 1.5rem;
    color: rgb(6, 33, 36);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.option-subtitle {
    color: rgb(63, 68, 75);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgb(51, 51, 51);
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgb(230, 230, 230);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.input-field:focus {
    outline: none;
    border-color: rgb(27, 156, 74);
    box-shadow: 0 0 0 3px rgba(27, 156, 74, 0.1);
    transform: translateY(-1px);
}

.input-field:hover {
    border-color: rgb(154, 173, 174);
}

.input-field[readonly] {
    background-color: rgb(248, 250, 252);
    color: rgb(63, 68, 75);
}

.calculate-btn {
    background: linear-gradient(135deg, rgb(27, 156, 74) 0%, rgb(12, 69, 57) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 156, 74, 0.3);
}

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

.calculate-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;
}

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

/* Results Display Section (as shown in image) */
.results-display-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgb(248, 250, 252);
    border-radius: 10px;
    border: 2px solid rgb(230, 230, 230);
}

.results-display-section h3 {
    color: rgb(6, 33, 36);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.results-display-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid rgb(230, 230, 230);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background-color: white;
    resize: vertical;
}

/* Results styles */
.results-container {
    animation: fadeInUp 0.8s ease;
}

.results-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid rgb(27, 156, 74);
}

.results-title {
    font-size: 1.8rem;
    color: rgb(6, 33, 36);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Tax Summary Section (matching image layout) */
.tax-summary-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgb(240, 243, 247) 0%, rgb(248, 250, 252) 100%);
    border-radius: 10px;
    border: 1px solid rgb(230, 230, 230);
}

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

.tax-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tax-summary-item:hover {
    transform: translateY(-2px);
}

.tax-label {
    font-size: 0.9rem;
    color: rgb(63, 68, 75);
    margin-bottom: 0.5rem;
    text-align: center;
}

.tax-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgb(6, 33, 36);
    text-align: center;
}

.tax-rates-section h3 {
    color: rgb(6, 33, 36);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.breakdown-section h4 {
    color: rgb(63, 68, 75);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.brackets-container {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.bracket-item {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 1rem;
    padding: 0.8rem;
    background-color: rgb(253, 253, 253);
    border-radius: 8px;
    border: 1px solid rgb(240, 240, 240);
    transition: all 0.3s ease;
}

.bracket-item:hover {
    background-color: rgb(240, 243, 247);
    transform: translateX(5px);
}

.bracket-range {
    font-weight: 600;
    color: rgb(6, 33, 36);
}

.bracket-rate {
    color: rgb(27, 156, 74);
    font-weight: 600;
    text-align: center;
}

.bracket-tax {
    color: rgb(63, 68, 75);
    text-align: right;
    font-weight: 500;
}

/* Income Band Table (exactly as shown in image) */
.income-band-table {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: rgb(248, 250, 252);
    border-radius: 10px;
    border: 1px solid rgb(230, 230, 230);
}

.income-band-table h4 {
    color: rgb(6, 33, 36);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.band-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.band-table th,
.band-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgb(240, 240, 240);
}

.band-table th {
    background-color: rgb(6, 33, 36);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.band-table td {
    color: rgb(51, 51, 51);
    font-size: 0.9rem;
}

.band-table tr:hover {
    background-color: rgb(248, 250, 252);
}

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

/* Annual brackets information section */
.annual-brackets-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgb(248, 250, 252);
    border-radius: 10px;
    border: 1px solid rgb(230, 230, 230);
}

.annual-brackets-info h4 {
    color: rgb(6, 33, 36);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.annual-info {
    display: grid;
    gap: 0.8rem;
}

.annual-info p {
    padding: 0.8rem;
    background-color: white;
    border-radius: 6px;
    border-left: 4px solid rgb(27, 156, 74);
    font-size: 0.95rem;
}

.annual-info strong {
    color: rgb(6, 33, 36);
}

.summary-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: rgb(240, 243, 247);
    border-radius: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgb(230, 230, 230);
}

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

.summary-item.total-tax {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgb(6, 33, 36);
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.final-summary {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgb(6, 33, 36) 0%, rgb(12, 69, 57) 100%);
    color: white;
    border-radius: 10px;
}

.final-summary h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.summary-grid {
    display: grid;
    gap: 0.8rem;
}

.final-summary .summary-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.export-section {
    margin-top: 2rem;
    text-align: center;
}

.export-btn {
    background: linear-gradient(135deg, rgb(255, 101, 45) 0%, rgb(255, 101, 45) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 101, 45, 0.3);
}

.export-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;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.calculate-btn:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .bracket-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    .bracket-tax {
        text-align: center;
    }
    
    .summary-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .annual-brackets-info {
        padding: 1rem;
    }
    
    .annual-info p {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .tax-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .band-table {
        font-size: 0.8rem;
    }
    
    .band-table th,
    .band-table td {
        padding: 0.5rem;
    }
    
    .results-display-textarea {
        min-height: 150px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .calculator-card,
    .results-card {
        padding: 1rem;
    }
    
    .option-section {
        padding: 1rem;
    }
    
    .annual-brackets-info {
        padding: 0.8rem;
    }
    
    .results-display-section {
        padding: 1rem;
    }
    
    .tax-summary-section {
        padding: 1rem;
    }
    
    .income-band-table {
        padding: 1rem;
    }
}

/* Print styles for PDF export */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12px;
    }
    
    .header,
    .footer,
    .export-section,
    .nav {
        display: none !important;
    }
    
    .main {
        padding: 0;
    }
    
    .hero-section {
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .results-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .calculator-card {
        display: none !important;
    }
    
    .results-container {
        display: block !important;
    }
    
    .annual-brackets-info {
        background-color: #f8f8f8 !important;
        border: 1px solid #ccc !important;
    }
    
    .tax-summary-section {
        background: #f8f8f8 !important;
        border: 1px solid #ccc !important;
    }
    
    .income-band-table {
        background-color: #f8f8f8 !important;
        border: 1px solid #ccc !important;
    }
    
    .band-table th {
        background-color: #333 !important;
        color: white !important;
    }
    
    .results-display-section {
        background-color: #f8f8f8 !important;
        border: 1px solid #ccc !important;
    }
}

