:root { --bg: #05070a; --glass: rgba(15, 23, 42, 0.8); --accent: #0ea5e9; --border: rgba(255, 255, 255, 0.1); }
body { background: var(--bg); color: #f8fafc; font-family: 'Inter', system-ui, sans-serif; margin: 0; overflow: hidden; }

/* YAPAY ZEKA NSFW SANSÜRÜ */
.nsfw-blur { filter: blur(40px) grayscale(100%) !important; transition: filter 0.5s ease; }
#nsfw-warning { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(10px); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 15px; z-index: 30; text-align: center; border: 2px solid #ef4444; border-radius: 16px;}

.offscreen { position: absolute; top: -9999px; left: -9999px; visibility: hidden; pointer-events: none; }

.network-indicator { position: absolute; top: 12px; right: 45px; background: rgba(0,0,0,0.6); padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: bold; z-index: 10; display: flex; align-items: center; gap: 5px; color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.signal-good { color: #22c55e; } 
.signal-fair { color: #eab308; } 
.signal-poor { color: #ef4444; } 

.popup-menu { position: absolute; bottom: 100%; left: 0; width: 100%; padding: 15px; box-sizing: border-box; border-radius: 16px; border: 1px solid var(--accent); z-index: 50; margin-bottom: 10px; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); }
.popup-menu h4 { margin: 0 0 10px 0; font-size: 12px; color: var(--accent); text-transform: uppercase; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.fx-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.fx-grid button { background: #1e293b; color: white; border: 1px solid var(--border); padding: 6px 10px; border-radius: 6px; font-size: 11px; cursor: pointer; transition: 0.2s; }
.fx-grid button:hover { background: var(--accent); color: black; }

.header-tools { display: flex; align-items: center; gap: 8px; }
.translate-select { background: #1e293b; color: white; border: 1px solid var(--accent); padding: 4px 10px; border-radius: 6px; font-size: 11px; outline: none; font-weight: bold; cursor: pointer; }
.translated-text { display: block; font-size: 15px; margin-bottom: 5px; color: #fff; }
.original-text { display: block; font-size: 11px; opacity: 0.5; font-style: italic; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 5px; margin-top: 2px; }

/* SESLİ MESAJ */
.chat-audio { max-width: 250px; height: 35px; outline: none; margin-top: 8px; border-radius: 20px; }
.recording-active { background: #ef4444 !important; animation: pulseRecord 1s infinite; color: white !important;}
@keyframes pulseRecord { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* EFEKTLER */
#typing-indicator { padding: 5px 30px; font-size: 12px; color: var(--accent); font-style: italic; background: #020617; }
.dots { animation: blink 1.5s infinite; }
@keyframes blink { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.btn-active { background: var(--accent) !important; color: #000 !important; box-shadow: 0 0 10px var(--accent); }

.reaction-bar { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 5px; z-index: 20; }
.reaction-bar button { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; padding: 6px; cursor: pointer; transition: 0.2s; font-size: 14px; }
.reaction-bar button:hover { transform: scale(1.2); background: rgba(0,0,0,0.8); }
.floating-emoji { position: absolute; bottom: 15%; left: 50%; font-size: 3rem; animation: floatUp 2.5s ease-out forwards; pointer-events: none; z-index: 50; text-shadow: 0 0 10px rgba(0,0,0,0.5); }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(0.5); opacity: 1; } 100% { transform: translate(-50%, -150px) scale(1.5); opacity: 0; } }

#pip-btn { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.6); border: 1px solid var(--border); color: white; border-radius: 6px; cursor: pointer; z-index: 20; padding: 4px 8px; font-weight: bold; }
#pip-btn:hover { background: var(--accent); color: black; }
.chat-image { max-width: 100%; border-radius: 8px; margin-top: 5px; border: 1px solid rgba(255,255,255,0.1); }
.chat-file { display: inline-block; background: rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--accent); margin-top: 5px; font-weight: bold; border: 1px solid var(--border); }
.tool-btn { background: #1e293b; color: white; border: 1px solid var(--border); border-radius: 10px; padding: 0 15px; cursor: pointer; font-size: 16px; transition: 0.2s; }
.tool-btn:hover { background: var(--accent); color: black; }

/* ANA SAYFA */
#online-badge { position: fixed; top: 25px; right: 30px; background: rgba(0,0,0,0.5); border: 1px solid var(--border); padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: bold; color: var(--accent); z-index: 1000; backdrop-filter: blur(5px); }
#setup-screen { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; }
.hero-section { text-align: center; }
.world-icon { font-size: 80px; margin-bottom: 20px; animation: pulse 3s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.1); } }
.hero-section h1 { margin: 0; font-size: 2.5rem; letter-spacing: -1px; }

.portal-grid { display: flex; gap: 30px; width: 100%; max-width: 900px; }
.portal-card { flex: 1; padding: 40px; border-radius: 24px; border: 1px solid var(--border); text-align: center; }
.glass { background: var(--glass); backdrop-filter: blur(12px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.interest-box label { font-size: 11px; font-weight: 800; color: #94a3b8; display: block; margin-bottom: 10px; }
.tag-container { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 20px; min-height: 40px;}
.tag { background: var(--accent); color: white; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: bold; }
#interest-input, .input-stack input { background: transparent; border: none; color: white; outline: none; width: 100%; }
.input-stack { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }
.input-stack input { background: rgba(0,0,0,0.2); border: 1px solid var(--border); padding: 14px; border-radius: 10px; font-size: 15px; }

/* SOHBET ARAYÜZÜ */
.app-layout { display: flex; height: 100vh; gap: 40px; padding: 20px 40px 20px 0; transition: 0.4s ease-in-out; }
.camera-sidebar { width: 320px; background: #0f172a; padding: 25px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--border); overflow-y: auto; transition: 0.4s; position: relative;}
.cam-group { display: flex; flex-direction: column; gap: 10px; position: relative; }
.vid-container { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); transition: 0.4s; }
.vid-container.me { border: 2px solid var(--accent); }
video { width: 100%; height: 100%; object-fit: cover; }
.label { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.6); padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: bold; z-index: 10; }

.media-controls { display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); transition: 0.4s; position: relative;}
.control-item { display: flex; gap: 10px; align-items: center; }
.control-item select { flex: 1; background: #1e293b; color: white; border: 1px solid var(--border); padding: 8px; border-radius: 8px; font-size: 12px; outline: none; }
.control-item button { background: #334155; border: none; color: white; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: 0.2s; font-size: 14px; }
.btn-off { background: #ef4444 !important; }
.control-text { font-size: 11px; color: #94a3b8; font-weight: bold; flex: 1; }

.chat-main { flex: 1; display: flex; flex-direction: column; background: #020617; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; margin: 20px 0; transition: 0.4s; }
#chat-header { padding: 20px 25px; border-bottom: 1px solid var(--border); font-weight: bold; color: var(--accent); background: #0f172a; display: flex; justify-content: space-between; align-items: center;}
#chat-messages { flex: 1; padding: 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }

.msg { padding: 12px 18px 24px 18px; border-radius: 14px; max-width: 75%; line-height: 1.5; font-size: 15px; word-wrap: break-word; position: relative; }
.msg-local { background: var(--accent); align-self: flex-end; color: #000; }
.msg-remote { background: #1e293b; align-self: flex-start; color: white; }
.msg b { display: block; font-size: 11px; opacity: 0.7; margin-bottom: 4px; text-transform: uppercase; }

.msg-status { position: absolute; bottom: 4px; right: 12px; font-size: 12px; font-weight: 900; letter-spacing: -1px; transition: all 0.3s ease; }
.status-sent { color: rgba(0,0,0,0.4); } 
.status-read { color: #fff !important; text-shadow: 0 0 5px rgba(255,255,255,0.8); }

.chat-bottom-section { background: #0f172a; border-top: 1px solid var(--border); }
.chat-input-row { padding: 20px; display: flex; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
#chat-input { flex: 1; background: #020617; border: 1px solid var(--border); border-radius: 12px; padding: 15px; color: white; outline: none; font-size: 15px; }
#btn-send { background: var(--accent); color: #000; font-weight: bold; border: none; padding: 0 25px; border-radius: 10px; cursor: pointer; }

.chat-actions { display: flex; justify-content: flex-end; gap: 15px; padding: 15px 20px; }
.btn-glow { background: var(--accent); color: #000; border: none; padding: 15px 30px; border-radius: 12px; font-weight: bold; cursor: pointer; transition: 0.3s; width: 100%; }
.btn-glow:hover { box-shadow: 0 0 20px rgba(14, 165, 233, 0.4); }
.btn-small { width: auto; padding: 12px 25px; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); padding: 15px; border-radius: 12px; font-weight: bold; cursor: pointer; width: 100%; }
.btn-danger { background: #ef4444; color: white; border: none; padding: 12px 25px; border-radius: 10px; font-weight: bold; cursor: pointer; }

.hidden { display: none !important; }

/* FOCUS MODE */
.focus-mode .chat-main { display: none !important; }
.focus-mode { padding: 20px !important; }
.focus-mode .camera-sidebar { width: 100%; flex-direction: row; border: none; background: transparent; padding: 0; gap: 20px; overflow: hidden; }
.focus-mode .cam-group { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.focus-mode .vid-container { height: 85vh; aspect-ratio: unset; }
.focus-mode .media-controls { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); flex-direction: row; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.8); z-index: 100; padding: 10px 20px; border-radius: 50px; }
.focus-mode .media-controls .control-item select, .focus-mode .media-controls .control-item .control-text { display: none; }
.focus-mode .media-controls .control-item button { border-radius: 50%; width: 45px; height: 45px; font-size: 18px; }

/* =========================================
   MOBİL UYUMLULUK (RESPONSIVE) AYARLARI
   ========================================= */
@media (max-width: 850px) {
    .portal-grid { flex-direction: column; gap: 20px; }
    .hero-section h1 { font-size: 2rem; }
    #setup-screen { padding: 20px; height: auto; min-height: 100vh; justify-content: flex-start; padding-top: 80px; }
    #online-badge { top: 15px; right: 15px; padding: 6px 12px; font-size: 11px; }

    .app-layout { flex-direction: column; padding: 10px; gap: 10px; height: 100vh; overflow: hidden; }
    .camera-sidebar { width: 100%; max-height: 45vh; flex-direction: row; flex-wrap: wrap; padding: 10px; border-right: none; border-bottom: 1px solid var(--border); border-radius: 20px; overflow-y: auto; }
    .cam-group { flex: 1 1 45%; min-width: 140px; }

    .media-controls { flex: 1 1 100%; flex-direction: row; justify-content: center; flex-wrap: wrap; padding: 10px; gap: 15px; }
    .control-item .control-text, .control-item select { display: none; }
    .control-item button { width: 45px; height: 45px; border-radius: 50%; font-size: 18px; display: flex; align-items: center; justify-content: center; }

    .chat-main { margin: 0; flex: 1; border-radius: 20px; }
    #chat-header { flex-direction: column; gap: 10px; padding: 15px; text-align: center; }
    .chat-input-row { padding: 12px; gap: 8px; }
    #chat-input { padding: 12px; font-size: 14px; }
    #btn-send { padding: 0 15px; }
    .tool-btn { padding: 0 10px; font-size: 14px; }
    .chat-actions { padding: 10px 15px; justify-content: space-between; }
    .btn-glow, .btn-danger { padding: 10px 20px; font-size: 14px; }
}

@media (max-width: 400px) {
    .cam-group { flex: 1 1 100%; }
    .camera-sidebar { max-height: 55vh; }
}