:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}

body {
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex: 1;
    gap: 24px;
}

.main-content {
    flex: 1;
}

/* Sidebars */
.sidebar {
    display: none;
    width: 300px;
}

.ad-placeholder {
    background-color: #e9ecef;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #000;
    font-weight: bold;
}

.ad-placeholder.left {
    height: 250px;
}

.ad-placeholder.right {
    height: 600px;
}

.ad-placeholder.mobile {
    height: 100px;
    width: 320px;
    margin: 0 auto;
}

.ad-placeholder.tablet {
    height: 250px;
    width: 300px;
    margin: 0 auto;
}

/* Related Tools */
#related-tools {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 1.5rem;
}

#related-tools h3 {
    margin-bottom: 1rem;
    color: #000;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--teal);
    padding-bottom: 0.5rem;
}

#related-tools ul {
    list-style: none;
}

#related-tools li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

#related-tools a {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

#related-tools a:hover {
    color: var(--secondary);
}

#related-tools i {
    color: var(--teal);
    font-size: 1.125rem;
}

/* Calculator Styles */
.calculator-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.title-container {
    background: transparent;
    color: var(--primary);
    border-radius: 10px;
    text-align: center;
}

h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #000;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

h2 {
    color: #ff6b6b;
    font-size: 1.375rem;
}

h3 {
    color: #000;
    font-size: 1.25rem;
}

h4 {
    color: #000;
    font-size: 1.125rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: var(--light-bg);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    min-width: 120px;
    color: #000;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--teal);
    transition: width 0.3s ease;
}

.tab-btn:hover::after {
    width: 100%;
}

.tab-btn.active {
    background-color: var(--accent);
    color: white;
}

.tab-btn.active::after {
    background: var(--secondary);
    width: 100%;
}

.section-title {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.section-title i {
    font-size: 1.375rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: bold;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label i {
    font-size: 1.125rem;
}

.input-group select,
.input-group input {
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: #000;
}

.input-group select:focus,
.input-group input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(61, 90, 128, 0.1);
    outline: none;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary,
.btn-secondary,
.btn-teal {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(to right, var(--accent), var(--primary));
    color: white;
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.2);
}

.btn-secondary {
    background: linear-gradient(to right, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
}

.btn-teal {
    background: linear-gradient(to right, var(--teal), #3bb7af);
    color: white;
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.2);
}

/* Advanced Options */
.advanced-options {
    margin-bottom: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
}

.collapse-btn {
    background: none;
    border: none;
    padding: 0.75rem 0;
    cursor: pointer;
    font-weight: bold;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    font-size: 1rem;
}

.collapse-content {
    padding: 1rem 0;
    display: none;
}

.collapse-content.show {
    display: block;
}

/* Results */
.result-container {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #f8f9fa, #e9f2fa);
    border-radius: 10px;
    border-left: 4px solid var(--teal);
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #000;
}

.highlight {
    color: var(--secondary);
    font-size: 2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

#step-by-step {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* Charts */
.chart-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.25rem;
    height: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: #000;
}

th {
    background-color: var(--accent);
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Export Section */
.export-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Export Button Styles */
.export-btn {
background: var(--teal);
color: white;
border: none;
padding: 0.85rem 1.5rem;
border-radius: 8px;
cursor: pointer;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
font-size: 1rem;
box-shadow: 0 4px 10px rgba(78, 205, 196, 0.2);
transition: all 0.2s ease;

}

.export-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(to right, var(--accent), var(--primary));
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1000;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Sticky sidebar for desktop */
.sticky {
    position: sticky;
    top: 20px;
}

/* Mobile Ads */
#ad-mobile, #ad-tablet {
    display: none;
    margin: 1.5rem auto;
}

.mobile-related-tools {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.125rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    h4 {
        font-size: 0.9375rem;
    }
    
    .tab-btn {
        font-size: 0.875rem;
    }
    
    .container {
        flex-direction: column;
        margin: 10px 0;
        gap: 15px;
    }
    
    #ad-mobile {
        display: block;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .btn-group, .export-section {
        flex-direction: column;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .mobile-related-tools {
        display: block;
        margin-top: 20px;
    }
    
    .desktop-related-tools {
        display: none;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    #ad-tablet {
        display: block;
        margin-top: 10px;
    }
    
    .chart-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .mobile-related-tools {
        display: block;
        margin-top: 25px;
    }
    
    .desktop-related-tools {
        display: none;
    }
}

@media (min-width: 1025px) {
    .sidebar {
        display: block;
    }
    
    .chart-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .mobile-related-tools {
        display: none;
    }
    
    .desktop-related-tools {
        display: block;
    }
}

/* Add breadcrumb styles */
.breadcrumb {
    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;
}

.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;
    color: #000;
}
.mobile-table th {
    background-color: #4ecdc4;
    font-weight: bold;
    color: white;
    font-size: 1rem;
}
.mobile-table tr:nth-child(even) {
    background-color: #fafafa;
}