/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f8f9fa;
    padding: 20px;
    font-size: 1.05rem; /* slightly bigger base font */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    height: calc(100vh - 40px);
}

/* Plot Section */
.plot-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.plot-container h2 {
    font-size: 1.5rem; /* was 1.2rem, now bigger */
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

#mohr-plot {
    flex: 1;
    width: 100%;
    min-height: 500px;
}

/* Controls Section */
.controls-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    font-size: 1.15rem; /* larger sidebar font */
}

.section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
}

.section h3 {
    font-size: 1.35rem; /* bigger section headers */
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

/* Input Styles */
.input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.input-row label {
    font-size: 1.15rem; /* was 1rem */
    color: #555;
    flex: 1;
}

.input-row input {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1rem; /* was 1rem */
    text-align: center;
}

.input-row input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Description and Tip */
.description {
    font-size: 1.05rem; /* was 0.95rem */
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.tip {
    font-size: 1rem; /* was 0.9rem */
    color: #888;
    margin-bottom: 15px;
    font-style: italic;
}

/* Slider */
.slider-container {
    position: relative;
    margin-bottom: 10px;
}

#rotation-slider {
    width: 100%;
    height: 10px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

#rotation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

#rotation-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 1rem; /* was 0.9rem */
    color: #666;
}

.angle-display {
    text-align: center;
    margin-top: 10px;
    font-size: 1.15rem; /* was 1rem */
    color: #333;
}

#rotation-value {
    font-weight: 700;
    color: #007bff;
}

/* Results Grid */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-group {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e9ecef;
}

.result-group h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.2rem; /* bigger results title */
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-size: 1.05rem; /* was 0.95rem */
    color: #6c757d;
    flex: 1;
}

.result-item .value {
    font-weight: 700;
    color: #212529;
    font-size: 1.15rem; /* was 1rem */
    margin-right: 4px;
}

.result-item .unit {
    font-size: 1rem; /* was 0.9rem */
    color: #6c757d;
    margin-right: 8px;
}

.result-item .angle {
    font-size: 1rem; /* was 0.9rem */
    color: #007bff;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 500px 1fr;
        height: auto;
    }
    
    .controls-section {
        overflow-y: visible;
    }
    
    #mohr-plot {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-layout {
        gap: 10px;
    }
    
    .plot-section,
    .controls-section {
        padding: 15px;
    }
    
    .input-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .input-row input {
        width: 100%;
        max-width: 130px;
    }

    .results-grid {
        gap: 15px;
    }
    
    .result-group {
        padding: 14px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 0;
    }
    
    .result-item .label {
        font-size: 1rem;
    }
    
    .result-item .value,
    .result-item .unit,
    .result-item .angle {
        font-size: 1.05rem;
    }
}
