/* --- TEMA DEĞİŞKENLERİ --- */
:root { --bg-color: #ffffff; --text-color: #262626; --border-color: #dbdbdb; --nav-bg: #ffffff; --input-bg: #fafafa; --story-ring-bg: #ffffff; --secondary-text: #8e8e8e; --chat-me: #0095f6; --chat-them: #efefef; --chat-them-text: #262626; }
body.dark-mode { --bg-color: #000000; --text-color: #f5f5f5; --border-color: #262626; --nav-bg: #000000; --input-bg: #121212; --story-ring-bg: #000000; --secondary-text: #a8a8a8; --chat-me: #0095f6; --chat-them: #262626; --chat-them-text: #f5f5f5; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-color); color: var(--text-color); transition: background-color 0.3s, color 0.3s; }
#app-container { max-width: 480px; margin: 0 auto; background-color: var(--bg-color); min-height: 100vh; position: relative; border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }

/* MENÜLER, HİKAYELER VE GÖNDERİLER */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; position: sticky; top: 0; background: var(--bg-color); z-index: 100; border-bottom: 1px solid var(--border-color); }
.header-left, .header-right { width: 30px; font-size: 24px; color: var(--text-color); }
.header-center { font-size: 18px; font-weight: bold; display: flex; align-items: center; gap: 5px; }
.stories-container { display: flex; gap: 15px; padding: 10px 15px; overflow-x: auto; border-bottom: 1px solid var(--border-color); }
.stories-container::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 70px; cursor: pointer; }
.story-ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); margin-bottom: 5px; }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--story-ring-bg); object-fit: cover; }
.story.self .story-ring { background: transparent; padding: 0; }
.story.self .story-ring img { border: none; }
.story .add-btn { position: absolute; bottom: 20px; right: 0; background: #0095f6; color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 14px; border: 2px solid var(--bg-color); }
.story span { font-size: 12px; color: var(--text-color); text-overflow: ellipsis; white-space: nowrap; overflow: hidden; max-width: 70px; }

.post { margin-bottom: 20px; }
.post-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; }
.post-user-info { display: flex; align-items: center; gap: 10px; }
.post-user-info img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); }
.post-user-details { display: flex; flex-direction: column; }
.post-username { font-weight: bold; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.blue-tick { color: #0095f6; font-size: 12px; }
.post-audio { font-size: 12px; color: var(--secondary-text); }
.post-content img, .post-content video { width: 100%; height: auto; display: block; }
.post-action-icons { display: flex; gap: 15px; font-size: 24px; cursor: pointer; align-items: center; }

@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.like-btn { transition: 0.1s; }
.like-btn.liked { color: #ed4956 !important; animation: heartPop 0.3s ease; }
.comment-input-area { display: flex; align-items: center; padding: 0 15px 15px 15px; gap: 10px; }
.comment-input-area input { flex: 1; background: transparent; border: none; color: var(--text-color); font-size: 14px; outline: none; }
.comment-input-area button { background: transparent; border: none; color: #0095f6; font-weight: bold; font-size: 14px; cursor: pointer; }

/* ALT MENÜ VE FORMLAR */
#main-content { padding-bottom: 60px; min-height: calc(100vh - 110px); }
#main-content.no-nav { padding-bottom: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.bottom-nav { display: flex; justify-content: space-around; align-items: center; position: fixed; bottom: 0; width: 100%; max-width: 480px; height: 50px; background-color: var(--nav-bg); border-top: 1px solid var(--border-color); z-index: 100; }
.bottom-nav a { color: var(--text-color); font-size: 24px; text-decoration: none; transition: transform 0.1s; }
.bottom-nav a:active { transform: scale(0.9); }
.nav-profile-img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--text-color); object-fit: cover; }
.auth-box { width: 100%; max-width: 350px; padding: 30px 20px; text-align: center; }
.auth-logo { font-size: 40px; font-weight: bold; font-family: 'Brush Script MT', cursive; margin-bottom: 30px; color: var(--text-color);}
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; background-color: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 3px; padding: 12px; font-size: 14px; outline: none; }
.btn-primary { width: 100%; background-color: #0095f6; color: white; border: none; border-radius: 8px; padding: 12px; font-size: 14px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.auth-links { margin-top: 20px; font-size: 14px; color: var(--secondary-text); }
.auth-links a { color: #0095f6; font-weight: bold; text-decoration: none; }
.upload-container { padding: 15px; }
.upload-preview-box { width: 100%; aspect-ratio: 1/1; background-color: var(--input-bg); border: 2px dashed var(--border-color); border-radius: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; overflow: hidden; position: relative; margin-bottom: 15px; }
.upload-preview-box i { font-size: 40px; color: var(--secondary-text); margin-bottom: 10px; }
.upload-preview-box span { color: var(--secondary-text); font-weight: bold; }
.upload-tabs { display: flex; gap: 10px; margin-bottom: 15px; }
.upload-tab { flex: 1; padding: 10px; text-align: center; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; font-weight: bold; color: var(--secondary-text); transition: 0.2s; }
.upload-tab input { display: none; }
.upload-tab.active { background: #0095f6; color: white; border-color: #0095f6; }
#toast-container { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.toast { padding: 12px 20px; border-radius: 20px; color: white; font-size: 14px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.5); transition: opacity 0.3s; }
.toast-success { background-color: #28a745; }
.toast-error { background-color: #dc3545; }

/* 💬 YENİ EKLENEN DM / MESAJLAŞMA TASARIMLARI */
.inbox-list { list-style: none; }
.inbox-item { display: flex; align-items: center; padding: 15px; border-bottom: 1px solid var(--border-color); text-decoration: none; color: var(--text-color); transition: 0.2s; }
.inbox-item:active { background-color: var(--input-bg); }
.inbox-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-right: 15px; border: 1px solid var(--border-color); }
.inbox-info { flex: 1; overflow: hidden; }
.inbox-name { font-weight: bold; font-size: 15px; margin-bottom: 3px; display: flex; align-items: center; gap: 5px;}
.inbox-last-msg { font-size: 13px; color: var(--secondary-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sohbet (Chat) Ekranı */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 110px); }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 75%; padding: 10px 15px; border-radius: 20px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.chat-bubble.me { align-self: flex-end; background-color: var(--chat-me); color: white; border-bottom-right-radius: 5px; }
.chat-bubble.them { align-self: flex-start; background-color: var(--chat-them); color: var(--chat-them-text); border-bottom-left-radius: 5px; }
.chat-time { font-size: 10px; opacity: 0.7; margin-top: 5px; text-align: right; display: block; }
.chat-input-container { padding: 10px 15px; background: var(--bg-color); border-top: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; }
.chat-input-container input { flex: 1; background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 12px 15px; border-radius: 30px; outline: none; font-size: 14px; }
.chat-input-container button { background: transparent; border: none; color: #0095f6; font-size: 20px; cursor: pointer; padding: 5px; }

/* SOHBET (CHAT) MODU EKRAN AYARI */
#main-content.chat-mode { padding-bottom: 0; min-height: 100vh; display: block; }

/* 🔍 KEŞFET (EXPLORE) IZGARASI */
.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.explore-item { position: relative; aspect-ratio: 1/1; cursor: pointer; background: var(--border-color); }
.explore-item img, .explore-item video { width: 100%; height: 100%; object-fit: cover; }
.explore-icon { position: absolute; top: 8px; right: 8px; color: white; font-size: 16px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

/* ❤️ BİLDİRİMLER (NOTIFICATIONS) */
.notif-list { list-style: none; }
.notif-item { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--border-color); gap: 10px; transition: 0.2s; }
.notif-item:active { background-color: var(--input-bg); }
.notif-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); }
.notif-content { flex: 1; font-size: 14px; line-height: 1.4; color: var(--text-color); }
.notif-time { font-size: 12px; color: var(--secondary-text); margin-top: 2px; }
.notif-post-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border-color); }