:root {
    --primary-color: #4f46e5;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
}
/* --- KARANLIK MOD DEĞİŞKENLERİ --- */
body.dark-mode {
    --bg-color: #0f172a;         /* Çok koyu lacivert/siyah */
    --card-bg: #1e293b;          /* Koyu gri/mavi */
    --text-main: #f8fafc;        /* Beyazımsı */
    --text-muted: #94a3b8;       /* Soluk gri */
    --border-color: #334155;     /* Koyu kenarlık */
    --nav-bg: #0f172a;
}

/* Geçiş efekti tüm sayfa için */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
	font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

/* Karanlık modda kart ve prompt kutusu özel ayarı */
body.dark-mode .prompt-box {
    background: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}

body.dark-mode .main-nav {
    background: var(--nav-bg);
}

body.dark-mode .chip {
    background: #1e293b;
    border-color: #334155;
}


.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigasyon */
.main-nav {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; font-weight: 800; color: var(--primary-color); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.btn-share { background: var(--primary-color); color: #fff !important; padding: 8px 16px; border-radius: 6px; }

/* Hero Bölümü */
.hero-section { text-align: center; padding: 50px 0; }
.hero-section h1 { font-size: 36px; margin-bottom: 10px; }

/* GRID SİSTEMİ - Kartları yan yana getiren kısım */
.prompt-grid {
    display: grid;
    /* Kartların minimum 300px olmasını, sığmazsa alt satıra geçmesini sağlar */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    
    /* İŞTE SİHİRLİ DOKUNUŞ: Kutular arasındaki boşluk */
    gap: 30px; 
    
    padding: 20px 0; /* Üstten ve alttan biraz boşluk */
}

/* KART TASARIMI */
.prompt-card {
    background: var(--card-bg);
    border-radius: 15px; /* Köşeleri biraz daha yumuşatalım */
    padding: 25px; /* İçerik kenarlara yapışmasın */
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); /* Hafif derinlik katalım */
    
    /* Kartların hepsinin aynı boyda olması için flex yapısı */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.prompt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.card-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.category-badge { background: #e0e7ff; color: #4338ca; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.author { color: var(--text-muted); }

.prompt-card h3 {
    margin: 15px 0 10px 0;
    font-size: 1.2rem;
    line-height: 1.4;
}
.desc {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #64748b;
}

.prompt-box {
    /* Prompt metninin olduğu kutuyu da sınırlandırmak iyi olur */
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    border: 1px dashed #cbd5e1;
    margin-bottom: 15px;
    
    height: 80px; /* Sabit yükseklik */
    overflow-y: auto; /* Uzun promptlarda kutu içinde kaydırma çubuğu çıkar */
}

.btn-copy {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-copy:hover { background: var(--primary-color); color: white; }
/* Arama Kutusu Stilleri */
.search-container {
    max-width: 700px;
    margin: 30px auto 0 auto;
}

.search-form {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.search-input {
    flex-grow: 1;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    outline: none;
    font-family: inherit;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-search:hover {
    background: #4338ca;
}

/* Mobilde arama çubuğunu alt alta getir */
@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
    }
    .btn-search {
        width: 100%;
    }
}
@media (max-width: 640px) {
    .prompt-grid {
        grid-template-columns: 1fr; /* Mobilde kartlar tek sütun olsun */
        gap: 20px; /* Mobilde boşlukları biraz daraltabiliriz */
    }
    
    .hero-section h1 {
        font-size: 28px; /* Mobilde başlığı küçültelim */
    }
}
/* Kategori Çipleri */
.category-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.chip:hover, .chip.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 0;
    color: #64748b;
}

.like-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
}

.like-button:active { transform: scale(1.2); }
.btn-delete {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
    transition: 0.2s;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}
/* Modal Arka Planı (Overlay) */
.modal {
    display: none; /* Varsayılan olarak gizli */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* Yarı şeffaf siyah */
    backdrop-filter: blur(5px); /* Arka planı bulanıklaştırır */
}

/* Modal İçerik Kutusu */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: modalOpen 0.3s ease-out;
}

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

/* Kapatma Butonu (X) */
.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
}

.close:hover { color: #1e293b; }

.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; }

.action-link.edit {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-right: 10px;
}

.action-link.edit:hover {
    text-decoration: underline;
}

.card-actions {
    display: flex;
    align-items: center;
}
/* Profil Header */
.profile-header {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}

.user-meta { display: flex; align-items: center; gap: 20px; }

.avatar-circle {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
}

.stats-row { display: flex; gap: 30px; }
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 24px; font-weight: 800; color: var(--primary-color); }
.stat-label { font-size: 14px; color: #64748b; }

/* Sekmeler */
.profile-tabs {
    margin: 30px 0;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    gap: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    bottom: -2px;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.action-link.delete { color: #ef4444; text-decoration: none; font-size: 13px; font-weight: 600; }
.desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    
    /* Satır Sınırlandırma Kodları */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Metni en fazla 2 satırla sınırla */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Kartların eşit boyda kalması için minimum yükseklik */
    height: 42px; /* (Satır yüksekliği x satır sayısı) yaklaşık değer */
}
/* Sayfalama Tasarımı */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    background: #fff;
    transition: 0.2s;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Yukarı Çık Butonu */
#backToTop {
    display: none; /* JavaScript ile görünür olacak */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}

#backToTop:hover {
    background-color: #312e81; /* Daha koyu indigo */
    transform: scale(1.1);
}
/* Yükleme Spinner'ı */
.loader {
    display: none; /* Varsayılan olarak gizli */
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Arama sırasında grid'in görünümü */
.searching {
    opacity: 0.5;
    pointer-events: none; /* Arama sürerken tıklamaları engeller */
    transition: opacity 0.3s ease;
}
/* Profil Sayfası Avatarı */
.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.avatar-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(79, 70, 229, 0.1); /* Çok hafif şeffaf arka plan */
    color: var(--primary-color);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Kartlardaki Küçük Avatar */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}
/* Avatar Ana Konteynırı */
.avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden; /* Dışarı taşan her şeyi keser, tam yuvarlak yapar */
    group: hover;
    cursor: pointer;
    border: 4px solid var(--card-bg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Avatar Resmi */
.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
	
}

/* Üzerine binince resmin hafif büyümesi */
.avatar-wrapper:hover img {
    transform: scale(1.1);
}

/* Üzerine binince çıkan Karartma ve Yazı Katmanı */
.avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Yarı saydam siyah */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    opacity: 0; /* Normalde görünmez */
    transition: opacity 0.3s ease;
    font-size: 13px;
    font-weight: 600;
}

/* Fareyle üzerine gelince katmanı göster */
.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
	cursor: pointer;
}

.avatar-overlay i, .avatar-overlay span {
    margin-bottom: 5px;
    font-size: 20px;
}

/* Mobilde her zaman hafif görünür olması için (isteğe bağlı) */
@media (max-width: 768px) {
    .avatar-overlay {
        height: 35%; /* Sadece alt kısımda bir bar gibi */
        bottom: 0;
        opacity: 1;
        background: rgba(0, 0, 0, 0.4);
        justify-content: center;
    }
}
/* Progress Bar Konteynırı */
.upload-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8); /* Arka planı hafif karart */
    display: none; /* Sadece yükleme anında görünecek */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Çubuğun kendisi */
.progress-track {
    width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    width: 0%; /* JS ile güncellenecek */
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #818cf8);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    transition: width 0.2s ease;
}

.progress-text {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
}
.btn-bookmark {
    background: none;
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
    color: var(--text-muted);
}

.btn-bookmark.bookmarked {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-bookmark:hover {
    transform: scale(1.1);
}
.btn-comment-link {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.05);
    transition: 0.3s;
}

.btn-comment-link:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}
.btn-comment-link small {
    font-weight: bold;
    font-size: 12px;
    margin-left: 2px;
    color: var(--text-main);
}

/* Yorum varsa ikonun rengini biraz canlandırabiliriz */
.btn-comment-link:hover span {
    filter: drop-shadow(0 0 5px var(--primary-color));
}