/* ===== CONFERENCE SEATING SIMULATION STYLES ===== */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ===== MAIN CONTAINER ===== */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.version {
    font-size: 0.4em;
    color: #667eea;
    font-weight: normal;
    opacity: 0.8;
}

/* ===== CONTROLS SECTION ===== */
.controls {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.controls-primary,
.controls-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.controls-secondary {
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

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

.checkbox-group {
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.control-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.control-group input[type="range"] {
    width: 100%;
}

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

.value-display {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.info-icon {
    display: inline-block;
    margin-left: 5px;
    cursor: help;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.info-icon:hover {
    opacity: 1;
}

/* ===== BUTTONS ===== */
.buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

button {
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Variants */
button.build {
    background: #3b82f6;
    color: white;
}

button.build:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
}

button.start {
    background: #48bb78;
    color: white;
}

button.start:hover:not(:disabled) {
    background: #38a169;
    transform: translateY(-2px);
}

button.pause {
    background: #ed8936;
    color: white;
}

button.pause:hover:not(:disabled) {
    background: #dd6b20;
    transform: translateY(-2px);
}

button.restart {
    background: #8b5cf6;
    color: white;
}

button.restart:hover:not(:disabled) {
    background: #7c3aed;
    transform: translateY(-2px);
}

button.reset {
    background: #fc8181;
    color: white;
}

button.reset:hover {
    background: #f56565;
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT LAYOUT ===== */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ===== CANVAS CONTAINERS ===== */
.canvas-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

canvas {
    border: 2px solid #333;
    border-radius: 8px;
    background: white;
    display: block;
    margin: 0 auto;
}

#simCanvas {
    max-width: 100%;
    height: auto;
}

#seatingChart {
    max-width: 100%;
    height: auto;
}

.chart-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

#seatingChart {
    width: 100%;
    height: 400px;
}

/* ===== STATISTICS & MESSAGES ===== */
.stats {
    margin-top: 20px;
    padding: 15px;
    background: #e6fffa;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c7a7b;
}

.run-history {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.run-history h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1em;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    font-size: 0.9em;
}

.history-time {
    color: #6c757d;
    font-size: 0.85em;
}

.history-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.history-charts:has(.chart-container:nth-child(3)) {
    grid-template-columns: 1fr 1fr 1fr;
}

.chart-container {
    text-align: center;
}

.chart-container h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
    font-weight: 600;
}

.history-charts canvas {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    width: 100%;
    height: 200px;
}

.completion-message {
    background: #48bb78;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    display: none;
}

/* ===== LEGEND ===== */
.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border: 1px solid #333;
    border-radius: 3px;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    color: #666;
    border-top: 1px solid #eee;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    .controls {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 200px;
    }
    
    h1 {
        font-size: 1.5em;
    }
}