/* --- KÜRESEL AYARLAR VE SİBER ARKA PLAN --- */
body {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow-x: hidden;
}

/* --- GLASSMORPHISM PANEL (TÜM ADIMLAR İÇİN) --- */
.wizard-step {
    display: none;
    max-width: 800px; 
    width: 90%;
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

/* --- TİPOGRAFİ (YAZI STİLLERİ) --- */
h1, h2 {
    color: #ffffff;
    font-weight: 300; 
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

p { 
    color: #cccccc; 
    line-height: 1.7; 
    font-size: 1.05em;
    margin-bottom: 30px;
}

/* --- FORM ELEMANLARI (KOYU TEMA) --- */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaaaaa;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 1px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Yöntem Seçici Radyo Butonları (Koyu Tema) */
.method-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}
.method-selector label {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cccccc;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s, border-color 0.3s;
}
.method-selector label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}
.method-selector input { margin-right: 10px; accent-color: #ffffff; }

/* --- LÜKS MİNİMALİST BUTONLAR --- */
.btn-primary {
    background: transparent; 
    border: 2px solid #ffffff; 
    color: #ffffff; 
    padding: 14px 32px; 
    border-radius: 12px; 
    font-size: 1.05em; 
    font-weight: bold; 
    cursor: pointer; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    transition: all 0.3s ease; 
    margin-top: 10px;
    display: inline-block;
}

.btn-primary:hover { 
    background: #ffffff; 
    color: #000000; 
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); 
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #aaaaaa;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1em;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s;
}
.btn-secondary:hover { 
    border-color: #ffffff; 
    color: #ffffff; 
    background: rgba(255, 255, 255, 0.05); 
}

/* --- KAMERA VE ANALİZ EKRANLARI (ADIM 3 & 4) --- */
.camera-container {
    width: 100%;
    height: 400px;
    background-color: #000000;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}

video, canvas {
    position: absolute; top:0; left:0; width: 100%; height: 100%; object-fit: cover;
}
canvas { z-index: 2; }

/* El Filigranı */
.hand-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px; 
    height: 260px;
    z-index: 3;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.4);
    display: none;
}

.hand-guide svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.3)); 
}

.flip-btn {
    position: absolute; top: 15px; right: 15px;
    background-color: rgba(0, 0, 0, 0.6); color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3); padding: 8px 14px; border-radius: 20px;
    cursor: pointer; z-index: 4; font-size: 0.85em; font-weight: bold;
    backdrop-filter: blur(5px); transition: 0.3s;
}
.flip-btn:hover { background-color: #ffffff; color: #000000; }

/* Durum ve Veri Paneli */
.status-panel, .result-summary {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.status-message {
    font-size: 1.05em;
    font-weight: bold;
    color: #aaaaaa;
    transition: color 0.3s;
}
.status-message.counting { color: #ffffff; text-shadow: 0 0 8px rgba(255,255,255,0.5); }

.live-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 0.95em;
    font-weight: 600;
    color: #ffffff;
}

.stat-item { display: flex; align-items: center; }
.color-box {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3); margin-left: 8px; background-color: #000;
}

.summary-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 1.1em; color: #dddddd;
}
.summary-item:last-child { border-bottom: none; }
.summary-item strong { color: #ffffff; }

/* Yükleme Animasyonu */
.ai-loading-container { padding: 30px; display: flex; flex-direction: column; align-items: center; }
.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 45px; height: 45px;
    animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- YENİ EKLENEN CANLI TERMİNAL STİLLERİ --- */
#loading-text { 
    font-family: 'Courier New', Courier, monospace; 
    font-size: 1.25em; 
    letter-spacing: 1px; 
    text-align: center; 
    line-height: 1.8; 
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px; 
}

#loading-text div {
    animation: fadeInLog 0.4s ease-out forwards;
    color: #888888; 
}

#loading-text div:last-child {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

@keyframes fadeInLog {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ADIM 5: LÜKS MİNİMALİST KONTROL PANELİ --- */
.futuristic-dashboard {
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important;
    width: 100vw !important; 
    height: 100vh !important;
    max-width: none !important; 
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%) !important;
    color: #ffffff !important;
    padding: 40px 5% !important;
    box-sizing: border-box !important;
    z-index: 9999 !important; 
    overflow-y: auto !important; 
    margin: 0 !important;
    border-radius: 0 !important; 
    border: none !important;
}

.cyber-title { 
    color: #ffffff; 
    letter-spacing: 6px; /* Harflerin arasını biraz daha açıp lüks hissiyatı artırdık */
    text-transform: uppercase; 
    font-size: 1.8em; /* 1.35em'den 1.8em'e çıkararak yazıyı ciddi oranda büyüttük */
    margin-bottom: 35px; /* Bar ile arasına biraz daha nefes alma boşluğu ekledik */
    text-align: center; 
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2); /* Hafif siber parlamayı artırdık */
    font-weight: 300;
}

.cyber-layout { 
    display: flex; 
    flex-direction: row; 
    gap: 50px; 
    align-items: stretch; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.cyber-image-panel {
    flex: 0.5; 
    max-width: 320px; 
    min-width: 250px; 
    /* align-self: center; ve max-height kısımlarını sildik, artık esnemekte özgür! */
    position: relative; 
    perspective: 1000px; 
    background: radial-gradient(circle, #ffffff 0%, #888888 100%);
    border-radius: 20px; 
    display: flex; 
    justify-content: center; 
    align-items: center; /* İçindeki saat resmini her zaman tam ortada tutar */
    border: 1px solid rgba(255,255,255,0.2); 
    padding: 20px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

#scraped-watch-image {
    width: 100%; 
    max-height: 320px; /* Saatin çok ezilmemesi için ideal yükseklik */
    object-fit: contain; 
    mix-blend-mode: multiply; /* Beyaz arkaplanı yokedip fonla kaynaştıran sihirli kod */
    transition: transform 0.1s ease-out; 
    position: relative; 
    z-index: 2; 
}

.cyber-data-panel { 
    flex: 1.2; 
    min-width: 320px; 
    display: flex; 
    flex-direction: column; 
    justify-content: stretch; /* İçindeki metin kutusunu uzamaya zorlar */
    text-align: left;
}

.segment-container { 
    background: rgba(255,255,255,0.03); backdrop-filter: blur(10px);
    padding: 25px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); 
}
.match-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 15px; }
.match-title { color: #aaaaaa; font-size: 0.9em; text-transform: uppercase; letter-spacing: 1px; }
#match-status-text { font-size: 1.8em; font-weight: bold; text-shadow: 0 0 15px rgba(255,255,255,0.2); }

.segment-bar { display: flex; gap: 5px; height: 8px; margin-bottom: 10px; }
.segment { flex: 1; background: #222222; border-radius: 3px; transition: background 0.5s ease; box-shadow: inset 0 1px 3px rgba(0,0,0,0.8); }
.segment-labels { display: flex; justify-content: space-between; font-size: 0.75em; color: #777777; text-transform: uppercase; }

.cyber-comment-box { 
    font-size: 1.1em; 
    line-height: 1.8; 
    color: #cccccc; 
    background: rgba(255, 255, 255, 0.03); 
    padding: 25px; 
    border-left: 4px solid #ffffff; 
    border-radius: 8px;
    flex: 1; /* En kritik kod: Metin az olsa bile kutuyu aşağıya kadar sündürür */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Yorum metnini kendi içinde dikey olarak ortalar */
    box-sizing: border-box;
}

.ai-recommendations { margin-top: 25px; padding-top: 15px; border-top: 1px dashed rgba(255,255,255,0.15); }
.ai-recommendations h5 { color: #ffffff; margin-bottom: 15px; font-size: 0.9em; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; }
.rec-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.rec-tag { 
    background: rgba(255, 255, 255, 0.05); color: #ffffff; padding: 10px 15px; 
    border-radius: 20px; font-size: 0.9em; border: 1px solid rgba(255, 255, 255, 0.3); transition: 0.3s;
}
.rec-tag:hover { background: rgba(255, 255, 255, 0.15); cursor: pointer; }

.btn-cyber { 
    background: transparent; border: 2px solid #ffffff; color: #ffffff; 
    padding: 18px; border-radius: 12px; font-size: 1.1em; font-weight: bold; 
    cursor: pointer; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; margin-top: 10px; 
}
.btn-cyber:hover { background: #ffffff; color: #000000; box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }

/* PC ve Tablet ekranları için özel genişleme ayarı */
@media (min-width: 768px) {
    .wizard-step {
        max-width: 900px;
        padding: 50px 60px;
    }
    
    .camera-container {
        height: 500px;
    }
}
/* Fütüristik Siber Uyarı Kutusu */
.cyber-warning-box {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 68, 68, 0.08);
    border-left: 4px solid #ff4444;
    color: #ff8888;
    font-size: 0.95em;
    text-align: left;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.05);
    animation: fadeIn 0.3s ease-in-out;
}

/* ai-results Ana Taşıyıcısı: Her şeyi dikeyde alt alta ve ortada tutar */
#ai-results {
    display: flex;
    flex-direction: column;
    align-items: center; /* Tüm blokları tam ortaya hizala */
    gap: 30px; /* Bloklar arasına nefes alma boşluğu */
    width: 100%;
}

/* Ortalanmış Skor Barı İçin Genişlik Sınırı */
.centered-element {
    width: 70%;
    max-width: 650px; /* Çok uzamasın diye sınır koyduk */
    margin: 0 auto;
}

/* Ortalanmış Buton İçin Özel Genişlik */
.btn-bottom {
    max-width: 200px;
    margin-top: 10px;
}

/* Ortadaki İkili Panelin (Saat ve Yorum) Hizalaması */
.cyber-layout { 
    display: flex; 
    flex-direction: row; 
    gap: 40px; 
    align-items: stretch; /* center yerine stretch yaptık ki kutular aynı boya uzasın */
    justify-content: center; 
    flex-wrap: wrap; 
    width: 100%;
}