/* Cornell Box Page Specific Styles */

.cornell-section {
    padding: 100px 0 60px;
    background: var(--background-color);
    min-height: 100vh;
}

.cornell-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.cornell-header {
    text-align: center;
    margin-bottom: 48px;
}

.cornell-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cornell-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.cornell-subtitle a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cornell-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    margin-bottom: 48px;
}

/* Canvas Container */
.canvas-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid var(--secondary-color);
    box-shadow: var(--shadow-lg);
}

#cornell-canvas {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    background: #000;
    display: block;
    box-shadow: var(--shadow-md);
}

.render-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    background: var(--background-color);
    border-radius: var(--radius-md);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.canvas-controls {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.canvas-controls .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

/* Controls Panel */
.controls-panel {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid var(--secondary-color);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.controls-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
}

.controls-title:not(:first-child) {
    margin-top: 32px;
}

.control-group {
    margin-bottom: 24px;
}

.control-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.control-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 0;
}

/* Presets */
.presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-btn {
    width: 100%;
    justify-content: center;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid var(--border-color);
}

.info-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-card ul li::before {
    content: "🍄";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.info-card ul li:last-child {
    margin-bottom: 0;
}

.info-card ul li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Rendering Status Indicator */
#status-text.rendering {
    color: var(--warning-color);
    animation: pulse 1.5s ease-in-out infinite;
}

#status-text.complete {
    color: var(--success-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress Bar */
#progress-text {
    position: relative;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cornell-content {
        grid-template-columns: 1fr 320px;
    }
}

@media (max-width: 992px) {
    .cornell-content {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        max-height: none;
    }

    .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cornell-title {
        font-size: 2rem;
    }

    .cornell-subtitle {
        font-size: 1rem;
    }

    .render-info {
        grid-template-columns: 1fr;
    }

    .canvas-controls {
        flex-direction: column;
    }

    .canvas-controls .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .cornell-section {
        padding: 90px 0 40px;
    }

    .cornell-title {
        font-size: 1.5rem;
    }

    .canvas-container,
    .controls-panel,
    .info-card {
        padding: 16px;
    }
}

/* Scrollbar Styling for Controls Panel */
.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
