:root{
  --bg:#0b0b0f;
  --card:#12121a;
  --line:#2a2a38;
  --text:#e9e9f2;
  --muted:#a5a5b8;
  --accent:#7c5cff;
}

*{box-sizing:border-box}

/* ===== BACKGROUND IMAGE ===== */

html{
  background-image:url('/back.png');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-attachment:fixed;
}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:rgba(0,0,0,0.65);
}

/* ===== LAYOUT ===== */

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

a{color:inherit;text-decoration:none}

/* ===== HEADER ===== */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-title{
  font-size:22px;
  font-weight:900;
}

.brand-sub{
  font-size:13px;
  color:var(--muted);
}

/* ===== FLASH ===== */

.flash{
  margin:10px 0 15px;
  padding:12px;
  border-radius:10px;
  font-size:13px;
}

.flash.success{
  background:#133d28;
  color:#6bffb0;
}

.flash.error{
  background:#3a1b1b;
  color:#ff6b6b;
}

/* ===== SECTION ===== */

.section-title{
  text-align:center;
  margin:25px 0 20px;
  font-weight:800;
}

/* ===== GRID ===== */

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}

@media (max-width:900px){
  .grid{
    grid-template-columns:repeat(2,1fr);
  }
}

/* ===== CARD ===== */

.card{
  background:rgba(18,18,26,0.85);
  border-radius:12px;
  overflow:hidden;
}

.thumb{
  width:100%;
  height:250px;
  object-fit:cover;
  display:block;
}

.meta{
  padding:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.vote-btn{
  padding:8px 10px;
  border:none;
  border-radius:8px;
  background:var(--accent);
  color:white;
  cursor:pointer;
}

.vote-btn:disabled{
  background:#444;
  cursor:not-allowed;
}

/* ===== BOARD ===== */

.board{
  margin-top:40px;
  background:rgba(18,18,26,0.9);
  border-radius:12px;
  overflow:hidden;
}

.board-top{
  padding:15px;
  display:flex;
  justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,0.05);
}

.table th{
  color:var(--muted);
  font-size:13px;
}

.table td.title{
  font-weight:600;
}

/* ===== PAGER ===== */

.pager{
  padding:15px;
  text-align:center;
}

.pager a,
.pager span{
  margin:3px;
  padding:6px 10px;
  border-radius:6px;
  background:#1d1d28;
}

/* ===== NOTICE ===== */

.notice{
  margin-top:15px;
  font-size:13px;
  color:var(--muted);
}