:root{
  --bg:#07090d;
  --panel:#0b0f16;
  --card:#0f1520;
  --card2:#0b111a;
  --text:#eaf0ff;
  --muted:#94a3b8;
  --line:rgba(148,163,184,.16);

  --accent:#7c3aed;   /* purple */
  --accent2:#ec4899;  /* pink */
  --good:#22c55e;
  --danger:#ef4444;

  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --shadow2: 0 10px 28px rgba(0,0,0,.45);

  --r:18px;
  --r2:14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(124,58,237,.25), transparent 55%),
    radial-gradient(900px 500px at 85% 25%, rgba(236,72,153,.18), transparent 55%),
    radial-gradient(900px 500px at 50% 120%, rgba(59,130,246,.12), transparent 55%),
    var(--bg);
  color:var(--text);
}

a{color:#c4b5fd;text-decoration:none}
a:hover{opacity:.9}

.wrap{max-width:980px;margin:0 auto;padding:18px}
@media (max-width:980px){ .wrap{padding:14px} }

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:10px;
  padding:12px 14px;
  margin:-18px -18px 16px;
  background: rgba(7,9,13,.72);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
@media (max-width:980px){ .topbar{margin:-14px -14px 14px} }

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:900; letter-spacing:.2px;
  color:var(--text);
}
.brand::before{
  content:"";
  width:12px;height:12px;border-radius:4px;
  background: linear-gradient(135deg, var(--accent2), #f97316, #f59e0b, var(--accent));
  box-shadow: 0 10px 26px rgba(236,72,153,.25);
}

.spacer{flex:1}

.me{
  color:var(--muted);
  font-size:13px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(15,21,32,.55);
}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 12px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(15,21,32,.55);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(148,163,184,.28);
  box-shadow: var(--shadow2);
  background: rgba(15,21,32,.75);
}
.btn:active{transform: translateY(0px)}
.btn.primary{
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 16px 40px rgba(124,58,237,.22);
}

/* Cards + forms */
.card{
  background: rgba(15,21,32,.72);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding:16px;
  box-shadow: var(--shadow);
}
.card.inner{margin-top:12px}

h1{margin:12px 0 14px;font-size:28px}
h2{margin:0 0 12px;font-size:20px}
h3{margin:0 0 10px;font-size:16px}

label{
  display:block;margin:10px 0 6px;
  color:var(--muted);font-size:13px;font-weight:800;
}
input,textarea{
  width:100%;
  border:1px solid var(--line);
  background: rgba(11,15,22,.75);
  color:var(--text);
  border-radius: 14px;
  padding: 11px 12px;
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
input:focus,textarea:focus{
  border-color: rgba(236,72,153,.35);
  box-shadow: 0 0 0 4px rgba(236,72,153,.12);
  background: rgba(11,15,22,.95);
}
textarea{min-height:96px;resize:vertical}

button{
  width:100%;
  margin-top:12px;
  padding: 11px 12px;
  border:none;
  border-radius: 14px;
  font-weight: 900;
  cursor:pointer;
  color:#0b0f16;
  background: linear-gradient(135deg, #ff4fd8, #9b7bff);
  box-shadow: 0 18px 40px rgba(236,72,153,.18);
}
button:disabled{opacity:.6;cursor:not-allowed}

.err{
  background: rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.22);
  color:#fecaca;
  padding:10px 12px;
  border-radius:14px;
  margin:10px 0;
  font-weight:800;
}
.muted{color:var(--muted);font-size:13px}

/* Posts */
.post{
  background: rgba(15,21,32,.72);
  border:1px solid var(--line);
  border-radius: var(--r);
  margin:14px 0;
  overflow:hidden;
  box-shadow: var(--shadow);
}
.posthead{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding: 12px 14px;
}
.posthead a{color:var(--text);font-weight:900}
.posthead a:hover{opacity:.85}

.postimg{
  display:block;width:100%;height:auto;
  background: rgba(11,15,22,.95);
}

.caption{
  padding:10px 14px;
  border-top:1px solid var(--line);
  line-height:1.45;
}

.actions{
  display:flex;align-items:center;flex-wrap:wrap;gap:10px;
  padding:12px 14px;
  border-top:1px solid var(--line);
}
.likebtn{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 12px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(11,15,22,.7);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease;
}
.likebtn:hover{
  transform: translateY(-1px);
  border-color: rgba(236,72,153,.25);
  box-shadow: 0 14px 30px rgba(236,72,153,.10);
}
.meta{
  margin-left:auto;
  color:var(--muted);
  font-size:13px;
}

.comments{display:flex;flex-direction:column;gap:10px;margin:10px 0}
.comment{
  border:1px solid var(--line);
  border-radius: 16px;
  padding:10px 12px;
  background: rgba(11,15,22,.72);
}
.comment b{color:var(--text)}
.comment div{margin-top:6px;line-height:1.4}

.commentform{display:flex;gap:10px}
.commentform input{flex:1}
.commentform button{
  width:auto;margin:0;
  padding:10px 14px;
  border-radius:999px;
}

/* =========================
   IG GRID (PUBLIC)
   ========================= */

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

@media (max-width: 520px) {
  .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

.ig-tile {
  background: rgba(15,21,32,.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow2);
  transition: transform .10s ease, border-color .15s ease;
}

.ig-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(236,72,153,.22);
}

.ig-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.ig-user {
  font-weight: 900;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-tile-body {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* KOCKA */
  background: rgba(11,15,22,.95);
}

.ig-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover; /* IG efekt */
  display: block;
}

.ig-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ig-stats {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.ig-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ig-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11,15,22,.7);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.ig-open:hover {
  border-color: rgba(236,72,153,.22);
}


