body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column; /* Egymás alá rakja: Nav, Grid, Footer */
}

/* Ez a konténer tartja egymás mellett a Sidebart és a 3D-t */
.grid-container {
    display: flex;
    flex-direction: row; /* Egymás mellé rakja: Sidebar, ThreeJS */
    flex: 1;            /* Kitölti a maradék helyet a Nav és Footer között */
    overflow: hidden;
}

#sidebar {
    width: 420px;
    background: #f4f4f9;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

#threejs-container {
    flex: 1; /* A maradék szélességet ez foglalja el */
    background: #a0d8ef;
    position: relative;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 5px; /* Kicsit kisebb, hogy ne foglaljon sok helyet */
    font-size: 0.8em;
    z-index: 100;
}

 h2,
 h3 {
     color: #2c3e50;
     margin-top: 0;
 }

 .btn {
     cursor: pointer;
     padding: 8px 12px;
     border: none;
     border-radius: 4px;
     font-weight: bold;
     margin-bottom: 5px;
     transition: 0.2s;
     font-size: 0.9em;
 }

 .btn-primary {
     background-color: #3498db;
     color: white;
     width: 100%;
     margin-bottom: 5px;
 }

 .btn-success {
     background-color: #27ae60;
     color: white;
 }

 .btn-warning {
     background-color: #f39c12;
     color: white;
 }

 .btn-outline {
     background-color: transparent;
     border: 1px solid #3498db;
     color: #3498db;
 }

 .btn-danger {
     background-color: #e74c3c;
     color: white;
     width: 24px;
     height: 24px;
     padding: 0;
     line-height: 24px;
     text-align: center;
     border-radius: 4px;
     float: right;
 }

 .btn:hover {
     opacity: 0.9;
 }

 .file-controls {
     display: flex;
     gap: 5px;
     margin-bottom: 15px;
     padding-bottom: 15px;
     border-bottom: 1px solid #ddd;
 }

 .input-group {
     margin-bottom: 8px;
     display: flex;
     align-items: center;
     justify-content: space-between;
 }

 .input-group label {
     font-size: 0.9em;
     flex: 1;
 }

 .input-group input[type="number"],
 select {
     width: 100px;
     padding: 4px;
     border: 1px solid #ddd;
     border-radius: 4px;
 }

 .input-group input[type="color"] {
     width: 40px;
     height: 30px;
     padding: 0;
     border: none;
     cursor: pointer;
 }

 .wall-controls {
     background: white;
     padding: 15px;
     margin-bottom: 15px;
     border-radius: 8px;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
     border-left: 5px solid #e67e22;
 }

 .wall-title {
     font-weight: bold;
     margin-bottom: 10px;
     display: block;
     border-bottom: 1px solid #eee;
     padding-bottom: 5px;
 }

 .opening-item {
     background: #f8fbff;
     border: 1px solid #dbe9f5;
     padding: 10px;
     margin-top: 8px;
     border-radius: 4px;
 }

 .pos-slider-container {
     display: flex;
     align-items: center;
     gap: 5px;
     margin-top: 5px;
     font-size: 0.8em;
     color: #666;
 }

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

 .pos-slider-container span {
     width: 45px;
     text-align: right;
 }

 .flag-checkbox {
     display: flex;
     align-items: center;
     gap: 5px;
     font-size: 0.85em;
     margin-top: 5px;
     background: #eee;
     padding: 4px;
     border-radius: 3px;
 }

 .summary-box {
     background: #2c3e50;
     color: white;
     padding: 15px;
     border-radius: 8px;
     margin-bottom: 20px;
 }

 .stat-row {
     display: flex;
     justify-content: space-between;
     margin-bottom: 5px;
     font-size: 0.9em;
 }

 .total-highlight {
     font-size: 1.3em;
     font-weight: bold;
     color: #f1c40f;
 }

 #info-overlay {
     position: absolute;
     top: 10px;
     left: 10px;
     background: rgba(255, 255, 255, 0.8);
     padding: 10px;
     border-radius: 5px;
     pointer-events: none;
     user-select: none;
 }