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

:root {
    /* Light Theme Tokens */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-main: #f0f2f5;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    /* Social Colors */
    --like-color: #ef4444;
    --comment-color: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
}

[data-theme="dark"] {
    /* Dark Theme Tokens */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --bg-main: #0f172a;
    --surface: #1e293b;
    --text-main: #f8fafc;
    --text-light: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(51, 65, 85, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* ================= HEADER ================= */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 64px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.header-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.brand img {
    height: 40px;
    object-fit: contain;
    transition: transform 0.2s;
}

.brand span {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.brand:hover img { transform: scale(1.05); }

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 8px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a svg {
    width: 20px;
    height: 20px;
}

.main-nav a:hover {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-main);
}

.main-nav a.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.btn-icon:hover {
    background: rgba(148, 163, 184, 0.1);
    transform: translateY(-1px);
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.user-avatar-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(148, 163, 184, 0.1);
}

/* Notification Dropdown */
.noti-wrapper { position: relative; }
.noti-btn { background: transparent; border: none; color: var(--text-main); cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); transition: 0.2s; }
.noti-btn:hover { background: rgba(148,163,184,0.1); }
.noti-badge { position: absolute; top: -2px; right: -2px; background: var(--like-color); color: white; font-size: 10px; font-weight: bold; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.noti-dropdown { position: absolute; top: 50px; right: 0; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.2s; z-index: 1000; overflow: hidden; }
.noti-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.noti-header { padding: 15px 20px; font-weight: 600; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text-main); }
.noti-list { max-height: 350px; overflow-y: auto; }
.noti-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; text-decoration: none; color: var(--text-main); font-size: 13px; border-bottom: 1px solid var(--border); transition: 0.2s; }
.noti-item:hover { background: rgba(148,163,184,0.05); }
.noti-item.unread { background: rgba(37,99,235,0.05); }
.noti-item:last-child { border-bottom: none; }
.noti-text { flex: 1; line-height: 1.4; }
.noti-time { display: block; font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* Mobile Menu Styles */
.mobile-btn { display: none; background: transparent; border: none; color: var(--text-main); cursor: pointer; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; transition: 0.2s; }
.mobile-btn:hover { background: rgba(148,163,184,0.1); }
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.5); z-index: 1001; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(4px); }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu-content { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: var(--surface); z-index: 1002; transition: 0.3s; box-shadow: -5px 0 20px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.mobile-menu-content.active { right: 0; }
.mobile-menu-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.btn-close-menu { background: transparent; border: none; font-size: 28px; color: var(--text-light); cursor: pointer; line-height: 1; }
.mobile-nav-links { display: flex; flex-direction: column; padding: 20px; gap: 10px; }
.mobile-nav-links a { text-decoration: none; color: var(--text-main); font-size: 16px; font-weight: 500; padding: 12px 15px; border-radius: 8px; transition: 0.2s; }
.mobile-nav-links a.active, .mobile-nav-links a:hover { background: rgba(37,99,235,0.1); color: var(--primary); }

/* ================= MAIN LAYOUT ================= */
.app-container {
    max-width: 800px;
    margin: 84px auto 40px auto; /* 64px header + 20px spacing */
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.main-content {
    min-height: 80vh;
}

/* Sidebar Widgets */
.widget {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

/* ================= POST FEED ================= */
.create-post-box {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.create-post-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.create-post-top img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.create-post-top input {
    flex: 1;
    background: var(--bg-main);
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: 0.2s;
}

.create-post-top input:focus {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.action-btn:hover {
    background: rgba(148, 163, 184, 0.1);
}

/* Post Styling */
.post-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info {
    flex: 1;
}

.post-user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    text-decoration: none;
}

.post-user-name:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 12px;
    color: var(--text-light);
    display: block;
}

.post-content {
    padding: 0 16px 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-main);
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    background: var(--bg-main);
}

.post-stats {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

.post-actions {
    display: flex;
    padding: 4px 16px;
}

.post-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
}

.post-action-btn:hover {
    background: rgba(148, 163, 184, 0.1);
}

.post-action-btn.liked {
    color: var(--like-color);
}

.post-action-btn.liked svg {
    fill: var(--like-color);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .app-container {
        padding: 0;
        margin-top: 64px;
    }
    .post-card, .create-post-box {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .header-container { padding: 0 15px; }
    .brand span { font-size: 18px; }
    .main-nav { display: none; } /* Mobil menüye taşındı */
    .mobile-btn { display: flex; }
}
