:root {
    --primary: #38bdf8;
    --danger: #ef4444;
    --glass: rgba(15, 23, 42, 0.9);
    --border: #334155;
    --text: #e2e8f0;
}

body, html { width: 100%; height: 100%; margin: 0; overflow: hidden; font-family: 'Segoe UI', sans-serif; background: #000; -webkit-tap-highlight-color: transparent; }

/* CESIUM & SV */
#cesiumContainer { width: 100%; height: 100%; transition: height 0.3s; cursor: grab; }
#streetViewContainer { position: absolute; bottom: 0; left: 0; width: 100%; height: 0; transition: height 0.3s; z-index: 50; border-top: 2px solid var(--primary); }
#pano { width: 100%; height: 100%; }
.close-sv { position: absolute; top: 10px; right: 10px; z-index: 100; background: var(--danger); color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; }

/* TOOLBAR (Modernleştirildi) */
.toolbar {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    background: var(--glass); backdrop-filter: blur(12px);
    padding: 6px; border-radius: 12px; display: flex; gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--border); z-index: 1000;
}
.tool-btn {
    background: transparent; border: none; color: #94a3b8; padding: 10px 20px;
    border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.tool-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.tool-btn.active { background: var(--primary); color: #0f172a; box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
.tool-btn.danger:hover { color: var(--danger); }

/* PANELLER */
.side-panel {
    position: absolute; top: 80px; right: 20px; width: 320px;
    background: var(--glass); backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: 12px; color: var(--text);
    z-index: 900; display: none; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.left-panel { left: 20px; right: auto; }

.panel-header { padding: 15px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: var(--primary); background: rgba(255,255,255,0.02); }
.panel-header button { background: none; border: none; color: #64748b; font-size: 18px; cursor: pointer; }
.panel-content { padding: 20px; max-height: 65vh; overflow-y: auto; }

/* KUTULAR */
.info-box { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 15px; }
.box-title { font-size: 11px; color: #fbbf24; font-weight: bold; margin-bottom: 8px; border-bottom: 1px dashed #fbbf24; padding-bottom: 4px; }
.row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: #cbd5e1; }
.row b { color: white; }

.metraj-box { border-left: 3px solid #22c55e; }
.terrain-box { border-left: 3px solid #fbbf24; }

/* CONTROLS */
.label-row { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-bottom: 5px; margin-top: 15px; }
input[type=range] { width: 100%; cursor: pointer; accent-color: var(--primary); height: 6px; }
.btn-delete { width: 100%; padding: 12px; background: #334155; color: var(--danger); border: none; border-radius: 8px; font-weight: bold; cursor: pointer; margin-top: 15px; }
.btn-delete:hover { background: var(--danger); color: white; }

/* TOPLAM & DOCK */
.total-card {
    position: absolute; bottom: 100px; right: 20px;
    background: var(--glass); backdrop-filter: blur(10px); border-right: 5px solid var(--primary);
    padding: 15px 25px; border-radius: 12px; text-align: right; z-index: 800; display: none;
}
.total-card .value { font-size: 26px; font-weight: 800; color: white; }
.total-card .label { font-size: 10px; color: #94a3b8; letter-spacing: 1px; }
.total-card .sub { font-size: 10px; color: #4ade80; }

.dock-container { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; }
.dock { background: var(--glass); padding: 8px; border-radius: 20px; display: flex; gap: 10px; border: 1px solid var(--border); }
.dock-item {
    background: transparent; border: none; color: #64748b; width: 60px; height: 50px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.dock-item:hover { color: white; background: rgba(255,255,255,0.05); }
.dock-item.active { background: rgba(56, 189, 248, 0.15); color: var(--primary); }
.dock-item .icon { font-size: 20px; margin-bottom: 2px; }
.dock-item .label { font-size: 10px; }

.cursor-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.7); color: white; padding: 10px 20px; border-radius: 30px; font-size: 14px; pointer-events: none; display: none; z-index: 2000; }

@media (max-width: 768px) {
    .side-panel { top: auto; bottom: 0; left: 0; right: 0; width: 100%; border-radius: 20px 20px 0 0; max-height: 50vh; }
    .toolbar { width: 90%; justify-content: center; }
    .total-card { top: 80px; bottom: auto; right: 10px; }
}

/* ENERGY MODÜLÜ */
.energy-box { border-left: 3px solid #facc15; }

.solar-stat {
    display: flex; align-items: center; gap: 15px;
    background: rgba(255,255,255,0.05); padding: 10px;
    border-radius: 8px; margin-bottom: 8px;
}
.solar-stat .stat-icon {
    width: 40px; height: 40px; background: rgba(250, 204, 21, 0.2);
    color: #facc15; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 18px;
}
.solar-stat .stat-info { display: flex; flex-direction: column; }
.solar-stat .lbl { font-size: 11px; color: #94a3b8; }
.solar-stat b { font-size: 15px; color: white; }

/* Çatı Heatmap Efekti İçin */
.cesium-roof-glow {
    animation: pulse-roof 2s infinite alternate;
}


/* PLACES LIST */
.places-container {
    margin-top: 15px;
    display: flex; flex-direction: column; gap: 8px;
}
.place-item {
    background: rgba(255,255,255,0.05);
    padding: 10px; border-radius: 8px;
    display: flex; align-items: center; justify-content: space-between;
    border-left: 3px solid #64748b; transition: all 0.2s;
}
.place-item:hover { background: rgba(255,255,255,0.1); transform: translateX(5px); }
.place-left { display: flex; align-items: center; gap: 10px; }
.place-icon {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(0,0,0,0.3); color: white;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.place-info { display: flex; flex-direction: column; }
.place-name { font-size: 13px; color: #e2e8f0; font-weight: 600; }
.place-type { font-size: 10px; color: #94a3b8; }
.place-dist { font-size: 12px; font-weight: bold; color: #38bdf8; text-align: right; }
.place-walk { font-size: 10px; color: #64748b; display: block; }



/* STREET VIEW KONTROLLERİ */
.sv-control-box {
    margin: 15px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.sv-btn {
    background: #334155;
    color: white;
    border: 1px solid #475569;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.2s;
}

.sv-btn:hover {
    background: #475569;
}

.sv-btn.active {
    background: var(--primary);
    color: #0f172a;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    border-color: var(--primary);
}

.sv-hint {
    font-size: 11px;
    color: #4ade80;
    margin-top: 8px;
    display: none; /* Varsayılan gizli */
    animation: fadeIn 0.5s;
}

@keyframes fadeIn { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }


/* AI RENDER STYLES */
.modern-select {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    color: white; padding: 10px; border-radius: 8px; margin-bottom: 10px;
    outline: none; cursor: pointer;
}
.modern-select option { background: #1e293b; }

textarea {
    width: 93%; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    color: white; padding: 10px; border-radius: 8px; resize: none; outline: none;
    font-family: inherit;
}

.ai-btn {
    width: 100%; background: linear-gradient(45deg, #7c3aed, #c084fc);
    border: none; color: white; padding: 12px; border-radius: 8px;
    font-weight: bold; cursor: pointer; margin-top: 15px;
    transition: transform 0.2s;
}
.ai-btn:hover { transform: scale(1.02); box-shadow: 0 0 20px rgba(192, 132, 252, 0.4); }

/* MODAL & COMPARISON SLIDER */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 5000; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(5px);
}
.modal-content {
    background: #1e293b; width: 90%; max-width: 800px; border-radius: 12px;
    border: 1px solid var(--border); overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-header {
    padding: 15px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold; color: #c084fc;
}
.modal-header button { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }

.comparison-container {
    position: relative; width: 100%; height: 450px; overflow: hidden; cursor: col-resize;
}
.comp-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}
.ai-layer {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); /* Başlangıçta yarısı */
}
.slider-handle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 40px; height: 40px; background: white; border-radius: 50%;
    color: black; display: flex; align-items: center; justify-content: center;
    font-weight: bold; box-shadow: 0 0 20px rgba(0,0,0,0.5); pointer-events: none;
    z-index: 10;
}
.download-btn {
    display: block; text-align: center; background: #334155; color: white;
    text-decoration: none; padding: 15px; font-weight: bold;
}
.download-btn:hover { background: #c084fc; }


/* GÖLGE MODÜLÜ */
.shadow-box { border-left: 3px solid #f59e0b; }

.modern-input {
    width: 95%; background: rgba(0,0,0,0.3); border: 1px solid #334155;
    color: white; padding: 8px; border-radius: 6px; outline: none;
    font-family: inherit; margin-top: 5px;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1); cursor: pointer;
}

