:root {
    /* Daha derin ve profesyonel bir renk paleti */
    --bg: #0a0a0a;
    --surface: #161616;
    --surface-hover: #1f1f1f;
    --primary: #8b5cf6;
    --primary-variant: #7c3aed;
    --secondary: #03dac6;
    --error: #ef4444;
    --text: #f3f4f6;
    --text-sec: #9ca3af;
    --border: #27272a;
    
    /* Gölgeler ve Radius */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg); color: var(--text); padding-bottom: 90px; line-height: 1.6; overflow-x: hidden; }

/* Utils */
.hidden { display: none !important; }
.btn { border: none; padding: 12px 24px; border-radius: var(--radius-md); cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0.3px; }
.btn:active { transform: scale(0.97); }

.btn-primary { 
    background: linear-gradient(135deg, var(--primary), var(--primary-variant)); 
    color: #fff; 
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover { 
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4); 
    filter: brightness(1.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-text { background: transparent; color: var(--text-sec); }
.btn-text:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.btn-block { width: 100%; }
.full-width { width: 100%; margin-top: 20px; }

input, select, textarea { 
    width: 100%; 
    padding: 14px 16px; 
    margin-bottom: 16px; 
    background: #1c1c1c; 
    border: 1px solid var(--border); 
    color: var(--text); 
    border-radius: var(--radius-md); 
    font-size: 1rem; 
    transition: all 0.2s ease;
}
input:focus, select:focus, textarea:focus { 
    outline: none; 
    border-color: var(--primary); 
    background: #222; 
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); 
}
input::placeholder { color: #52525b; }

/* Landing & Auth */
.landing-container, .auth-container { 
    padding: 40px 24px; 
    text-align: center; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    background: radial-gradient(circle at top right, #1e1b4b 0%, var(--bg) 50%);
}
.hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 15px; 
    background: linear-gradient(to bottom right, #fff, #9ca3af); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    letter-spacing: -1.5px; 
    line-height: 1.1;
}
.hero p { color: var(--text-sec); font-size: 1.1rem; max-width: 600px; margin: 0 auto 30px; }
.auth-form { 
    background: rgba(22, 22, 22, 0.8); 
    backdrop-filter: blur(12px); 
    padding: 32px; 
    border-radius: var(--radius-xl); 
    margin-top: 24px; 
    border: 1px solid rgba(255,255,255,0.05); 
    box-shadow: var(--shadow-lg);
}
.switch-auth { margin-top: 20px; color: var(--text-sec); font-size: 0.9rem; }
.switch-auth span { color: var(--primary); cursor: pointer; font-weight: 600; text-decoration: none; }
.switch-auth span:hover { text-decoration: underline; }
.error-text { color: var(--error); font-size: 0.85rem; display: block; margin-bottom: 12px; text-align: left; background: rgba(239, 68, 68, 0.1); padding: 8px 12px; border-radius: 8px; }

/* Navbar */
.navbar { 
    position: sticky; 
    top: 0; 
    background: rgba(10, 10, 10, 0.8); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    padding: 16px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    z-index: 100; 
}
.location-badge { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.5px; display: flex; align-items: center; gap: 6px; }
.location-badge::before { content: '📍'; font-size: 1.2rem; filter: grayscale(0.5); }
.icon-btn { 
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.05);
    width: 42px; 
    height: 42px; 
    border-radius: 50%; 
    font-size: 1.2rem; 
    cursor: pointer; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: all 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); }
.nav-actions { display: flex; gap: 10px; }
/* NEW: Notification Badge */
.badge { 
    position: absolute; top: -2px; right: -2px; 
    min-width: 18px; height: 18px; 
    background: var(--error); 
    border-radius: 9px; 
    border: 2px solid var(--bg); 
    font-size: 0.65rem; font-weight: 700; 
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

/* Feed & Tabs */
.sub-header { position: sticky; top: 75px; background: var(--bg); z-index: 90; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tab { 
    flex: 1; 
    background: none; 
    border: none; 
    padding: 16px; 
    color: var(--text-sec); 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.95rem; 
    position: relative; 
    transition: color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); }
.tab.active::after { 
    content: ''; 
    position: absolute; 
    bottom: -1px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 40px; 
    height: 3px; 
    background: var(--primary); 
    border-radius: 10px; 
    box-shadow: 0 0 8px var(--primary);
}
.categories { display: flex; overflow-x: auto; padding: 12px 20px; gap: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.chip { 
    background: var(--surface); 
    padding: 8px 16px; 
    border-radius: 100px; 
    font-size: 0.85rem; 
    white-space: nowrap; 
    border: 1px solid var(--border); 
    cursor: pointer; 
    transition: all 0.2s; 
    color: var(--text-sec);
    font-weight: 500;
}
.chip:hover { background: var(--surface-hover); border-color: #444; }
.chip.active { 
    background: rgba(139, 92, 246, 0.15); 
    color: var(--primary); 
    border-color: rgba(139, 92, 246, 0.5); 
}

/* Post Card */
.post-card { 
    background: var(--surface); 
    margin: 20px 16px; 
    padding: 24px; 
    border-radius: var(--radius-lg); 
    border: 1px solid rgba(255,255,255,0.03); 
    box-shadow: var(--shadow-sm); 
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:active { transform: scale(0.995); }
.post-header { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-sec); margin-bottom: 16px; align-items: center; letter-spacing: 0.2px; }
.post-text { font-size: 1.15rem; line-height: 1.6; margin-bottom: 20px; white-space: pre-wrap; word-break: break-word; color: #f0f0f0; font-weight: 400; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reaction-btn { 
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.08); 
    color: var(--text-sec); 
    padding: 6px 14px; 
    border-radius: 100px; 
    font-size: 0.9rem; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    transition: all 0.2s; 
    font-weight: 500;
}
.reaction-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.reaction-btn.user-reacted { 
    border-color: rgba(139, 92, 246, 0.4); 
    background: rgba(139, 92, 246, 0.15); 
    color: #a78bfa; 
}
.add-reaction { border-style: dashed; opacity: 0.7; }
.add-reaction:hover { opacity: 1; border-color: var(--text-sec); }
.post-menu { margin-left: auto; color: var(--text-sec); cursor: pointer; font-size: 0.8rem; padding: 8px; opacity: 0.6; transition: all 0.2s; }
.post-menu:hover { opacity: 1; background: rgba(255,255,255,0.05); border-radius: 6px; }

/* FAB & Modal */
.fab { 
    position: fixed; 
    bottom: 30px; 
    right: 25px; 
    width: 64px; 
    height: 64px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, var(--primary), var(--primary-variant)); 
    color: #fff; 
    font-size: 2.2rem; 
    border: none; 
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5); 
    cursor: pointer; 
    z-index: 200; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding-bottom: 4px;
    transition: transform 0.2s, box-shadow 0.2s; 
}
.fab:hover { transform: scale(1.05) rotate(90deg); box-shadow: 0 15px 30px -5px rgba(139, 92, 246, 0.6); }
.fab:active { transform: scale(0.95); }

.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.7); 
    backdrop-filter: blur(8px);
    z-index: 300; 
    display: flex; 
    justify-content: center; 
    align-items: flex-end; 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal:not(.hidden) { opacity: 1; pointer-events: auto; }

.modal-content { 
    background: #18181b; 
    width: 100%; 
    padding: 32px 24px 40px; 
    border-radius: 28px 28px 0 0; 
    animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); 
    max-height: 85vh; 
    overflow-y: auto; 
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
}
.center-box { width: 90%; max-width: 420px; border-radius: 24px; margin-bottom: auto; margin-top: auto; border: 1px solid rgba(255,255,255,0.1); }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 24px; align-items: center; }
.modal-header h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }
.close-modal { 
    background: rgba(255,255,255,0.05); 
    border: none; 
    color: var(--text); 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    font-size: 1.5rem; 
    cursor: pointer; 
    line-height: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: background 0.2s;
}
.close-modal-icon {
    font-size: 2rem; background: transparent; border: none; color: white; cursor: pointer;
}
.close-modal:hover { background: rgba(255,255,255,0.15); }
.char-count { text-align: right; font-size: 0.8rem; color: var(--text-sec); margin-bottom: 12px; font-variant-numeric: tabular-nums; }

/* Emoji Picker */
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; max-height: 220px; overflow-y: auto; padding: 4px; }
.emoji-item { 
    font-size: 1.8rem; 
    text-align: center; 
    cursor: pointer; 
    padding: 12px; 
    border-radius: 16px; 
    background: rgba(255,255,255,0.02);
    transition: all 0.2s; 
}
.emoji-item:hover { transform: scale(1.1); background: rgba(255,255,255,0.08); }
.emoji-item.selected { background: rgba(139, 92, 246, 0.2); border: 2px solid var(--primary); transform: scale(1.05); }

/* Drawer (Animasyonlu) */
.drawer { 
    position: fixed; 
    top: 0; 
    right: 0; 
    width: 85%; 
    max-width: 360px; 
    height: 100%; 
    background: #18181b; 
    z-index: 400; 
    box-shadow: -10px 0 30px rgba(0,0,0,0.5); 
    padding: 24px; 
    transform: translateX(100%); 
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex !important; 
    flex-direction: column; 
    border-left: 1px solid rgba(255,255,255,0.05);
}
.drawer.hidden { transform: translateX(100%); display: flex !important; pointer-events: none; }
.drawer:not(.hidden) { transform: translateX(0); pointer-events: auto; }

.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.notif-list { flex: 1; overflow-y: auto; }

/* NEW: Notification Cards */
.notif-card { 
    padding: 16px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    font-size: 0.95rem; 
    background: rgba(255,255,255,0.03); 
    margin-bottom: 10px; 
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    display: flex; flex-direction: column; gap: 6px;
}
.notif-card:hover { background: rgba(255,255,255,0.06); }
.notif-card.unread { border-left: 3px solid var(--primary); background: rgba(139, 92, 246, 0.05); }
.notif-header { display: flex; gap: 8px; font-weight: 600; font-size: 0.9rem; align-items: center; }
.notif-time { font-size: 0.75rem; color: var(--text-sec); margin-top: 4px; }
.btn-view-post { margin-top: 8px; padding: 6px 12px; font-size: 0.8rem; align-self: flex-start; background: rgba(255,255,255,0.1); }

/* NEW: Drawer Footer */
.drawer-footer { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; color: var(--text-sec); font-size: 0.8rem; }
.drawer-footer a { color: var(--text-sec); text-decoration: none; margin: 0 5px; transition: color 0.2s; }
.drawer-footer a:hover { color: #fff; text-decoration: underline; }

@keyframes slideUp { from { transform: translateY(100%); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }

/* Desktop Tweaks */
@media (min-width: 768px) {
    .modal-content.bottom-sheet { width: 480px; margin: auto; border-radius: 24px; bottom: auto; top: auto; }
    .post-card { margin: 24px auto; max-width: 680px; }
    .navbar { padding: 16px 15%; }
    .sub-header { padding-left: 15%; padding-right: 15%; }
}

/* Menu Modal Items */
.menu-options { display: flex; flex-direction: column; gap: 8px; }
.menu-btn {
    background: rgba(255,255,255,0.05);
    border: none; padding: 16px; border-radius: 16px;
    color: #fff; font-size: 1rem; text-align: center; cursor: pointer;
    transition: background 0.2s;
}
.menu-btn:hover { background: rgba(255,255,255,0.1); }
.menu-btn.danger { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.menu-btn.cancel { margin-top: 10px; background: transparent; border: 1px solid rgba(255,255,255,0.1); }

/* User List in Modal */
.user-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.user-item { padding: 12px; background: rgba(255,255,255,0.03); border-radius: 12px; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.user-avatar-small { width: 30px; height: 30px; background: linear-gradient(135deg, #444, #666); border-radius: 50%; }

.emoji-item.active-reaction {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.3);
    transform: scale(1.1);
}