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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.header h1 {
    color: #2c5aa0;
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
}

.header-links .link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.header-links .link:hover {
    background-color: #f0f4f8;
}

/* Brief Description */
.brief-description {
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 40px;
}

/* Input Section */
.input-section {
    background: #4a90e2;
    border-radius: 8px;
    overflow: hidden;
}

.input-header {
    background: #4a90e2;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.collapse-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.input-form {
    background: white;
    padding: 25px;
}

.form-row {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-row label {
    min-width: 160px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 120px;
    text-align: right;
}

.form-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.input-with-prefix,
.input-with-suffix,
.input-with-prefix-suffix {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.prefix,
.suffix {
    background: #f8f9fa;
    padding: 8px 12px;
    border-right: 1px solid #ddd;
    font-size: 0.9rem;
    color: #666;
}

.suffix {
    border-right: none;
    border-left: 1px solid #ddd;
}

.input-with-prefix .form-input,
.input-with-suffix .form-input,
.input-with-prefix-suffix .form-input {
    border: none;
    border-radius: 0;
}

.timing-row {
    align-items: center;
    flex-wrap: wrap;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin: 0 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
    min-width: auto;
}

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

.button-row {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-calculate {
    background: #6b8e23;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.btn-calculate:hover {
    background: #5a7a1e;
}

.btn-icon {
    font-size: 0.8rem;
}

.btn-clear {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-clear:hover {
    background: #5a6268;
}

/* Results Section */
.results-section {
    background: #6b8e23;
    border-radius: 8px;
    overflow: hidden;
    color: white;
}

.results-header {
    background: #6b8e23;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.print-icon {
    cursor: pointer;
    font-size: 1.1rem;
}

.future-value {
    background: white;
    color: #333;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.future-value .label {
    font-weight: 500;
}

.future-value .value {
    font-weight: 600;
    color: #6b8e23;
    font-size: 1.3rem;
}

.results-table {
    background: white;
    color: #333;
    padding: 0 20px 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.result-label {
    color: #666;
    font-size: 0.9rem;
}

.result-value {
    font-weight: 500;
    font-size: 0.9rem;
}

.chart-container {
    background: white;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.chart-container.large {
    background: transparent;
    padding: 30px 0;
}

/* Schedule Section */
.schedule-section {
    margin-top: 40px;
}

.schedule-section h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.table-container {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.schedule-table th {
    background: #4a90e2;
    color: white;
    padding: 15px 12px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
}

.schedule-table th:first-child {
    text-align: center;
    width: 50px;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: right;
}

.schedule-table td:first-child {
    text-align: center;
    font-weight: 600;
    background: #f8f9fa;
}

.schedule-table tbody tr:hover {
    background: #f8f9fa;
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
    font-weight: 600;
    background: #f0f4f8;
}

/* Chart Styling */
#pieChart {
    max-width: 200px;
    max-height: 200px;
}

#barChart {
    width: 100%;
    height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-row label {
        min-width: auto;
    }
    
    .timing-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .radio-group {
        margin: 0;
    }
    
    .button-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px;
    }
}

/* Animation for smooth interactions */
.form-input,
.btn-calculate,
.btn-clear {
    transition: all 0.2s ease;
}

/* Custom scrollbar for table */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* SEO Content Styles */
.seo-content .features,
.seo-content .how-to-use {
    margin-bottom: 50px;
}

.seo-content h2 {
    color: #2c5aa0;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

/* Feature Grid Styles */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 15px;
}

.feature-item p {
    text-align: left;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature-item h3 {
    color: #2c5aa0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Steps Grid Styles */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.step-item {
    text-align: center;
    padding: 15px;
}

.step-item p {
    text-align: left;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #4a90e2;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.step-item h3 {
    color: #2c5aa0;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.step-item p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.seo-content {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e9ecef;
}

.faq-section {
    margin-bottom: 40px;
}

.faq-section h2 {
    color: #2c5aa0;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.faq-item h3 {
    color: #2c5aa0;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.related-topics {
    margin-bottom: 40px;
}

.related-topics h2 {
    color: #2c5aa0;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.topic-item {
    padding: 0;
}

.topic-item h4 {
    color: #2c5aa0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.topic-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.disclaimer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.disclaimer h3 {
    color: #666;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.disclaimer p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Enhanced responsive design for SEO content */
@media (max-width: 768px) {
    .seo-content .features,
    .seo-content .how-to-use {
        margin-bottom: 40px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .feature-item {
        padding: 10px;
    }
    
    .feature-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .step-item {
        padding: 10px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .step-item h3 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .step-item p {
        font-size: 0.8rem;
    }
    
    .faq-item {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .seo-content {
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .topics-grid,
    .feature-grid,
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}