/* === İtirafHane Design System === */
:root {
  --bg: #0a0a1a;
  --bg-2: #12122a;
  --surface: #1a1a35;
  --surface-2: #232347;
  --border: #2d2d55;
  --text: #e8e8ff;
  --muted: #8888b5;
  --primary: #8b5cf6;
  --primary-2: #a78bfa;
  --accent: #ec4899;
  --gold: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-dark: linear-gradient(180deg, #0a0a1a 0%, #12122a 100%);
  --shadow-glow: 0 10px 40px -10px rgba(139, 92, 246, 0.4);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: 'Inter', -apple-system, system-ui, sans-serif; line-height: 1.6; min-height: 100vh; }
body { background-image: radial-gradient(circle at 20% 10%, rgba(139,92,246,.15), transparent 40%), radial-gradient(circle at 80% 80%, rgba(236,72,153,.1), transparent 40%); background-attachment: fixed; }
a { color: var(--primary-2); text-decoration: none; transition: .2s; }
a:hover { color: var(--accent); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar { background: rgba(10,10,26,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { font-size: 1.5rem; font-weight: 800; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; position: relative; }
.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.badge { background: var(--accent); color: white; border-radius: 999px; padding: 2px 7px; font-size: .7rem; margin-left: 4px; }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
}

.main-content { padding: 30px 20px 60px; min-height: 70vh; }

/* Buttons */
.btn { display: inline-block; padding: 10px 22px; border-radius: var(--radius); background: var(--surface-2); color: var(--text); border: 1px solid var(--border); cursor: pointer; font-weight: 600; transition: .2s; text-align: center; font-size: .95rem; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-primary, .btn-sm { background: var(--grad-primary); border: none; color: white; }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 8px; }
.btn-alt { background: var(--surface); }
.btn-danger { background: var(--danger); border: none; color: white; }
.btn-block { width: 100%; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); margin-bottom: 18px; transition: .25s; }
.card:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Hero */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 14px; font-weight: 800; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 600px; margin: 0 auto 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Forms */
form input, form textarea, form select { width: 100%; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: inherit; font-size: .95rem; margin-bottom: 14px; transition: .2s; }
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
form textarea { min-height: 140px; resize: vertical; }
form label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.form-box { max-width: 460px; margin: 40px auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.form-box h2 { margin-bottom: 24px; text-align: center; }

/* Confession */
.confession { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; transition: .2s; position: relative; overflow: hidden; }
.confession::before { content:''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-primary); opacity: 0; transition: .25s; }
.confession:hover { transform: translateY(-2px); border-color: var(--primary); }
.confession:hover::before { opacity: 1; }
.conf-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.conf-cat { padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: .75rem; }
.conf-title { font-size: 1.2rem; margin-bottom: 8px; font-weight: 700; }
.conf-content { color: #d0d0e8; white-space: pre-wrap; line-height: 1.65; }
.conf-actions { display: flex; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }
.conf-actions a, .conf-actions button { color: var(--muted); background: none; border: none; cursor: pointer; font: inherit; }
.conf-actions a:hover, .conf-actions button:hover { color: var(--accent); }

/* Categories grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; transition: .25s; color: var(--text); }
.cat-tile:hover { transform: translateY(-3px); border-color: var(--primary); }
.cat-tile .icon { font-size: 2.2rem; margin-bottom: 8px; display: block; }
.cat-tile .name { font-weight: 700; }

/* Flash */
.flash { padding: 14px 20px; text-align: center; font-weight: 500; }
.flash-success { background: rgba(16,185,129,.15); color: #6ee7b7; }
.flash-error { background: rgba(239,68,68,.15); color: #fca5a5; }
.flash-info { background: rgba(139,92,246,.15); color: var(--primary-2); }
.error { background: rgba(239,68,68,.15); color: #fca5a5; padding: 12px; border-radius: 8px; margin-bottom: 14px; }
.success { background: rgba(16,185,129,.15); color: #6ee7b7; padding: 18px; border-radius: 10px; text-align: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 30px 0; text-align: center; color: var(--muted); margin-top: 60px; background: rgba(0,0,0,.2); }
.footer a { color: var(--muted); margin: 0 6px; }

/* Layout helpers */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width:900px) { .grid-2 { grid-template-columns: 1fr; } }

/* Messages */
.msg-list { max-width: 700px; margin: 0 auto; }
.msg-item { display: flex; padding: 14px; background: var(--surface); border-radius: 10px; margin-bottom: 8px; align-items: center; gap: 12px; border: 1px solid var(--border); }
.msg-item.unread { border-color: var(--accent); }
.chat-box { max-width: 700px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.chat-messages { height: 400px; overflow-y: auto; padding: 10px; margin-bottom: 14px; }
.chat-msg { padding: 10px 14px; border-radius: 12px; margin-bottom: 8px; max-width: 70%; word-wrap: break-word; }
.chat-msg.me { background: var(--grad-primary); color: white; margin-left: auto; }
.chat-msg.them { background: var(--surface-2); }
.chat-msg small { display: block; opacity: .7; font-size: .7rem; margin-top: 4px; }

/* Install */
.install-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.install-box { max-width: 480px; width: 100%; background: var(--surface); padding: 36px; border-radius: var(--radius); border: 1px solid var(--border); }
.install-box h1 { margin-bottom: 24px; text-align: center; background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.install-box h3 { margin: 16px 0 10px; color: var(--primary-2); font-size: 1rem; }

/* Premium */
.premium-banner { background: linear-gradient(135deg, #f59e0b, #ec4899); padding: 24px; border-radius: var(--radius); margin-bottom: 24px; text-align: center; color: white; }
.premium-banner h2 { margin-bottom: 8px; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 24px 0; }
.admin-sidebar h2 { padding: 0 20px 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; font-size: 1.1rem; }
.admin-sidebar a { display: block; padding: 11px 20px; color: var(--text); border-left: 3px solid transparent; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--surface); border-left-color: var(--primary); color: var(--primary-2); }
.admin-main { padding: 30px; overflow-x: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat .num { font-size: 1.8rem; font-weight: 800; background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { color: var(--muted); font-size: .85rem; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: var(--bg-2); color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .75rem; letter-spacing: .5px; }
tr:hover { background: var(--surface-2); }
.status-pending { color: var(--gold); }
.status-approved { color: var(--success); }
.status-rejected { color: var(--danger); }
.ip-dup { color: var(--danger); font-weight: 700; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 10px 16px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--primary-2); border-bottom-color: var(--primary); }

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; padding: 10px; }
  .admin-sidebar h2 { display: none; }
  .admin-sidebar a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
}

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .icon { font-size: 3rem; margin-bottom: 12px; }
