* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.calculator {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.formula-label {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.input-group, .example-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.input-label {
    font-size: 16px;
    text-align: center;
    color: #e0e0e0;
}

.example-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-box span {
    font-size: 18px;
    text-align: center;
}



.input-box {
    position: relative;
    width: 120px;
    height: 60px;
    border: 2px solid #888;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.input-box input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 18px;
    outline: none;
    color: #e0e0e0;
}

.formula-equals {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    gap: 5px;
}

.formula-text {
    font-size: 18px;
    color: #e0e0e0;
}

.labels-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.label-item {
    width: 120px;
    text-align: center;
    font-size: 16px;
}

.deduction-section {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.deduction-section h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #e0e0e0;
}

.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

#calculate-btn {
    padding: 10px 20px;
    background-color: #30ba11;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}


#result {
    font-size: 18px;
    min-height: 30px;
    width: 100%;
    color: #e0e0e0;
}

.result-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #2a2a2a;
}

.result-section h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.result-value {
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 5px;
}

.deduction-result {
    background-color: #2a2a2a;
}

.deduction-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #333;
    font-style: italic;
}

@media (max-width: 600px) {
    .input-box {
        width: 100px;
        height: 50px;
    }
    
    .label-item {
        width: 100px;
    }
}

.deduction-type-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.yearly-breakdown {
    margin-top: 20px;
    overflow-x: auto;
}

.yearly-breakdown h4 {
    margin-bottom: 10px;
    text-align: center;
    color: #e0e0e0;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #2a2a2a;
}

.breakdown-table th,
.breakdown-table td {
    padding: 8px;
    text-align: right;
    border: 1px solid #444;
}

.breakdown-table th {
    background-color: #333;
    font-weight: bold;
    text-align: center;
}

.breakdown-table tr:hover {
    background-color: #2a2a2a;
}

.recent-inputs-section {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.recent-inputs-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.recent-inputs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.recent-input-btn {
    padding: 10px 15px;
    border: 1px solid #444;
    background-color: #333;
    color: #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.recent-input-btn:hover {
    background-color: #4a4a4a;
}

/* Modal styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #1e1e1e;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: #e0e0e0;
    text-decoration: none;
    cursor: pointer;
}