/* style.css v14.0 (Dikey Genişletilmiş Hava Durumu) */

:root {
    /* RENK PALETİ */
    --bg-body: #EEEEEE;       
    --bg-panel: #FFFFFF;      
    --bg-input: #F2F4F6;      
    
    --primary: #548CA8;       
    --primary-hover: #334257; 
    
    --text-main: #334257;     
    --text-muted: #476072;    
    
    --border: #D1D9E0;        
    --danger: #ef4444;        
    --success: #10b981;       
    --warning: #f59e0b;       
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; outline: none; }

body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; transition: 0.2s; }

/* --- TEMEL UI ELEMANLARI --- */
.btn {
    background: var(--primary); color: white; padding: 8px 16px; 
    border-radius: 6px; font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-secondary { background: var(--bg-panel); color: var(--text-muted); border: 1px solid #cfd8dc; }
.btn-secondary:hover { background: #e0e0e0; color: var(--text-main); }

.btn-danger { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: var(--danger); color: white; }

.btn-sm { padding: 4px 8px; font-size: 0.75rem; }

input, select {
    background: var(--bg-input); border: 1px solid var(--border); 
    color: var(--text-main); padding: 10px; border-radius: 6px; width: 100%;
}
input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(84, 140, 168, 0.15); }

/* --- ORTAK KART YAPISI --- */
.card-std { 
    width: 100%; background: var(--bg-panel); border: 1px solid var(--border); 
    border-radius: 16px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
    margin-bottom: 20px; position: relative; overflow: hidden; 
}

/* =========================================
   1. ZİYARETÇİ EKRANI (INDEX.PHP) STİLLERİ
   ========================================= */
body.public-view { 
    width: 100%; max-width: 500px; margin: 0 auto; padding: 20px;
    justify-content: center; align-items: center; 
}

/* Hava Durumu */
.weather-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.location-info { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; }
.current-temp-badge { font-size: 1.2rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 5px; }

.weather-tabs { display: flex; background: var(--bg-input); padding: 3px; border-radius: 6px; }
.w-tab { padding: 5px 10px; font-size: 0.75rem; cursor: pointer; border-radius: 5px; color: var(--text-muted); font-weight: 600; transition: all 0.2s; }
.w-tab.active { background: var(--bg-panel); color: var(--primary); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

.daily-view { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 5px; scrollbar-width: none; }
.daily-view::-webkit-scrollbar { display: none; }

/* DÜZENLEME: Dikey Genişletilmiş Kartlar */
.hour-card { 
    width: 70px;          
    min-width: 70px;      
    max-width: 70px;      
    background: var(--bg-input); 
    border-radius: 8px; 
    padding: 10px 4px;    /* Dikey padding artırıldı */
    text-align: center; 
    border: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start;
    gap: 5px; 
    flex-shrink: 0;
    height: auto;
    min-height: 110px;    /* Kartın boyunu uzattık */
}
.hour-time { font-size: 0.7rem; font-weight: 600; }
.hour-temp { font-weight: 700; font-size: 0.95rem; }

.hour-desc { 
    font-size: 0.6rem;    
    color: var(--text-muted); 
    line-height: 1.1; 
    min-height: 3.3em;    /* 3 satıra yetecek kadar yer ayırdık */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;     
    text-align: center; 
    white-space: normal;  /* Metin alt satıra geçsin */
    word-wrap: break-word;
}

.weekly-view { display: none; flex-direction: column; gap: 8px; width: 100%; }
.day-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--bg-input); border-radius: 6px; border: 1px solid var(--border); }
.day-name { font-weight: 600; width: 80px; }
.day-temp { font-weight: 700; color: var(--primary); }
.day-desc { font-size: 0.75rem; color: var(--text-muted); text-align: right; flex: 1; margin-right: 10px; }

/* Geri Sayım & Kazanım */
.countdown-box { text-align: center; }
.timer-display { font-size: 3.5rem; font-weight: 800; color: var(--primary); margin: 10px 0; font-variant-numeric: tabular-nums; }
#status-msg { font-size: 1.2rem; font-weight: 800; letter-spacing: 1px; color: var(--text-muted); }

.outcome-header { 
    font-size: 0.9rem; font-weight: 800; color: var(--primary); text-align: center;
    border-bottom: 1px dashed var(--border); padding-bottom: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap:5px;
}
.outcome-text { font-size: 1rem; line-height: 1.5; font-weight: 500; text-align: center; }

/* =========================================
   2. YÖNETİM PANELİ (ADMIN) STİLLERİ
   ========================================= */
.admin-container { display: flex; height: 100vh; overflow: hidden; }
.sidebar { 
    width: 260px; background: var(--bg-panel); border-right: 1px solid var(--border); 
    padding: 25px 20px; display: flex; flex-direction: column; z-index: 100; flex-shrink: 0;
}
.brand { font-size: 1.5rem; font-weight: 800; margin-bottom: 30px; display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--text-main); }
.nav-item { 
    padding: 12px 15px; margin-bottom: 5px; border-radius: 6px; 
    color: var(--text-muted); cursor: pointer; display: flex; gap: 12px; align-items: center; font-weight: 600; text-decoration: none;
}
.nav-item:hover { background: #f0f4f8; color: var(--text-main); }
.nav-item.active { background: var(--primary); color: white; box-shadow: 0 4px 8px rgba(84, 140, 168, 0.3); }
.nav-separator { border-top: 1px solid var(--border); margin: 10px 0; }

.main-content { flex: 1; padding: 30px; overflow-y: auto; background: var(--bg-body); position: relative; }

/* --- TABLO STİLLERİ --- */
.table-wrapper { background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--border); overflow-x: auto; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }

th { background-color: #334257; color: #FFFFFF; padding: 12px; text-align: center; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); color: var(--text-main); text-align: center; vertical-align: middle; }
tr:hover td { background: #F0F4F8; }

.times-wrapper { max-width: 500px !important; margin: 0 auto !important; }
.times-table th, .times-table td { text-align: center !important; }
.times-table input { font-weight: bold; background: transparent; border: none; text-align: center; font-size: 1rem; }

.prog-table th, .prog-table td { border: 1px solid #ccc !important; }
.prog-table input { width: 100%; height: 100%; border: none; background: transparent; text-align: center; padding: 10px; }

.fm-table th { text-align: left; padding-left: 15px; }
.fm-table td:nth-child(2) { text-align: left; padding-left: 15px; font-weight: 500; } 
.f-type-badge { font-size: 0.75rem; background: #e0e0e0; padding: 2px 8px; border-radius: 12px; color: var(--text-muted); font-weight: 700; }

/* --- YÜKLEME & DİĞER --- */
.upload-status-box { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px; margin-bottom: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); display: none; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 700; }
.progress-container { height: 10px; background: #f0f0f0; border-radius: 5px; overflow: hidden; margin-bottom: 15px; }
.progress-bar { 
    height: 100%; width: 0%; background: var(--primary); transition: width 0.2s; 
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem; animation: stripe-anim 1s linear infinite;
}
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stat-box { background: #f8f9fa; border: 1px solid #eee; border-radius: 8px; padding: 10px; text-align: center; }
.stat-val { font-weight: 800; font-size: 0.9rem; color: #333; }
.stat-label { font-size: 0.7rem; color: #777; text-transform: uppercase; }

.modal-overlay { position: fixed; inset: 0; background-color: rgba(10, 15, 31, 0.95); z-index: 2000; display: none; justify-content: center; align-items: center; }
.toast { position: fixed; top: 20px; right: 20px; background: var(--bg-panel); color: var(--text-main); padding: 15px 20px; border-radius: 8px; z-index: 3000; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-left: 6px solid var(--primary); font-weight: 600; animation: slideIn 0.3s forwards; }
.toast.success { border-left-color: var(--success) !important; }
.toast.error { border-left-color: var(--danger) !important; }

/* RESPONSIVE */
.mobile-toggle { display: none; position: absolute; top: 15px; right: 15px; padding: 10px; background: var(--primary); border-radius: 5px; color: white; z-index: 200; }
@media(max-width: 768px) {
    .sidebar { position: absolute; height: 100%; transform: translateX(-100%); transition: 0.3s; box-shadow: 5px 0 15px rgba(0,0,0,0.1); } 
    .sidebar.show { transform: translateX(0); } 
    .mobile-toggle { display: block; } 
    .admin-container { flex-direction: column; }
    .hide-mobile { display: none !important; } 
    .times-wrapper { max-width: 100% !important; }
    .stats-grid { grid-template-columns: 1fr; }
}

@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes stripe-anim { from { background-position: 1rem 0; } to { background-position: 0 0; } }