:root {
    --explore-bg: #0d0d1a;
    --explore-border: #2a2a3a;
    --explore-card-bg: #161620;
    --explore-text-primary: #e0e0ff;
    --explore-text-secondary: #a0a0c0;
    --explore-accent: #8b5cf6;
}

.explore-page-wrapper {
    min-height: 100vh;
    background-color: #0d0d1a;
    color: #dcdcdc;
    position: relative;
    overflow-x: hidden;
    padding-top: 0rem;
    padding-bottom: 2rem;
}
.animated-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: pulse 10s infinite alternate;
}
.blob1 { top: 5%; left: 10%; width: 300px; height: 300px; background-color: #8A2BE2; animation-delay: 0s; }
.blob2 { bottom: 5%; right: 10%; width: 400px; height: 400px; background-color: #4682B4; animation-delay: 2s; }
.blob3 { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 500px; height: 500px; background-color: #E94560; animation-delay: 4s; }
@keyframes pulse {
    0% { transform: scale(0.8); }
    100% { transform: scale(1.2); }
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

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

.explore-container {
    max-width: 1100px;
    position: relative;
    z-index: 2;
}

.explore-header {
    /* Değişiklik: Başlık ve sekmeleri içerecek şekilde güncellendi */
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 56px;
    background-color: rgba(13, 13, 26, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding-top: 1rem; /* Üst boşluk eklendi */
}

.explore-header-top {
    /* Yeni: Sadece başlık ve butonu içeren üst kısım */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 1rem 1rem; /* Alt padding ayarlandı */
}

.explore-container.explore-fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.explore-header-top h4 {
    color: var(--explore-text-primary);
    font-weight: 600;
    margin: 0;
}

.explore-tabs {
    display: flex;
    border-bottom: 1px solid var(--explore-border);
    width: 100%; /* Başlığın tamamını kaplaması için */
}

.explore-tab-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    color: var(--explore-text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.explore-tab-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--explore-text-primary);
}
.explore-tab-item.active {
    color: var(--explore-text-primary);
    border-bottom-color: var(--explore-accent);
}

#post-list-container {
    /* CLS'yi önlemek için yapışkan başlık yüksekliği kadar sabit bir padding veriyoruz. */
    padding-top: 126px;
}

.btn-primary-gradient {
    background-image: linear-gradient(to right, #8b5cf6, #ec4899);
    border: none;
    color: white;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    color: white;
}

.post-card-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.post-card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
}

.card-border-glow {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: border-color 0.4s ease;
    pointer-events: none;
    z-index: 4;
}
.post-card-wrapper:not(.is-detail-wrapper):hover .card-border-glow {
    border-color: rgba(139, 92, 246, 0.3);
}
.card-gradient-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    border-radius: 16px;
    transition: opacity 0.4s ease;
    background-image: linear-gradient(to right, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    pointer-events: none;
    z-index: 0;
}
.post-card-wrapper:not(.is-detail-wrapper):hover .card-gradient-overlay {
    opacity: 1;
}

.post-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(22, 33, 62, 0.9); /* backdrop-filter kaldırıldığı için opaklığı biraz artırıldı */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
}
.post-card-wrapper:not(.is-detail-wrapper):hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.post-card-wrapper.is-centered {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.post-card-wrapper.is-centered .card-border-glow {
    border-color: rgba(139, 92, 246, 0.3);
}
.post-card-wrapper.is-centered .card-gradient-overlay {
    opacity: 1;
}

.post-card.is-detail-page {
    cursor: default;
    background-color: rgba(22, 33, 62, 0.9);
    border-radius: 12px;
    border-bottom: none;
    margin-bottom: 1rem;
}

.post-card.comment-card {
    cursor: default;
    background-color: rgba(22, 33, 62, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.post-main-content {
    flex-grow: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.post-author-name {
    font-weight: 600;
    color: var(--explore-text-primary) !important;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.post-author-name:hover {
    text-decoration: underline;
}

.post-author-container {
    display: flex;
    align-items: center;
    min-width: 0;
}

.post-author-badge {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    position: relative;
    top: 2px;
    margin-left: 0;
    cursor: help;
}
.post-author-badge.no-popover {
    cursor: default;
}

.post-date {
    color: var(--explore-text-secondary);
    font-size: 0.9rem;
}

.post-body p {
    color: var(--explore-text-primary);
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    aspect-ratio: 16 / 9; /* Resim yüklenene kadar 16:9 oranında yer tutar */
    background-color: rgba(0,0,0,0.2); /* Yüklenirken hafif bir arka plan rengi */
    margin-top: 0.75rem;
    border: 1px solid var(--explore-border);
}

.post-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--explore-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}
.post-action-btn:hover {
    color: var(--explore-accent);
}

.post-action-btn.interactive-element {
    position: relative;
    z-index: 3;
}

.post-action-btn.liked,
.post-action-btn.liked:hover {
    color: #ef4444;
}

.post-delete-btn {
    background: none;
    border: none;
    color: var(--explore-text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.post-delete-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.modal-content {
    background-color: var(--explore-card-bg);
    border: 1px solid var(--explore-border);
    color: var(--explore-text-primary);
}
.modal-header {
    border-bottom-color: var(--explore-border);
}
.author-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.post-content-input {
    background-color: rgba(42, 53, 75, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0ff;
    resize: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.post-content-input:focus {
    box-shadow: none;
    background-color: rgba(42, 53, 75, 0.9);
    border-color: var(--explore-accent);
    color: #e0e0ff;
}

.post-content-input::placeholder {
    color: var(--explore-text-secondary);
    opacity: 0.8;
}
.post-options {
    display: flex;
    gap: 0.5rem;
}
.post-option-btn {
    background: none;
    border: none;
    color: var(--explore-accent);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.post-option-btn:hover {
    background-color: rgba(139, 92, 246, 0.1);
}

.emoji-picker-container {
    position: absolute;
    z-index: 1056;
    bottom: 50px;
    left: 10px;
    display: none;
}
.emoji-picker-container.active {
    display: block;
}
emoji-picker {
    --background: #161620;
    --border-color: var(--explore-border);
    --indicator-color: var(--explore-accent);
    --hover-background: rgba(139, 92, 246, 0.2);
}

#image-preview-container {
    position: relative;
}
#image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
}
.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
}

.comment-form-wrapper {
    display: flex;
    gap: 1rem;
    background-color: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 1rem;
    margin-bottom: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out, padding 0.4s ease-in-out, margin-bottom 0.4s ease-in-out;
}

.comment-form-wrapper.show {
    max-height: 500px;
    opacity: 1;
    padding: 1rem;
    margin-bottom: 1rem;
}

.post-card.comment-card {
    margin-bottom: 1rem;
}

.post-card.comment-card .post-author-avatar img {
    width: 40px;
    height: 40px;
}

.explore-container .row > div > .mb-3:first-child {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .post-date {
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Sadece detay sayfasındaki görsellerin tıklanabilir olmasını sağla */
    .post-card.is-detail-page .post-image {
        cursor: pointer;
    }
}

.fullscreen-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fullscreen-image-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fullscreen-image-overlay img {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
}

.fullscreen-image-overlay .close-fullscreen {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}
.custom-popover {
    --bs-popover-bg: #151f2e;
    --bs-popover-border-color: rgba(255, 255, 255, 0.1);
    --bs-popover-header-bg: #1c2938;
    --bs-popover-header-color: white;
    --bs-popover-body-color: #a0b1c5;
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}