:root {
    --bg: #0f1216;
    --card: #151a21;
    --muted: #99a2b2;
    --text: #e9edf3;
    --accent: #4da3ff;
    --danger: #ff6b6b;
    --radius: 16px;
    --gap: 12px;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.35)
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    /*background: var(--bg);*/
    background: #7f1bc2;
    background: linear-gradient(90deg, rgba(127, 27, 194, 1) 0%, rgba(253, 29, 29, 1) 32%, rgba(18, 162, 224, 1) 69%, rgba(252, 176, 69, 1) 100%);
    color: var(--text);
    line-height: 1.5
}

.container {
    max-width: 720px;
    margin: 80px auto 40px;
    padding: 0 12px
}

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgba(15, 18, 22, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #1f2631;
    z-index: 10
}

.topbar h1 {
    font-size: 20px;
    margin: 0
}

nav {
    display: flex;
    gap: 8px
}

.card {
    background: var(--card);
    border: 1px solid #1f2631;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px
}

.form {
    display: grid;
    gap: var(--gap)
}

.form.inline {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    align-items: end
}

.form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--muted)
}

.form input[type="text"],
.form input[type="password"],
.form input[type="date"],
.form input[type="file"],
.form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #2a3241;
    background: #0e131a;
    color: var(--text)
}

.btn {
    border: 1px solid #2a3241;
    background: var(--accent);
    color: #07203d;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600
}

.btn:hover {
    filter: brightness(1.05)
}

.btn.ghost {
    background: transparent;
    color: var(--text)
}

.divider {
    text-align: center;
    color: var(--muted);
    margin: 12px 0
}

.msg {
    margin-top: 8px;
    min-height: 20px
}

.msg.error {
    color: var(--danger)
}

.msg.ok {
    color: #3ce480
}

.feed {
    display: grid;
    gap: 16px
}

.post {
    background: var(--card);
    border: 1px solid #1f2631;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow)
}

.post img {
    width: 100%;
    height: auto;
    display: block;
    background: #0e131a
}

.post .meta {
    padding: 12px
}

.post .note {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 15px
}

.post .time {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px
}

.delete-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.delete-btn svg {
    width: 16px;
    height: 16px;
    vertical-align: middle
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 40px 0 80px
}

#loading {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    z-index: 999;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px)
}

.spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--accent);
    animation: spin 1s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@media(min-width:900px) {
    .feed {
        grid-template-columns: 1fr 1fr
    }
}

/* Overlay (arka plan karartması) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    /* js ile açılacak */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn .18s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

/* Popup kutusu */
.modal {
    position: relative;
    width: min(900px, 96%);
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: #000000;
    /* fallback */
    display: flex;
    flex-direction: column;
}

/* Zemin resimli üst alan */
.modal .hero {
    flex: 0 0 320px;
    min-height: 180px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
}

/* İçerik alanı */
.modal .content {
    padding: 18px 20px;
    overflow: auto;
    color: #efdff9;
}

/* Çarpı butonu */
.modal .btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.modal .btn-close:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
}

/* Alternatif: küçük ekranlarda hero kısmı daha kısa olsun */
@media (max-width:480px) {
    .modal .hero {
        flex-basis: 180px;
    }

    .modal .btn-close {
        width: 34px;
        height: 34px;
        top: 8px;
        right: 8px;
    }
}

/* "Bir daha gösterme" satırı */
.no-show {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    margin-top: 8px;
}

/* Buton örneği */
.cta {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #dc22ba;
    color: #fff;
}