:root {
    --primary-hue: 250;
    --primary: hsl(var(--primary-hue), 100%, 50%);
    --primary-dark: hsl(var(--primary-hue), 100%, 10%);
    --bg-dark: #0f0f13;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #a0a0ba;
    --border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(100, 50, 255, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(50, 200, 255, 0.1) 0%, transparent 20%);
}

.container {
    width: 100%;
    max-width: 800px;
    z-index: 1;
}

header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    margin-bottom: 0.5rem;
    background-clip: text;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    /* Compatibility fix */
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

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

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Feed & Posts */
#feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
    animation: fadeIn 0.5s ease-out;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.post-badge {
    background: rgba(100, 50, 255, 0.2);
    color: #a5b4fc;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(165, 180, 252, 0.1);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e2e8f0;
}

.post-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2em 0.4em;
    border-radius: 0.3em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: #fdba74;
}

.post-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border);
    position: relative;
    /* For copy button */
}

/* Copy Button */
.btn-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a5b4fc;
    border-radius: 0.4rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    /* Hidden by default */
}

.post-content pre:hover .btn-copy {
    opacity: 1;
    /* Show on hover */
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-copy.copied {
    background: #4ade80;
    color: black;
    border-color: #4ade80;
}

.btn-copy.copied::after {
    content: 'Kopyalandı';
    position: absolute;
    right: 110%;
    background: #4ade80;
    color: black;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Markdown Content Styling */
.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #fff;
    font-weight: 700;
}

.post-content h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.post-content h2 {
    font-size: 1.5rem;
    color: #a5b4fc;
}

.post-content h3 {
    font-size: 1.25rem;
    color: #cbd5e1;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.25rem;
    color: #e2e8f0;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.post-content th {
    background: rgba(100, 50, 255, 0.1);
    color: #a5b4fc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--primary);
    background: rgba(100, 50, 255, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #e2e8f0;
    font-style: italic;
}

/* Links */
.post-content a {
    color: #a5b4fc;
    text-decoration: none;
    border-bottom: 1px dashed #a5b4fc;
}

.post-content a:hover {
    color: #fff;
    border-bottom-style: solid;
}

.admin-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(100, 50, 255, 0.1);
}

textarea {
    min-height: 200px;
    font-family: 'JetBrains Mono', monospace;
}

button.btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary-hue), 80%, 60%) 0%, hsl(var(--primary-hue), 70%, 50%) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.1s, opacity 0.2s;
}

button.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button.btn-primary:active {
    transform: translateY(0);
}

/* Admin Management List */
.admin-post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-post-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-post-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-post-info strong {
    color: #fff;
}

.admin-post-info small {
    color: var(--text-muted);
}

.btn-delete {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: rgba(220, 38, 38, 0.3);
    border-color: #f87171;
}

/* Category Badges */
.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-badge.gray {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.category-badge.blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.category-badge.red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.category-badge.green {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.category-badge.yellow {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

/* Pinned Post Styling */
.post-card.pinned {
    border: 1px solid rgba(234, 179, 8, 0.3);
    /* Gold border */
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.post-card.pinned::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #facc15, transparent);
    opacity: 0.5;
}

.pinned-icon {
    font-size: 0.8rem;
    color: #facc15;
    font-weight: 600;


    /* Post Actions (Reactions) */
    .post-actions {
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        display: flex;
        gap: 1rem;
    }

    .btn-reaction {
        background: transparent;
        border: 1px solid var(--border);
        color: var(--text-muted);
        padding: 0.5rem 1rem;
        border-radius: 2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
        transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .btn-reaction:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(-2px);
        color: #fff;
    }

    .btn-reaction.liked {
        color: #f43f5e;
        border-color: rgba(244, 63, 94, 0.3);
        background: rgba(244, 63, 94, 0.1);
    }

    .btn-reaction svg {
        transition: transform 0.2s;
    }

    .btn-reaction:active svg {
        transform: scale(0.8);
    }

    /* Animations */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @media (max-width: 600px) {
        h1 {
            font-size: 2rem;
        }

        .container {
            padding: 0 1rem;
        }
    }