: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 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 20px;
   
}

/* Calculator Section */
#converter-tool {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Center H1 heading */
#converter-tool h1 {
    text-align: center;
}

/* Form Styling */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 15px;
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: #000;
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    color: #000;
}

.radio-group input {
    width: auto;
    margin-right: 5px;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #000;
}

.btn-calculate {
    background-color: var(--teal);
    color: white;
}

.btn-reset {
    background-color: var(--secondary);
    color: white;
}

button:hover {
    opacity: 0.9;
}

/* Spinner */
.spinner {
    display: none;
    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;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    display: none;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.result-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #000;
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000;
    margin: 10px 0;
}

/* Visualization */
.visualization {
    margin: 30px 0;
    text-align: center;
    color: #000;
}

.barometer {
    height: 30px;
    background: linear-gradient(to right, var(--secondary), yellow, var(--teal));
    border-radius: 15px;
    margin: 15px 0;
    position: relative;
}

.barometer-indicator {
    position: absolute;
    top: -5px;
    width: 10px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 5px;
    transform: translateX(-50%);
}

.barometer-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #000;
}

/* Export Options */
.export-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.export-btn {
    background-color: var(--accent);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Ad Zones */
.ad-zone {
    background-color: #f0f0f0;
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

#ad-left, #ad-right {
    display: none;
}

#ad-mobile {
    width: 320px;
    height: 100px;
    margin: 0 auto;
    margin-top: 20px;
}

#ad-tablet {
    display: none;
    width: 300px;
    height: 250px;
    margin: 20px auto 0;
}

/* Related Tools */
#related-tools {
    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;
}

.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);
}

/* Typography */
h1 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #000;
}

h2 {
    font-size: 1.125rem;
    margin-bottom: 15px;
    color: #ff6b6b;
}

h3 {
    font-size: 1rem;
    color: #000;
}

h4 {
    font-size: 0.9375rem;
    color: #000;
}

/* Additional Measurements Section - Hidden by Default */
#additional-measurements {
    display: none;
}

/* Children's section styles */
.children-info {
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.875rem;
}

.children-info p {
    margin: 0;
    color: #000;
}

/* Toggle Switch */
.toggle-section {
    margin-bottom: 20px;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 40px;
    margin: 0 15px;
}

.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: var(--teal);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--secondary);
}

input:checked + .toggle-slider:before {
    transform: translateX(80px);
}

.toggle-label {
    font-weight: bold;
    font-size: 1rem;
    color: #000;
}

.toggle-label.active {
    color: var(--teal);
}

.toggle-label.inactive {
    color: var(--text-light);
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    #ad-tablet {
        display: flex;
    }

    #ad-mobile {
        display: none;
    }
    
    .main-content {
        display: flex;
        flex-direction: column;
    }
    
    .sidebar #related-tools {
        display: none;
    }
    
    .container::after {
        content: "";
        display: block;
    }
    
    #related-tools-outside {
        display: block;
        margin-top: 20px;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    h4 {
        font-size: 1rem;
    }
}

/* Desktop Layout */
@media (min-width: 1025px) {
    .main-content {
        grid-template-columns: 300px 1fr 300px;
        gap: 30px;
    }

    #ad-left, #ad-right {
        display: flex;
    }

    #ad-left {
        width: 300px;
        height: 250px;
    }

    #ad-right {
        width: 300px;
        height: 600px;
    }

    #ad-mobile, #ad-tablet {
        display: none;
    }

    .sidebar {
        position: sticky;
        top: 20px;
        align-self: start;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.375rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.125rem;
    }
    
    #related-tools-outside {
        display: none;
    }
    
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Layout - move related tools below ads */
@media (max-width: 767px) {
    .sidebar #related-tools {
        display: none;
    }
    
    #related-tools-outside {
        display: block;
        margin-top: 20px;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    h3 {
        font-size: 1rem;
    }

    h4 {
        font-size: 0.9375rem;
    }
}

/* 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;
    color: #000;
    font-size: 1rem;
}

.mobile-table th {
    background-color: #4ecdc4;
    font-weight: bold;
}

.mobile-table tr:nth-child(even) {
    background-color: #fafafa;
}