: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-color: var(--light-bg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    display: grid;
    gap: 24px;
}

.calculator {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #000;
    text-align: center;
}

h2 {
    font-size: 1.375rem;
    margin: 1.2rem 0;
    color: #ff6b6b;
}

h3 {
    font-size: 1.25rem;
    margin: 1rem 0;
    color: #000;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #000;
}

select, input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    color: #000;
}

.dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
    position: relative;
}

/* Enhanced Calculate and Reset buttons */
.btn-calculate, .btn-reset {
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    border: none;
    min-width: 140px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    flex: 1;
}

.btn-calculate {
    background: linear-gradient(to bottom, #4ecdc4, #3da89f);
    color: white;
    position: relative;
}

.btn-reset {
    background: linear-gradient(to bottom, #ff6b6b, #e05c5c);
    color: white;
}

.btn-calculate:hover, .btn-reset:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

.btn-calculate:active, .btn-reset:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-calculate.calculating {
    background: linear-gradient(to bottom, #3da89f, #2c8e86);
}

.btn-calculate .btn-text {
    font-weight: bold;
}

.btn-calculate .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    display: none;
}

.btn-calculate.calculating .btn-text {
    visibility: hidden;
}

.btn-calculate.calculating .spinner {
    display: block;
}

.spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.results {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-top: 24px;
    display: none;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.25rem;
    color: #000;
}

.result-item:last-child {
    border-bottom: none;
}

.ad-container {
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
}

.ad-label {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 5px 10px;
    font-size: 0.8rem;
    width: 100%;
    color: #000;
}

#ad-left {
    width: 300px;
    height: 250px;
}

#ad-right {
    width: 300px;
    height: 600px;
}

#ad-tablet {
    width: 300px;
    height: 250px;
    margin: 10px auto 0;
}

#ad-mobile {
    width: 320px;
    height: 100px;
    margin: 20px auto 0;
}

.related-tools {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
}

.related-tools ul {
    list-style: none;
    margin-top: 15px;
}

.related-tools li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: #000;
}

.related-tools a {
    color: var(--accent);
    text-decoration: none;
}

.shape-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.shape-option {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #000;
}

.shape-option:hover {
    background-color: #f0f0f0;
}

.shape-option.selected {
    border-color: var(--teal);
    background-color: rgba(78, 205, 196, 0.1);
}

.dimension-group {
    display: none;
}

.dimension-group.active {
    display: grid;
}

.unit-toggle {
    display: flex;
    margin-bottom: 15px;
}

.unit-toggle button {
    flex: 1;
    padding: 8px;
    background-color: #e0e0e0;
    color: #000;
}

.unit-toggle button.active {
    background-color: var(--accent);
    color: white;
}

.mix-details {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    color: #000;
}

.mix-details.active {
    display: block;
}

.chart-container {
    margin-top: 20px;
    height: 300px;
}

.export-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Enhanced Export buttons */
#export-pdf, #export-image, #print-report {
    padding: 12px 18px;
    font-size: 0.9375rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    border: none;
    min-width: 140px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(to bottom, #3d5a80, #2c3e50);
    color: white;
}

#export-pdf:hover, #export-image:hover, #print-report:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#export-pdf:active, #export-image:active, #print-report:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Stairs landing options */
.stairs-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stairs-option {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #000;
}

.stairs-option input {
    width: auto;
}

/* Water calculation info */
.water-info {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 0.9rem;
    border-left: 4px solid #2196f3;
    margin-bottom: 10px;
    color: #0d47a1;
}

/* Responsive adjustments */
@media (min-width: 1025px) {
    .main-content > aside:first-child {
        position: sticky;
        top: 24px;
        height: min-content;
    }
    
    .main-content > aside:last-child {
        position: sticky;
        top: 24px;
        height: min-content;
    }
    
    #ad-left, #ad-right {
        position: static;
    }
    
    .related-tools {
        position: sticky;
        top: 630px;
    }
}

#ad-left, #ad-right, #ad-tablet {
    display: none;
}

#ad-mobile, #related-tools {
    display: block;
}

@media (min-width: 768px) {
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.25rem;
        color: #ff6b6b;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    #ad-mobile, #ad-left, #ad-right {
        display: none;
    }
    
    #ad-tablet, #related-tools {
        display: block;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .main-content > aside:first-child {
        order: 2;
    }
    
    .main-content > main {
        order: 1;
    }
    
    .main-content > aside:last-child {
        order: 3;
    }
}

@media (min-width: 1025px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.375rem;
        color: #ff6b6b;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    #ad-tablet, #ad-mobile {
        display: none;
    }
    
    #ad-left, #ad-right, #related-tools {
        display: block;
    }
    
    .main-content {
        grid-template-columns: 300px 1fr 300px;
        align-items: start;
    }
    
    #related-tools {
        margin-top: 24px;
    }
    
    .main-content > aside:first-child {
        order: 1;
    }
    
    .main-content > main {
        order: 2;
    }
    
    .main-content > aside:last-child {
        order: 3;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.125rem;
        color: #ff6b6b;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    .dimensions {
        grid-template-columns: 1fr;
    }
    
    .shape-options {
        grid-template-columns: 1fr 1fr;
    }
    
    .main-content > aside:first-child {
        order: 2;
    }
    
    .main-content > main {
        order: 1;
    }
    
    .main-content > aside:last-child {
        order: 3;
    }
    
    .stairs-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .btn-calculate, .btn-reset, #export-pdf, #export-image, #print-report {
        width: 100%;
        margin-bottom: 10px;
    }
}

#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);
}

.dimension-with-toggle {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.unit-toggle-group {
    display: flex;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.unit-toggle-btn {
    padding: 6px 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: normal;
    color: #000;
}

.unit-toggle-btn.active {
    background-color: var(--accent);
    color: white;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.mix-explanation {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #000;
}

.cement-bag-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.cement-bag-input input {
    width: 100px;
}

.material-unit-toggle {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.material-unit-toggle span {
    font-weight: bold;
    color: #000;
}

.breadcrumb {
    padding: 0px 10px;
    color: #000;
    margin-bottom: 5px;
    font-size: 1rem;
}

.breadcrumb a {
    color: var(--primary-light);
    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;
    font-size: 1rem;
    color: #000;
}

.mobile-table th {
    background-color: #4ecdc4;
    font-weight: bold;
    font-size: 1rem;
}

.mobile-table tr:nth-child(even) {
    background-color: #fafafa;
}