/* --- DİNAMİK TEMA DEĞİŞKENLERİ --- */
:root {
    --bg-color: #1a1a24; 
    --glass-bg: rgba(30, 30, 40, 0.95);
    --text-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: #2f3542;
    --msg-yabanci-bg: rgba(0, 0, 0, 0.6);
    --msg-yabanci-text: #ffffff;
    --chat-bg: rgba(30, 30, 40, 0.8);
    --topbar-bg: rgba(0, 0, 0, 0.6);
    --controls-bg: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
    --bg-color: #e2e8f0; 
    --glass-bg: rgba(255, 255, 255, 0.98);
    --text-color: #2d3436;
    --border-color: rgba(0, 0, 0, 0.15);
    --input-bg: #ffffff;
    --msg-yabanci-bg: rgba(255, 255, 255, 0.8);
    --msg-yabanci-text: #2d3436;
    --chat-bg: rgba(255, 255, 255, 0.8);
    --topbar-bg: rgba(255, 255, 255, 0.7);
    --controls-bg: rgba(255, 255, 255, 0.8);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; position: fixed; top: 0; left: 0; overflow: hidden; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-color); transition: background-color 0.6s ease, color 0.6s ease; }

/* --- ANİMASYONLAR --- */
.fade-out-anim { animation: fadeOut 0.4s forwards; }
.fade-in-anim { animation: fadeIn 0.5s forwards; }
@keyframes fadeOut { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes pulseText { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }
@keyframes pulse-tv { 0% { box-shadow: 0 0 5px rgba(255, 71, 87, 0.4); } 50% { box-shadow: 0 0 15px rgba(255, 71, 87, 0.9); } 100% { box-shadow: 0 0 5px rgba(255, 71, 87, 0.4); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- LOGO TASARIMI --- */
.logo-container { display: flex; align-items: center; cursor: pointer; user-select: none; transition: transform 0.2s ease; }
.logo-container:hover { transform: scale(1.05); }
.logo-togle { font-size: 28px; font-weight: 900; letter-spacing: -1px; background: linear-gradient(45deg, #1e90ff, #2ed573); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0px 4px 15px rgba(30, 144, 255, 0.3); }
.logo-tv { background-color: #ff4757; color: white; font-size: 14px; font-weight: bold; padding: 3px 6px; border-radius: 6px; margin-left: 5px; letter-spacing: 1px; box-shadow: 0 0 10px rgba(255, 71, 87, 0.5); animation: pulse-tv 2s infinite; }

/* --- MODALLAR VE GİRİŞ KUTULARI --- */
#login-page, .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-color); display: flex; justify-content: center; align-items: center; z-index: 5000; }
.modal-overlay { background: rgba(0, 0, 0, 0.8); z-index: 10000;}
.login-box { background: var(--glass-bg); padding: 40px; border-radius: 20px; width: 380px; max-height: 95vh; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; text-align: center; border: 1px solid var(--border-color); box-shadow: 0 15px 35px rgba(0,0,0,0.2); transition: 0.6s ease; }
.login-box h2 { margin-top: 0; }
.login-box select, .login-box textarea, .login-box input { padding: 12px; border-radius: 10px; border: 1px solid var(--border-color); background-color: var(--input-bg); color: var(--text-color); font-size: 15px; outline: none; transition: 0.3s; }
.login-box select:focus, .login-box textarea:focus { border-color: #1e90ff; }

.start-btn { background: linear-gradient(45deg, #2ed573, #1e90ff); color: white; font-weight: bold; border: none; padding: 15px; border-radius: 10px; font-size: 16px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(46, 213, 115, 0.4); }
.vip-btn { background: linear-gradient(45deg, #f1c40f, #e67e22); color: #000; font-weight: bold; border: none; border-radius: 10px; cursor: pointer; transition: 0.2s; }
.vip-btn:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4); }
.theme-btn-login { background: transparent; border: 1px solid var(--border-color); color: var(--text-color); padding: 8px; border-radius: 8px; cursor: pointer; transition: 0.3s; }

/* ================================================= */
/* YENİ NESİL TAM EKRAN ŞABLONU                      */
/* ================================================= */

#chat-page { display: flex; flex-direction: column; height: 100%; width: 100%; background: var(--bg-color); }

/* ÜST BAR VE HARİCİ REKLAM ALANI */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: 60px; background: var(--topbar-bg); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(10px); z-index: 50; transition: 0.6s ease; }
.center-stats { font-weight: bold; font-size: 15px; }
.right-actions { display: flex; gap: 10px; align-items: center; }
.theme-btn-chat { background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.6s ease; }
.right-actions select { padding: 6px 10px; font-weight: bold; border-radius: 8px; background: var(--input-bg); color: var(--text-color); border: 1px solid var(--border-color); transition: 0.6s ease; outline: none; }

/* REKLAM KUTUSU */
.network-banner { position: absolute; top: 75px; left: 50%; transform: translateX(-50%); z-index: 99999; max-width: 90%; pointer-events: auto; display: flex; justify-content: center; }

/* ANA VİDEO ALANI */
.video-container { position: relative; flex: 1; background: #000; overflow: hidden; }

/* VİDEO 1: TAM EKRAN */
.video-box.fullscreen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.video-box.fullscreen video { width: 100%; height: 100%; object-fit: cover; }

/* VİDEO 2: SOL ÜST KÖŞE PIP */
.video-box.pip { position: absolute; top: 20px; left: 20px; width: 150px; height: 200px; z-index: 10; border: 2px solid rgba(255,255,255,0.7); border-radius: 15px; cursor: pointer; transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 10px 25px rgba(0,0,0,0.6); overflow: hidden; background: #111; }
.video-box.pip:hover { transform: scale(1.03); border-color: #1e90ff; box-shadow: 0 15px 35px rgba(30,144,255,0.4); }
.video-box.pip video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

/* VİDEO ETİKETLERİ VE ŞİKAYET BUTONU */
.video-label { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 11px; z-index: 2; pointer-events: none; letter-spacing: 1px; border: 1px solid rgba(255,255,255,0.1); }
.report-btn { position: absolute; top: 12px; right: 12px; background: #ff4757; color: white; border: none; padding: 6px 15px; border-radius: 12px; font-weight: bold; cursor: pointer; z-index: 20; transition: 0.2s; box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4); }
.report-btn:hover { background: #ff6b81; transform: scale(1.05); }

/* SOL ALT SAYDAM MESAJLAŞMA */
.chat-overlay { 
    position: absolute; bottom: 20px; left: 20px; z-index: 20; 
    width: 350px; max-height: 40vh; overflow-y: auto; 
    display: flex; flex-direction: column; gap: 8px; 
    pointer-events: none; padding-right: 10px; 
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
}
.chat-overlay div { padding: 10px 15px; border-radius: 15px; width: fit-content; max-width: 85%; pointer-events: auto; font-size: 14px; word-break: break-word; animation: popIn 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.msg-sen { background: linear-gradient(45deg, #1e90ff, #3742fa); color: #fff; align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid rgba(255,255,255,0.1); } 
.msg-yabanci { background: var(--msg-yabanci-bg); color: var(--msg-yabanci-text); align-self: flex-start; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.1); border-bottom-left-radius: 4px; }
.msg-sistem { background: transparent !important; color: #ff4757; font-weight: bold; font-size: 13px; align-self: flex-start; text-shadow: 1px 1px 2px #000; border: none !important; box-shadow: none !important; }
.typing-indicator { font-size: 13px; color: #1e90ff; font-style: italic; text-shadow: 1px 1px 2px #000; pointer-events: none; animation: pulseText 1.5s infinite; }

/* KONTROL BARI */
.controls-bar { display: flex; justify-content: space-between; align-items: center; min-height: 80px; padding: 15px 20px; background: var(--controls-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border-color); gap: 15px; z-index: 50; transition: 0.6s ease; }

/* Mesaj Yazma */
.input-group { display: flex; flex: 1; gap: 10px; background: rgba(0,0,0,0.2); padding: 5px; border-radius: 25px; border: 1px solid var(--border-color); transition: 0.6s ease; }
.input-group input { flex: 1; border-radius: 20px; border: none; padding: 10px 20px; background: transparent; color: var(--text-color); outline: none; font-size: 14px; }
.send-btn { border-radius: 20px; background: #1e90ff; color: #fff; border: none; padding: 0 25px; font-weight: bold; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(30,144,255,0.3); }
.send-btn:hover { background: #3742fa; transform: translateY(-1px); }

/* Çeviri */
.middle-group { flex: 0 0 auto; }
.middle-group select { height: 44px; border-radius: 12px; border: 1px solid var(--border-color); padding: 0 15px; background: var(--input-bg); color: var(--text-color); outline: none; font-size: 14px; transition: 0.6s ease; }

/* İleri ve Bitir Butonları */
.action-buttons { display: flex; gap: 12px; flex: 0 0 auto; }
.next-btn, .end-btn { font-size: 15px; padding: 0 25px; height: 44px; border-radius: 15px; font-weight: bold; border: none; color: white; cursor: pointer; letter-spacing: 0.5px; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.next-btn { background: linear-gradient(45deg, #ffa502, #ff7f50); box-shadow: 0 5px 15px rgba(255, 165, 2, 0.3); }
.next-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 8px 20px rgba(255, 165, 2, 0.5); }
.next-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.end-btn { background: #ff4757; box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3); }
.end-btn:hover { background: #ff6b81; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 71, 87, 0.5); }

/* EN ALT BİLGİ BARI */
.site-footer { height: 25px; display: flex; justify-content: center; align-items: center; background: #050505; color: #666; font-size: 10px; letter-spacing: 1px; font-weight: bold; text-transform: uppercase; }

/* REKLAM VE YÜKLENİYOR */
#searching-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); z-index: 500; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; font-size: 20px; font-weight: bold; }
.spinner { width: 60px; height: 60px; border: 4px solid rgba(255,255,255,0.1); border-top: 4px solid #1e90ff; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #555; border-radius: 10px; }

/* --- REKLAM KATMANI TASARIMI --- */
#ads-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px); z-index: 100000; display: none; justify-content: center; align-items: center; }
#interstitial-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
.skip-ad-btn { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); z-index: 100001; padding: 15px 40px; border: none; border-radius: 30px; font-weight: bold; box-shadow: 0 5px 15px rgba(0,0,0,0.8); background: rgba(255, 255, 255, 0.2); color: #fff; cursor: not-allowed; transition: 0.3s; }
.skip-ad-btn.active { background: #fff; color: #000; cursor: pointer; }


/* ================================================= */
/* MOBİL TASARIM (KESİN ÇÖZÜMLER VE YENİ DÜZEN)      */
/* ================================================= */
@media (max-width: 768px) {
    .top-bar { padding: 0 10px; height: 50px; }
    .logo-togle { font-size: 22px; }
    .center-stats { font-size: 13px; }
    .theme-btn-chat { padding: 4px 8px; font-size: 11px; }
    .right-actions select { padding: 4px 8px; font-size: 11px; }
    
    .video-box.pip { width: 90px; height: 130px; top: 10px; left: 10px; border-width: 2px; border-radius: 10px; }
    .chat-overlay { width: calc(100vw - 20px); bottom: 10px; left: 10px; }
    
    .controls-bar { flex-direction: row; flex-wrap: wrap; padding: 8px 10px; gap: 8px; min-height: auto; }
    
    .input-group { width: 100%; flex: 1 1 100%; height: 38px; padding: 2px; }
    .input-group input { padding: 5px 15px; font-size: 13px; }
    .send-btn { padding: 0 15px; font-size: 13px; }
    
    .middle-group { width: calc(40% - 4px); flex: 0 0 auto; height: 38px; }
    .middle-group select { width: 100%; height: 100%; font-size: 12px; padding: 0 5px; }
    
    .action-buttons { width: calc(60% - 4px); flex: 0 0 auto; height: 38px; gap: 8px; }
    .action-buttons button { flex: 1; padding: 0; height: 100%; font-size: 13px; display: flex; align-items: center; justify-content: center; }

    .skip-ad-btn { width: 80%; max-width: 300px; padding: 12px 0; font-size: 15px; }
}