: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;
}

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-content {
    display: flex;
    flex-direction: column;
    gap: 0 20px;
}

.calculator-section {
    flex: 1;
}

/* Sidebars */
.sidebar {
    display: none;
}

.left-sidebar, .right-sidebar {
    width: 300px;
}

/* Ad Styling */
.ad-container {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#ad-left {
    width: 300px;
    height: 250px;
}

#ad-right {
    width: 300px;
    height: 600px;
}

#ad-tablet {
    width: 300px;
    height: 250px;
    display: none;
    margin: 20px auto 20px;
}

#ad-mobile {
    width: 320px;
    height: 100px;
    display: none;
    margin: 20px auto 20px;
}

/* Related Tools */
#related-tools, #related-tools-mobile {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.tools-list {
    list-style: none;
}

.tools-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: #000;
    font-size: 1rem;
}

.tools-list li:last-child {
    border-bottom: none;
}

.tools-list a {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.tools-list a:hover {
    color: var(--teal);
}

/* Calculator Styling */
.calculator {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calculator h1 {
    margin-bottom: 20px;
    color: #000;
    text-align: center;
    font-size: 1.25rem;
}

h1 { 
    font-size: 1.25rem;
    color: #000;
}

h2 { 
    font-size: 1.125rem;
    color: #ff6b6b;
}

h3 { 
    font-size: 1rem;
    color: #000;
}

h4 {
    font-size: 1.125rem;
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: #000;
}

select.form-control {
    font-size: 1rem;
    color: #000;
}

input.form-control {
    font-size: 1rem;
    color: #000;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Duration Inputs */
.duration-inputs {
    display: flex;
    gap: 10px;
}

.duration-inputs .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Toggle Button Styles */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.toggle-label {
    font-weight: normal;
    color: #000;
    font-size: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.unit-display {
    font-weight: bold;
    color: var(--accent);
    min-width: 40px;
    transition: color 0.3s;
    font-size: 1rem;
}

.unit-display.active {
    color: #ff6b6b;
}

/* Gender Toggle */
.gender-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.gender-option {
    padding: 8px 16px;
    cursor: pointer;
    background-color: var(--light-bg);
    transition: background-color 0.3s;
    color: #000;
    font-size: 1rem;
}

.gender-option.active {
    background-color: var(--accent);
    color: white;
}

/* Activity Dropdowns */
.activity-dropdowns {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    flex: 1;
    color: white;
}

.btn-primary {
    background-color: var(--teal);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-export {
    background-color: var(--accent);
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.results {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 5px;
    display: none;
}

.results.active {
    display: block;
}

.results h2 {
    margin-bottom: 15px;
    color: #ff6b6b;
    font-size: 1.125rem;
}

.result-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--border-color);
    color: #000;
    font-size: 1rem;
}

.result-item span {
    color: #000;
    font-size: 1rem;
}

.chart-container {
    margin: 20px 0;
    height: 200px;
    position: relative;
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Intensity Toggle */
.intensity-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.intensity-option {
    padding: 8px 16px;
    cursor: pointer;
    background-color: var(--light-bg);
    transition: background-color 0.3s;
    color: #000;
    font-size: 1rem;
}

.intensity-option.active {
    background-color: var(--accent);
    color: white;
}

.intensity-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    color: #000;
}

/* 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;
    font-size: 1rem;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Sticky Sidebars for Desktop */
@media (min-width: 1025px) {
    .main-content {
        flex-direction: row;
    }

    .sidebar {
        display: block;
    }

    .left-sidebar, .right-sidebar {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }

    #ad-left, #ad-right {
        display: flex;
    }

    #ad-tablet, #ad-mobile {
        display: none;
    }

    #related-tools-mobile {
        display: none;
    }

    h1 { 
        font-size: 1.5rem;
        color: #000;
    }
    
    h2 { 
        font-size: 1.375rem;
        color: #ff6b6b;
    }
    
    h3 { 
        font-size: 1.25rem;
        color: #000;
    }
    
    h4 {
        font-size: 1.125rem;
        color: #000;
    }

    .calculator h1 {
        font-size: 1.5rem;
        color: #000;
    }

    .results h2 {
        font-size: 1.375rem;
        color: #ff6b6b;
    }
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1024px) {
    #ad-tablet {
        display: flex;
    }

    #ad-left, #ad-right, #ad-mobile {
        display: none;
    }

    #related-tools {
        display: none;
    }

    #related-tools-mobile {
        display: block;
        width: 100%;
        margin: 0 auto 20px;
        background: white;
    }

    h1 {
        font-size: 1.25rem;
        color: #000;
    }

    h2 { 
        font-size: 1.25rem;
        color: #ff6b6b;
    }
    
    h3 { 
        font-size: 1.125rem;
        color: #000;
    }
    
    h4 {
        font-size: 1rem;
        color: #000;
    }

    .calculator h1 {
        font-size: 1.25rem;
        color: #000;
    }

    .results h2 {
        font-size: 1.25rem;
        color: #ff6b6b;
    }
}

/* Mobile Layout */
@media (max-width: 767px) {
    #ad-mobile {
        display: flex;
    }

    #ad-left, #ad-right, #ad-tablet {
        display: none;
    }

    #related-tools {
        display: none;
    }

    #related-tools-mobile {
        display: block;
        margin: 0 auto 20px;
        background: white;
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .buttons {
        flex-direction: column;
    }

    .export-buttons {
        flex-direction: column;
    }

    h1 {
        font-size: 1.25rem;
        color: #000;
    }

    h2 { 
        font-size: 1.125rem;
        color: #ff6b6b;
    }
    
    h3 { 
        font-size: 1rem;
        color: #000;
    }
    
    h4 {
        font-size: 0.9375rem;
        color: #000;
    }

    .calculator h1 {
        font-size: 1.25rem;
        color: #000;
    }

    .results h2 {
        font-size: 1.125rem;
        color: #ff6b6b;
    }
}

.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;
    font-size: 1rem;
    color: #000;
}

.mobile-table th {
    background-color: #4ecdc4;
    font-weight: bold;
    font-size: 1rem;
    color: #000;
}

.mobile-table tr:nth-child(even) {
    background-color: #fafafa;
}

.mobile-table td {
    color: #000;
}