:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
    --max-width: 1400px;
    --section-spacing: 0 10px;
}

* {
    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);
    display: flex;
    flex-direction: column;
}

/* Main Content Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-spacing) 1rem;
    flex: 1;
    width: 100%;
    color: #000;
}

/* Layout for Desktop */
.main-content {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    color: #000;
}

/* Sidebar Styles */
.sidebar {
    display: none;
    color: #000;
}

/* Ad Styles */
.ad-container {
    background-color: white;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--section-spacing);
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

#ad-mobile {
    width: 320px;
    height: 100px;
    margin: 0 auto;
    margin-top: 20px;
}

#ad-tablet {
    width: 300px;
    height: 250px;
    display: none;
    margin: 10px auto 0;
}

#ad-left, #ad-right {
    width: 300px;
}

#ad-left {
    height: 250px;
}

#ad-right {
    height: 600px;
}

/* Heading Styles */
h1 {
    font-size: 1.25rem;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

h2 {
    font-size: 1.125rem;
    color: #ff6b6b;
    font-family: 'Times New Roman', Times, serif;
}

h3 {
    font-size: 1rem;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

h4 {
    font-size: 0.9375rem;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

/* Calculator Styles */
.calculator {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: var(--section-spacing);
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.calculator h1 {
    color: #000;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
}

.section-title {
    font-size: 1.25rem;
    color: #000;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    font-family: 'Times New Roman', Times, serif;
}

.form-group {
    margin-bottom: 1rem;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
    position: relative;
    font-family: 'Times New Roman', Times, serif;
}

.btn-primary {
    background-color: var(--teal);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-export {
    background-color: var(--accent);
    color: white;
    width: auto;
    flex: 1;
    min-width: 0;
}

.btn:hover {
    opacity: 0.9;
}

/* Toggle Button Styles */
.toggle-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.toggle-label {
    margin-right: 1rem;
    font-weight: bold;
    color: #000;
}

.toggle-btn {
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-btn.active {
    background-color: var(--teal);
}

.toggle-slider {
    width: 26px;
    height: 26px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-btn.active .toggle-slider {
    transform: translateX(30px);
}

/* Spinner animation */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results Section */
.results {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    display: none;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.results h3 {
    color: #000;
    margin-bottom: 1rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    font-size: 1.25rem;
}

.export-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

/* Pie Chart Styles */
.pie-chart-container {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #000;
}

.chart-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}

#hoursPieChart {
    width: 100%;
    height: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    color: #000;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #000;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.chart-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

/* Overtime Options */
.overtime-options {
    display: block;
    transition: all 0.3s ease;
    color: #000;
}

.overtime-options.hidden {
    display: none;
}

/* Sticky Wrapper for Desktop Sidebar */
.sticky-wrapper {
    position: sticky;
    display: flex;
    flex-direction: column;
    color: #000;
}

/* Related Tools - Desktop - FIXED with sticky-wrapper */
#related-tools {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--section-spacing);
    color: #000;
}

.tools-list {
    list-style: none;
    color: #000;
}

.tools-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: #000;
}

.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);
}

/* Related Tools - Mobile & Tablet */
#related-tools-mobile {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--section-spacing);
    margin-top: 20px;
    color: #000;
}

/* Error Message */
.error-message {
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
}

/* Responsive Design */
@media (min-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    .calculator h1 {
        font-size: 1.5rem;
    }
    
    #ad-tablet {
        display: flex;
        margin-top: 20px;
    }
    
    #ad-mobile {
        display: none;
    }
    
    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: row;
    }
}

@media (min-width: 1025px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.375rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.125rem;
    }
    
    .main-content {
        grid-template-columns: 300px 1fr 300px;
    }
    
    .sidebar {
        display: block;
    }
    
    #ad-mobile, #ad-tablet {
        display: none;
    }
    
    .calculator h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    #related-tools-mobile {
        display: none;
    }

    /* Fix sidebar layout for desktop with sticky-wrapper */
    .sidebar {
        display: flex;
        flex-direction: column;
    }

    .sticky-wrapper {
        position: sticky;
        top: 20px;
        display: flex;
    }

    #ad-left, #ad-right {
        position: static;
    }

    #related-tools {
        position: static;
        margin-top: 20px;
    }
}

/* 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;
}
    .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;
    }
