/* multiple reflections in mirrors.html specific styles */

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 24px;
    min-height: 100vh;
}

.main-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 28px 32px 36px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.page-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 15px;
    border-bottom: 2px solid #999;
}

.page-header h1 {
    margin: 0;
    color: #000;
    font-size: 2.4rem;
    font-weight: 400;
}

.content-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.canvas-panel {
    position: relative;
    flex: 1 1 520px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

canvas {
    background-color: #ffffff;
    border-radius: 6px;
    cursor: crosshair;
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
}

.side-panel {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.controls-note {
    font-size: 14px;
    line-height: 1.6;
    color: #1f4e79;
    background: #f0f6ff;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: bold;
    color: #0056b3;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-row input[type="range"] {
    flex: 1;
}

.slider-row input[type="number"] {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #000;
    font-weight: 400;
}

.value-label {
    font-weight: 400;
    color: #000;
    min-width: 48px;
    text-align: right;
}

button {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    background-color: #2878f0;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #1f63c7;
}

button:disabled {
    background-color: #b5c6dc;
    cursor: not-allowed;
}

.secondary-button {
    background-color: #6c757d;
}

.secondary-button:hover {
    background-color: #585f66;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.warning-message {
    margin-top: 12px;
    color: #c0392b;
    font-size: 14px;
    display: none;
}

.info-panel {
    background-color: #f0f8ff;
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
}

.info-panel p {
    margin: 6px 0;
    color: #1f4e79;
    font-size: 15px;
}

.info-label {
    font-weight: 600;
    margin-right: 8px;
}

.angle-toggle-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(40, 120, 240, 0.92);
    backdrop-filter: blur(4px);
}

.angle-toggle-btn:hover {
    background: rgba(31, 99, 199, 0.92);
}

.physics-section {
    margin-top: 36px;
    background-color: #f0f8ff;
    border-radius: 5px;
    padding: 15px 20px;
    border-left: 5px solid #3498db;
    line-height: 1.6;
}

.physics-section h3 {
    margin: 0 0 12px;
    color: #000;
    font-weight: 600;
}

.physics-section p {
    margin: 0 0 12px;
    color: #34495e;
}

@media (max-width: 920px) {
    .content-layout {
        flex-direction: column;
    }
    .canvas-panel,
    .side-panel {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
        min-height: 100vh;
        display: block;
    }
    .main-wrapper {
        padding: 18px;
        min-height: auto;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .canvas-panel {
        padding: 15px;
        position: relative;
    }
    .angle-toggle-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        width: auto;
        min-width: 120px;
        z-index: 10;
    }
    canvas {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    .control-card {
        padding: 16px 18px;
    }
    .control-group label {
        font-size: 16px;
        font-weight: bold;
    }
    .control-group label[for="directionSlider"] {
        font-size: 16px;
        font-weight: bold;
    }
    .slider-row .value-label {
        font-size: 16px;
        font-weight: bold;
    }
    .button-row {
        flex-direction: row !important;
        gap: 12px;
        justify-content: space-between;
    }
    .button-row button {
        width: calc(50% - 6px) !important;
        flex: 1;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .main-wrapper {
        padding: 15px;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
    button {
        width: 100%;
    }
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    .main-wrapper {
        padding: 12px;
    }
    .canvas-panel {
        padding: 12px;
    }
    .control-card {
        padding: 14px 16px;
    }
}
