: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);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 20px;
}

/* Desktop Layout */
@media (min-width: 1025px) {
    .calculator-grid {
        grid-template-columns: 300px 1fr 300px;
    }
    
    #ad-left, #ad-right, #related-tools {
        display: block;
    }
    
    #ad-tablet, #ad-mobile, #mobile-related-tools {
        display: none;
    }
    
    .sidebar {
        position: sticky;
        top: 20px;
        align-self: start;
    }
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1024px) {
    #ad-tablet, #mobile-related-tools {
        display: block;
    }
    
    #ad-left, #ad-right, #ad-mobile, #related-tools {
        display: none;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
}

/* Mobile Layout */
@media (max-width: 767px) {
    #ad-mobile, #mobile-related-tools {
        display: block;
    }
    
    #ad-left, #ad-right, #ad-tablet, #related-tools {
        display: none;
    }
    
    .tab {
        font-size: 0.875rem;
    }
}

h1 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.375rem;
    color: #ff6b6b;
    margin: 1.2rem 0;
}

h3 {
    font-size: 1.25rem;
    color: #000;
    margin: 1rem 0;
}

h4 {
    font-size: 1.125rem;
    color: #000;
}

@media (max-width: 767px) {
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.125rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    h4 {
        font-size: 0.9375rem;
    }
}

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.calculator-ui {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

label {
    font-weight: bold;
    color: #000;
}

input, select, .action {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: #000;
}

.action {
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action:hover {
    background: var(--primary);
}

.action-secondary {
    background: var(--secondary);
}

.action-teal {
    background: var(--teal);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.export-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.8rem 1.2rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    color: #000;
}

.tab.active {
    background: var(--accent);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.ad-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.ad-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: bold;
}

#ad-left, #ad-right {
    height: 250px;
}

#ad-right {
    height: 600px;
}

#ad-tablet {
    height: 250px;
    margin-top: 10px;
}

#ad-mobile {
    height: 100px;
}

#related-tools, #mobile-related-tools {
    height: auto;
    min-height: 200px;
}

#related-tools {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.tools-list {
    list-style: none;
}

.tools-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.tools-list li:last-child {
    border-bottom: none;
}

.tools-list a {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tools-list a:hover {
    color: var(--teal);
}

.result-box {
    background: var(--light-bg);
    border-left: 4px solid var(--teal);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    display: none;
    color: #000;
}

.dynamic-options {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000;
}

.export-action {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    color: #000;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--teal);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    color: #000;
}

.holiday-name {
    font-weight: bold;
}

.holiday-date {
    color: var(--text-light);
}

#plain-text-result {
    position: absolute;
    left: -9999px;
    white-space: pre-line;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 80%;
    max-width: 600px;
    z-index: -1;
    color: #000;
}

.error {
    color: red;
    font-weight: bold;
}

.holiday-category {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    color: #000;
}

.holiday-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    color: #000;
}

.holiday-checkbox {
    margin-right: 8px;
}

/* Add 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;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


    .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;
    }

.formula-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.formula-table th, .formula-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
    vertical-align: top;
    font-size: 1rem;
    color: #000;
}

.formula-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.formula-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.formula-code {
    font-family: 'Times New Roman', Times, serif;
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    color: #000;
}