/* EarlyBuild Neural Building Generator Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 60px 1fr;
    height: 100vh;
    gap: 0;
}

.header {
    grid-column: 1 / -1;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header h1 {
    font-size: 24px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.controls-panel {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.main-view {
    position: relative;
    background: #f0f8ff;
}

.view-tabs {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    display: flex;
    gap: 5px;
}

.tab {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.tab.active {
    background: #667eea;
    color: white;
}

#map {
    width: 100%;
    height: 100%;
    display: none;
}

#threejs-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.controls-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.controls-section h3 {
    margin-bottom: 12px;
    color: #667eea;
    font-size: 16px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 13px;
}

.form-group input:focus, .form-group select:focus {
    border-color: #667eea;
    outline: none;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.stats-display {
    background: #667eea;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.stats-display h4 {
    margin-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
}

.building-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    background: white;
}

.building-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 12px;
}

.building-item:hover {
    background: #f8f9fa;
}

.building-item.selected {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
}

.building-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.building-details {
    color: #666;
    font-size: 11px;
}

.camera-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    gap: 5px;
}

.camera-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    font-size: 18px;
    color: #667eea;
}

/* Views Panel Styles */
#views-container {
    width: 100%;
    height: 100%;
    background: #ffffff;
    padding: 60px 20px 20px 20px;
    overflow-y: auto;
}

.views-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.view-panel {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.view-panel:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.view-panel h3 {
    margin-bottom: 10px;
    color: #667eea;
    font-size: 16px;
    text-align: center;
}

.view-svg {
    width: 100%;
    height: 300px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    background: #f8f9fa;
}

.view-svg path {
    fill: rgba(102, 126, 234, 0.3);
    stroke: #667eea;
    stroke-width: 0.003;
}

.view-svg .floor-line {
    fill: none;
    stroke: #999;
    stroke-width: 0.001;
}

.view-svg .edge-line {
    fill: none;
    stroke: #667eea;
    stroke-width: 0.002;
}

.view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.view-controls select {
    flex: 1;
    max-width: 300px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 14px;
}

.view-controls select:focus {
    border-color: #667eea;
    outline: none;
}

.view-controls button {
    padding: 10px 20px;
}