@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* --- ULTRA-MODERN DARK & LIGHT TASARIM SİSTEMİ --- */
:root {
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    
    /* Açık Tema Değişkenleri */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #4f46e5;       /* Indigo */
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    
    --accent: #d97706;        /* Amber */
    --accent-hover: #b45309;
    --accent-light: #fef3c7;
    
    --danger: #ef4444;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Koyu Tema (Ultra-Modern Obsidian Dark) */
    --bg-primary: #090d16;
    --bg-secondary: #121929;
    --bg-tertiary: #1a2438;
    --bg-glass: rgba(18, 25, 41, 0.85);
    --border-color: #233148;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;       /* Electric Indigo */
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-light: rgba(245, 158, 11, 0.15);
    
    --danger: #f87171;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.25);
}

/* --- SIFIRLAMA VE GENEL STİLLER --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 14.5px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

input, textarea, select {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

/* --- HEADER & NAVBAR --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
    transition: transform var(--transition-fast);
    cursor: pointer;
}
.brand-logo-img:hover {
    transform: scale(1.06);
}

.logo-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.logo-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
}

.logo-text p {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-item {
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.nav-item.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.85rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.user-panel:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: rotate(15deg);
}

/* --- MAIN LAYOUT --- */
main {
    max-width: 1200px;
    width: 100%;
    margin: 1.75rem auto;
    padding: 0 1.5rem;
    flex: 1;
}

.view-section {
    display: none;
}
.view-section.active-view {
    display: block;
    animation: fadeIn 0.25s ease;
}

/* --- HERO CARD --- */
.hero-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: var(--primary);
    filter: blur(90px);
    opacity: 0.15;
    pointer-events: none;
}

.hero-logo-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
    flex-shrink: 0;
}

.hero-tag {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.hero-content p {
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
}

/* --- STATS GRID --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-badge {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    font-size: 0.85rem;
}

.stat-info h3 {
    font-size: 1.4rem;
    font-weight: 800;
}

.stat-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- WELCOME SECTIONS --- */
.welcome-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.75rem;
}

.card-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.card-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.9rem;
    margin-bottom: 1.25rem;
}

.card-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- FEED LAYOUT & POST CARDS --- */
.feed-layout {
    display: grid;
    grid-template-columns: 230px 1fr 280px;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
}

/* MOBILE PROFILE CARD */
.feed-profile-card-mobile {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.25rem;
}

.feed-profile-card-mobile .profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 auto 0.75rem;
    color: #fff;
}

[data-theme='dark'] .feed-profile-card-mobile .profile-avatar {
    color: var(--text-primary);
}

.feed-profile-card-mobile .profile-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.feed-profile-card-mobile .profile-city {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.feed-profile-card-mobile .profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.feed-profile-card-mobile .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feed-profile-card-mobile .stat-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}

.feed-profile-card-mobile .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
}

.feed-profile-card-mobile .profile-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.feed-profile-card-mobile .btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.feed-categories-mobile {
    display: none;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.feed-categories-mobile-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.feed-categories-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.feed-category-btn-mobile {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.feed-category-btn-mobile:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.feed-category-btn-mobile.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.feed-categories-mobile select {
    display: none;
}

.feed-categories-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.feed-category-btn {
    width: 100%;
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.feed-category-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.feed-category-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.create-post-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.post-box-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.post-text-trigger {
    flex: 1;
    text-align: left;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.post-text-trigger:hover {
    border-color: var(--primary);
    color: var(--text-secondary);
}

.post-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.post-header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.post-user-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.post-user-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-category-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
}

.post-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.post-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.post-actions-stats {
    display: flex;
    gap: 1.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.post-interactive-buttons {
    display: flex;
    gap: 0.6rem;
}

.post-action-btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.post-action-btn:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.post-action-btn.liked {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.15);
}

/* Comments */
.post-comments-container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.comment-row {
    display: flex;
    gap: 0.65rem;
    font-size: 0.85rem;
    background-color: var(--bg-tertiary);
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
}

.comment-author-name {
    font-weight: 700;
    font-size: 0.82rem;
}

.comment-body-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.comment-input-area {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.comment-input-area input {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-full);
}

.btn-comment-submit {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Side Widgets */
.widget-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.widget-box h4 {
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
    margin-bottom: 0.85rem;
}

.widget-member-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.widget-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.member-details h5 {
    font-size: 0.88rem;
    font-weight: 600;
}

.member-details span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- GEZİ & LEZZET (PLACES) --- */
.guide-header-bar {
    margin-bottom: 1.75rem;
}

.guide-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
}

.filter-pill {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.filter-pill.active {
    background-color: var(--primary);
    color: #ffffff;
}

.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.place-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.place-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.place-image-wrapper {
    position: relative;
    height: 190px;
    background-color: var(--bg-tertiary);
}

.place-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.place-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(9, 13, 22, 0.85);
    color: var(--primary-hover);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
}

.place-city {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(9, 13, 22, 0.85);
    color: #ffffff;
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
}

.place-content {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.place-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.place-title {
    font-size: 1.15rem;
}

.place-rating-badge {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
}

.place-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.place-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.add-place-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

/* --- DM CHAT LAYOUT --- */
.dm-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    height: 620px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.dm-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.dm-sidebar-header {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.dm-users-list {
    overflow-y: auto;
    flex: 1;
}

.dm-user-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.dm-user-item:hover, .dm-user-item.active {
    background-color: var(--bg-tertiary);
}

.dm-chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.dm-chat-placeholder {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
}

.dm-chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background-color: var(--bg-secondary);
}

.dm-chat-history {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background-color: var(--bg-primary);
}

.message-bubble {
    max-width: 65%;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-bubble.incoming {
    align-self: flex-start;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.message-bubble.outgoing {
    align-self: flex-end;
    background-color: var(--primary);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.msg-time {
    font-size: 0.68rem;
    opacity: 0.75;
    text-align: right;
    margin-top: 0.25rem;
}

.dm-chat-input-bar {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.65rem;
    background-color: var(--bg-secondary);
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.close-modal-btn {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1;
    transition: color var(--transition-fast);
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

/* --- CATEGORY TAG COLORS --- */
.post-category-tag {
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.post-category-tag.yardim  { background: rgba(16, 185, 129, .12); color: #10b981; }
.post-category-tag.konaklama { background: rgba(245, 158, 11, .12); color: #f59e0b; }
.post-category-tag.burokrasi { background: rgba(239, 68, 68, .12); color: #ef4444; }
.post-category-tag.genel   { background: var(--primary-light); color: var(--primary); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero-logo-img { width: 110px; height: 110px; }
}

@media (max-width: 992px) {
    .feed-layout { grid-template-columns: 1fr; }
    .welcome-sections { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dm-layout { grid-template-columns: 1fr; }
    .feed-sidebar-right { display: none; }
    .feed-sidebar-left { display: none; }
    .feed-profile-card-mobile { display: block; }
    .feed-categories-mobile { display: block; }
    .hero-logo-img { display: none; }
}

@media (max-width: 768px) {
    /* TABLET - Responsive Mobile Layout */
    .header-container {
        height: auto;
        min-height: 56px;
        padding: 0.5rem 0.75rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .logo-section {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        flex: 0 0 auto;
        cursor: pointer;
    }

    .brand-logo-img {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
    }

    .logo-text {
        display: none;
    }

    .nav-links { 
        display: none; 
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        flex: 0 0 auto;
    }

    .user-panel {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.4rem 0.6rem;
    }

    #header-user-avatar {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    #header-user-name { 
        display: none; 
    }

    #notif-btn {
        display: none;
    }

    #auth-action-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
        font-weight: 700;
        min-width: 75px;
    }

    .theme-toggle-btn,
    #open-admin-btn,
    #header-user-edit-icon {
        padding: 0.5rem;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Layout */
    .welcome-sections,
    .feed-layout,
    .dm-layout,
    .places-grid {
        grid-template-columns: 1fr;
    }

    .feed-sidebar-left,
    .feed-sidebar-right { 
        display: none; 
    }

    .feed-content,
    .dm-chat-area,
    .dm-sidebar {
        min-width: 0;
    }

    .feed-profile-card-mobile { 
        display: block; 
    }

    .feed-categories-mobile { 
        display: block; 
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .hero-card {
        padding: 1rem;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .post-card,
    .place-card,
    .widget-box,
    .card-panel,
    .modal-content {
        border-radius: 12px;
    }

    .modal-content {
        max-width: 94vw;
        padding: 1rem;
    }

    .comment-input-area,
    .dm-chat-input-bar,
    .add-review-form {
        flex-direction: column;
        align-items: stretch;
    }

    .message-bubble {
        max-width: 85%;
    }

    #profile-banner {
        height: 120px;
    }

    #profile-avatar-large {
        width: 70px;
        height: 70px;
        font-size: 1.2rem;
    }
}

@media (max-width: 640px) {
    /* MOBILE - Enhanced Responsive Layout */
    .header-container {
        min-height: 52px;
        padding: 0.5rem 0.5rem;
        gap: 0.4rem;
    }

    .logo-section {
        flex: 0 0 auto;
        cursor: pointer;
    }

    .brand-logo-img {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .logo-text { 
        display: none; 
    }

    .nav-links { 
        display: none; 
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        flex: 0 0 auto;
    }

    .user-panel {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.3rem 0.5rem;
    }

    #header-user-avatar {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    #header-user-name { 
        display: none; 
    }

    #notif-btn {
        display: none;
    }

    #auth-action-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
        font-weight: 700;
        min-width: 70px;
        white-space: nowrap;
    }

    .theme-toggle-btn,
    #open-admin-btn,
    #header-user-edit-icon {
        width: 32px;
        height: 32px;
        padding: 0;
        flex-shrink: 0;
        font-size: 0.7rem;
    }

    /* Layout */
    .feed-layout {
        grid-template-columns: 1fr;
    }

    .feed-sidebar-left, 
    .feed-sidebar-right { 
        display: none; 
    }

    .feed-profile-card-mobile { 
        display: block; 
    }

    .feed-categories-mobile { 
        display: block; 
    }

    .feed-categories-buttons button {
        flex: 0 1 auto;
        font-size: 0.75rem;
        padding: 0.45rem 0.6rem;
        white-space: nowrap;
    }

    .hero-card { 
        padding: 1rem; 
    }

    .hero-content h2 { 
        font-size: 1.3rem; 
    }

    .stats-grid { 
        grid-template-columns: 1fr 1fr; 
    }

    .guide-controls { 
        flex-direction: column; 
    }

    .places-grid { 
        grid-template-columns: 1fr; 
    }

    .form-grid { 
        grid-template-columns: 1fr; 
    }

    .modal-content { 
        padding: 0.9rem; 
        max-width: 95vw; 
    }

    .post-interactive-buttons { 
        flex-wrap: wrap;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .comment-input-area,
    .dm-chat-input-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .comment-input-area input,
    .dm-chat-input-bar input {
        width: 100%;
    }

    .dm-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .dm-sidebar {
        display: none;
    }

    .dm-chat-area {
        min-height: 50vh;
    }

    .dm-chat-active-window { 
        min-height: 50vh; 
    }

    .message-bubble { 
        max-width: 85%; 
    }

    .dm-user-item { 
        padding: 0.5rem; 
    }

    .dm-user-info-text { 
        min-width: 0; 
    }

    .dm-user-info-text h4,
    .dm-user-info-text p { 
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis; 
        font-size: 0.8rem; 
    }

    .welcome-sections { 
        grid-template-columns: 1fr; 
    }

    .profile-view .profile-header { 
        flex-direction: column; 
        align-items: flex-start; 
    }

    #profile-banner { 
        height: 100px;
        padding: 0.5rem;
    }

    #profile-avatar-large { 
        width: 60px; 
        height: 60px;
        font-size: 1rem;
    }

    .header-lang-switcher {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.2rem;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-full);
        box-shadow: var(--shadow-sm);
    }

    .header-lang-switcher .lang-btn {
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 700;
        padding: 0.38rem 0.58rem;
        border-radius: var(--radius-full);
        min-width: 38px;
        transition: all var(--transition-fast);
    }

    .header-lang-switcher .lang-btn.active {
        background: var(--primary);
        color: #fff;
        box-shadow: var(--shadow-glow);
    }

    .header-lang-switcher .lang-btn:hover {
        color: var(--text-primary);
    }
}

@media (max-width: 480px) {
    /* MOBILE - Enhanced Responsive Layout */
    body { font-size: 13px; }
    
    .header-container { 
        padding: 0.4rem 0.4rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-section {
        flex: 0 0 auto;
        cursor: pointer;
    }
    
    .brand-logo-img { 
        width: 48px; 
        height: 48px; 
    }
    
    .logo-text { display: none; }
    
    .header-actions { 
        display: flex;
        align-items: center;
        gap: 0.3rem; 
        flex: 0 0 auto;
    }
    
    .user-panel {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }
    
    #header-user-avatar {
        width: 32px;
        height: 32px;
    }
    
    #notif-btn {
        display: none !important;
    }
    
    #auth-action-btn {
        padding: 0.45rem 0.8rem !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        white-space: nowrap;
    }
    
    .theme-toggle-btn,
    #open-admin-btn,
    #header-user-edit-icon { 
        width: 28px; 
        height: 28px;
        padding: 0;
        font-size: 0.65rem;
    }
    
    .stats-grid { grid-template-columns: 1fr; }
    .hero-content h2 { font-size: 1.1rem; }
    .hero-tag { font-size: 0.65rem; }
    .post-card,
    .place-card {
        padding: 0.75rem;
    }
    .post-body h3 { font-size: 0.95rem; }
    .post-actions-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .post-interactive-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.3rem;
    }
    .post-action-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }
    .btn-follow,
    .btn-comment-submit {
        width: 100%;
        justify-content: center;
    }
    .dm-user-item {
        padding: 0.5rem;
    }
    .dm-user-info-text h4 {
        font-size: 0.75rem;
    }
    .dm-user-info-text p {
        font-size: 0.65rem;
    }
    .modal-overlay {
        padding: 0.4rem;
    }
    #notif-btn {
        padding: 0.25rem 0.4rem;
    }
    #profile-banner {
        height: 90px !important;
    }
    #profile-avatar-large {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.8rem !important;
    }

    .header-lang-switcher {
        gap: 0.15rem;
    }

    .header-lang-switcher .lang-btn {
        min-width: 30px;
        padding: 0.28rem 0.38rem;
        font-size: 0.64rem;
    }
}

/* Notification Button Icon */
.notif-btn-icon {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#notif-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    #notif-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 0.4rem 0.5rem;
    }
    .notif-btn-icon {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 769px) {
    .nav-links,
    .header-actions {
        display: flex !important;
    }

    .logo-text {
        display: block !important;
    }

    .feed-profile-card-mobile,
    .feed-categories-mobile,
    .mobile-only {
        display: none !important;
    }
}
