:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    background-color: var(--light-bg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Main Layout */
.main-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0 20px;
}

/* Calculator Styling */
.calculator-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 20px;
}

h1 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 1.375rem;
    color: #ff6b6b;
    margin: 15px 0;

}

h3 {
    font-size: 1.25rem;
    color: #000;
    margin: 12px 0;
}

h4 {
    font-size: 1.125rem;
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: #000;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
}

.input-with-icon input {
    padding-left: 40px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-group input {
    width: auto;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000;
}

.btn-calculate {
    background: var(--teal);
    color: white;
}

.btn-calculate:hover {
    background: #3cbab2;
}

.btn-reset {
    background: var(--secondary);
    color: white;
}

.btn-reset:hover {
    background: #e55a5a;
}

.btn-export {
    background: var(--accent);
    color: white;
}

.btn-export:hover {
    background: #345280;
}

/* Results Section */
.results {
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
    display: none;
}

.results.visible {
    display: block;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: var(--radius);
    border-left: 4px solid var(--teal);
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000;
}

.chart-container {
    margin: 25px 0;
    height: 300px;
    position: relative;
}

.export-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

/* Plain text results for export */
#results-plain {
    display: none;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    padding: 20px;
    white-space: pre-line;
    color: #000;
}

/* Ad Styling */
.ad-container {
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
}

.ad-container p {
    padding: 20px;
    color: var(--text-light);
}

#ad-left, #ad-right {
    display: none;
}

#related-tools {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 20px 0;
}

#related-tools h3 {
    margin-bottom: 15px;
    color: #000;
    font-size: 1.25rem;
}

.tool-links {
    list-style: none;
}

.tool-links li {
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: #000;
}

.tool-links li:last-child {
    border-bottom: none;
}

.tool-links a {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}

.tool-links a:hover {
    color: var(--teal);
}

.mobile-related-tools {
    display: none;
}

/* Breadcrumb styles */
.breadcrumb {
    padding: 0px 10px;
    color: #000;
    margin-bottom: 5px;
    font-size: 1rem;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Section titles */
.section-title {
    font-size: 1.25rem;
    color: #000;
}

.section-title i {
    font-size: 1.375rem;
}

/* Capture message styling */
.capture-message {
    font-size: 1.5rem;
    color: #000;
}

.capture-message i {
    font-size: 3rem;
}

/* Table header styling */
th {
    font-size: 1rem;
    color: #000;
}

/* Responsive Design */
@media (max-width: 767px) {
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.125rem;
        color: #ff6b6b;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    h4 {
        font-size: 0.9375rem;
    }
    
    button {
        font-size: 0.875rem;
    }
    
    #ad-mobile {
        display: block;
        height: 100px;
    }
    
    #ad-tablet, #ad-left, #ad-right {
        display: none;
    }
    
    .desktop-related-tools {
        display: none;
    }
    
    .mobile-related-tools {
        display: block;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .export-buttons {
        flex-direction: column;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    h2 {
        font-size: 1.25rem;
        color: #ff6b6b;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    #ad-tablet {
        display: block;
        height: 250px;
        margin-top: 10px;
    }
    
    #ad-mobile, #ad-left, #ad-right {
        display: none;
    }
    
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .desktop-related-tools {
        display: none;
    }
    
    .mobile-related-tools {
        display: block;
    }
}

@media (min-width: 1025px) {
    .main-wrapper {
        flex-direction: row;
    }
    
    .left-sidebar, .right-sidebar {
        width: 300px;
        flex-shrink: 0;
    }
    
    .calculator-main {
        flex-grow: 1;
    }
    
    #ad-left, #ad-right {
        display: block;
    }
    
    #ad-left {
        height: 250px;
        margin-bottom: 20px;
    }
    
    #ad-right {
        height: 600px;
    }
    
    #ad-mobile, #ad-tablet {
        display: none;
    }
    
    .left-sidebar, .right-sidebar {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
    
    .result-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .mobile-related-tools {
        display: none;
    }
    
    .desktop-related-tools {
        display: block;
    }
}

@media print {
    body * {
        visibility: hidden;
        margin: 0;
        padding: 0;
    }
    #results-plain, #results-plain * {
        visibility: visible;
    }
    #results-plain {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 15px;
        font-size: 0.75rem;
        background: white;
        color: black;
        line-height: 1.2;
        page-break-inside: avoid;
    }
    @page {
        margin: 0.5in;
        size: portrait;
    }
}
    .mobile-table {
        overflow-x: auto;
        margin: 20px 0;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    .mobile-table table {
        width: 100%;
        min-width: 600px;
        border-collapse: collapse;
    }
    .mobile-table th, .mobile-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }
    .mobile-table th {
        background-color: #4ecdc4;
        font-weight: bold;
    }
    .mobile-table tr:nth-child(even) {
        background-color: #fafafa;
    }