:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --success-hover: #059669;
    --dark: #0f172a;
    --bg-dark: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body.light-mode {
    --bg-dark: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05), transparent 25%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Yarı saydam cam efekti (Glassmorphism) - Düz native görünüme uyarlandı */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-left: none;
    border-right: none;
    box-shadow: none; /* Kart gölgelerini kaldır */
    border-radius: 0; /* Köşeleri düz yap */
}

/* --- AUTH EKRANI --- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
}

.brand-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.brand h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.auth-form {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--success-hover); }

.toggle-auth { margin-top: 20px; color: var(--text-muted); }
.toggle-auth a { color: var(--primary); text-decoration: none; font-weight: 600; }
.toggle-auth a:hover { text-decoration: underline; }

/* --- ANA PLATFORM --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 20px;
    border-radius: 0;
    margin-bottom: 8px; /* Kartlar arası boşluk için küçük bir margin */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-search {
    position: relative;
    width: 300px;
}

.nav-search input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-main);
}

.nav-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-user { display: flex; align-items: center; gap: 15px; }
.user-profile-sm { display: flex; align-items: center; gap: 10px; }
.user-profile-sm img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.btn-logout { color: #ef4444; font-size: 1.2rem; transition: 0.3s; }
.btn-logout:hover { color: #dc2626; transform: scale(1.1); }

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-icon:hover { color: var(--primary); }

.main-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 20px;
    padding: 0 20px;
}

/* Sol ve Sağ Sidebar */
.sidebar { position: sticky; top: 80px; height: max-content; }
.nav-links { list-style: none; }
.nav-links li { margin-bottom: 5px; }
.nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 10px;
    transition: 0.3s;
}
.nav-links a:hover, .nav-links li.active a {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
}

.widget { padding: 15px; margin-bottom: 8px; }
.widget h3 { font-size: 1rem; color: var(--text-muted); margin-bottom: 15px; border-bottom: 1px solid var(--glass-border); padding-bottom: 5px; }

.sponsor-item, .user-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sponsor-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.user-item img { width: 40px; height: 40px; border-radius: 50%; }
.sponsor-info p, .user-info span { font-size: 0.8rem; color: var(--text-muted); }

/* FEED */
.feed { display: flex; flex-direction: column; gap: 8px; }

/* Feed Tabs */
.feed-tabs {
    display: flex;
    justify-content: space-around;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

.feed-tab {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.feed-tab:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.feed-tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: rgba(255,255,255,0.02);
}

.feed-tab i { margin-right: 5px; }

/* Stories */
.stories-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    scrollbar-width: thin;
    margin-bottom: 8px;
}

.stories-container::-webkit-scrollbar { height: 6px; }
.stories-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

#stories-wrapper {
    display: flex;
    gap: 10px;
}

.story {
    flex-shrink: 0;
    min-width: 100px;
    height: 150px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10px;
    transition: 0.3s;
}

.story:hover { transform: scale(1.02); }

.story img.story-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.story::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 2;
}

.story span { position: relative; z-index: 3; font-size: 0.8rem; font-weight: 500; }
.story .user-avatar {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid var(--primary);
}

.create-story { background: rgba(255,255,255,0.05); border: 1px dashed var(--text-muted); justify-content: center; gap: 10px; padding: 0; }
.create-story .story-add-icon {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* Post Oluşturma */
.create-post-container { padding: 15px; }
.post-header { display: flex; gap: 15px; margin-bottom: 15px; }
.post-header img { width: 40px; height: 40px; border-radius: 50%; }
.post-header textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    resize: none;
    height: 40px;
    padding-top: 8px;
}
.post-header textarea:focus { outline: none; }

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

.action-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 15px; border-radius: 8px;
    cursor: pointer; transition: 0.3s;
    color: var(--text-muted);
}
.action-btn:hover { background: rgba(255,255,255,0.05); }

.image-preview-container {
    position: relative; margin-top: 15px; display: inline-block;
}
.image-preview-container img { max-width: 100%; max-height: 300px; border-radius: 8px; }
.image-preview-container .remove-btn {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,0.6); color: white; border: none;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
}
.hidden { display: none !important; }

/* Post Kartı */
.post-card { padding: 15px; animation: fadeIn 0.5s ease-in-out; }
.post-user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.post-user-info img { width: 45px; height: 45px; border-radius: 50%; }
.post-user-info strong { display: block; font-size: 0.95rem; }
.post-user-info span { font-size: 0.75rem; color: var(--text-muted); }

.post-text { margin-bottom: 15px; line-height: 1.5; font-size: 0.9rem; }
.post-image { width: 100%; border-radius: 10px; margin-bottom: 15px; max-height: 500px; object-fit: cover; }

.post-footer {
    display: flex; justify-content: space-between;
    border-top: 1px solid var(--glass-border); padding-top: 10px;
    font-size: 0.85rem;
}
.post-footer .action-btn { flex: 1; justify-content: center; font-size: 0.85rem; }

/* Modal */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
}
.modal-content {
    width: 90%; max-width: 400px; padding: 20px; position: relative;
    animation: fadeIn 0.3s;
}
.close-modal { position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; color: var(--text-muted); }
.file-upload-wrapper label {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px; background: rgba(255,255,255,0.05); border: 2px dashed var(--glass-border);
    border-radius: 8px; cursor: pointer; transition: 0.3s; margin-top: 15px;
}
.file-upload-wrapper label:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); }
.file-upload-wrapper input[type="file"] { display: none; }

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    justify-content: space-around;
    align-items: center;
    padding: 15px 10px;
    z-index: 100;
    border-radius: 0; /* Düzleştirilmiş kenarlar */
    border-top: 1px solid var(--glass-border);
}
.mobile-bottom-nav a {
    color: var(--text-muted);
    font-size: 1.4rem;
    text-decoration: none;
    transition: 0.3s;
}
.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .main-layout { grid-template-columns: 1fr 300px; }
    .left-sidebar { display: none; }
}
@media (max-width: 768px) {
    .main-layout { grid-template-columns: 1fr; padding-bottom: 80px; }
    .right-sidebar { display: none; }
    .mobile-bottom-nav { display: flex; }
    .navbar { padding: 10px; }
    
    .nav-container { 
        flex-wrap: nowrap;
        gap: 10px;
    }
    .nav-search { 
        display: block; 
        width: auto;
        flex: 1;
    }
    .nav-search input {
        padding: 8px 10px 8px 30px;
        font-size: 0.85rem;
    }
    .nav-search i {
        left: 10px;
    }
    .logo {
        font-size: 1.2rem;
    }
    .nav-user {
        gap: 10px;
    }
}

/* --- PROFIL SAYFASI --- */
.profile-header {
    overflow: hidden;
    margin-bottom: 20px;
}
.profile-cover {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: #333;
}
.profile-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px 20px;
    position: relative;
    margin-top: -50px;
}
.profile-avatar-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--bg-dark);
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}
.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-details {
    flex: 1;
    padding-left: 20px;
    padding-bottom: 10px;
}
.profile-details h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}
.profile-stats {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
}
.profile-stats strong {
    color: var(--text-main);
    font-size: 1.1rem;
}
.profile-actions {
    padding-bottom: 10px;
    display: flex;
    gap: 8px;
}
.profile-actions .btn {
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    gap: 8px;
    flex: 1;
}
.profile-actions .btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}
body.light-mode .profile-actions .btn-secondary {
    background: rgba(0,0,0,0.05);
}
.profile-tabs {
    display: flex;
    border-top: 1px solid var(--glass-border);
}
.profile-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}
.profile-tabs .tab.active, .profile-tabs .tab:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
    .profile-info-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -75px;
    }
    .profile-details {
        padding-left: 0;
        margin-top: 15px;
    }
    .profile-actions {
        margin-top: 15px;
    }
    .profile-cover { height: 150px; }
}

/* --- YORUMLAR --- */
.comments-section {
    border-top: 1px solid var(--glass-border);
    margin-top: 15px;
    padding-top: 15px;
    display: none;
}
.comments-section.active { display: block; }
.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.comment img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}
.comment-content {
    flex: 1;
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 12px;
}
.comment-content strong { display: block; margin-bottom: 5px; font-size: 0.9rem; }
.comment-content p { font-size: 0.95rem; line-height: 1.4; }
.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.comment-actions span { cursor: pointer; transition: 0.3s; }
.comment-actions span:hover, .comment-actions span.liked { color: var(--primary); }

.reply-input-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.reply-input-container input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 8px 15px;
    border-radius: 20px;
    color: var(--text-main);
}
.reply-input-container input:focus { outline: none; border-color: var(--primary); }
.reply-input-container button {
    background: transparent; border: none; color: var(--primary); cursor: pointer; font-weight: bold;
}

.replies-container {
    margin-left: 45px;
    margin-top: 10px;
    border-left: 2px solid var(--glass-border);
    padding-left: 15px;
}

.post-footer .action-btn.liked i { color: #ef4444; font-weight: 900; }
.post-footer .action-btn.liked { color: #ef4444; }

/* Grid 3 Kolon */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 992px) {
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* --- NOTIFICATIONS --- */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}
.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    margin-top: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.notifications-header {
    padding: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
}
.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    text-decoration: none;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.2s;
}
.notification-item:hover {
    background: rgba(255,255,255,0.05);
}
.notification-item.unread {
    background: rgba(79, 70, 229, 0.1);
}
.notification-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.notification-item .content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}
.notification-item .content strong {
    color: var(--primary);
}
