/* ============ GLOBAL ============ */
:root{
  --accent: #ff6a00;
  --accent-2: #ff8a2a;
  --text: #ffffff;
  --card: rgba(10, 12, 20, .55);
  --card-stroke: rgba(255,255,255,.14);
  --header-bg: rgba(6, 8, 14, .55);
  --shadow-1: 0 10px 30px rgba(0,0,0,.45);
  --shadow-2: 0 20px 60px rgba(0,0,0,.55);
  --radius-lg: 16px;
  --radius-md: 12px;
}

html, body { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* VIDEO/GIF/PNG OZADJE – novo */
.bg-container{
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  /* baseline: PNG (instant) – če hočeš raje GIF, zamenjaj .png z .gif */
  background: url("DJ_MK_STRAN_OZADJE.png") center/cover no-repeat fixed;
}
#bgVideo{
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* ko video teče, skrij PNG ozadje, da ni dvojnega risanja */
.bg-ready .bg-container{ background-image: none; }

/* fallback za uporabnike z manj animacij */
@media (prefers-reduced-motion: reduce) {
  /* prisilimo statično PNG in skrijemo video */
  .bg-container{ background-image: url("DJ_MK_STRAN_OZADJE.png"); }
  #bgVideo{ display: none !important; }
}

/* subtilen overlay za berljivost */
body::after{
  content:"";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(0,0,0,.25), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.35));
  pointer-events:none; z-index:0;
}

a { color: var(--text); }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-stroke);
  padding: 14px 16px;
  display: flex; justify-content: center; align-items: center;
  box-shadow: var(--shadow-1);
}
.site-title {
  margin: 0;
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  flex: 1;
}
.top-left, .top-right{
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: .5rem;
}
.top-left{ left: 16px; }
.top-right{ right: 16px; }

/* ============ LAYOUT ============ */
.wrap {
  max-width: 1000px;
  margin: 24px auto 56px;
  padding: 0 16px;
  position: relative; z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}
.card h2{
  margin: 6px 0 12px;
  letter-spacing: .2px;
}

/* ============ TOASTS ============ */
.toasts{
  position: fixed; top: 76px; right: 16px; z-index: 1200;
  display: grid; gap: 8px;
}
.toast{
  background: rgba(20, 24, 36, .9);
  border: 1px solid var(--card-stroke);
  color: #fff; padding: 10px 14px;
  border-radius: 12px; box-shadow: var(--shadow-1);
  transform: translateY(0); opacity: 1;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.hide{ opacity: 0; transform: translateY(-8px); }

/* ============ GUMBI ============ */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; text-decoration: none; font-weight: 700;
  border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,106,0,.35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn.small { padding: 8px 12px; font-size: .95rem; }
.btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.btn:active{ transform: translateY(0); box-shadow: 0 4px 12px rgba(255,106,0,.28); }

.btn.ghost{
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.7);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn.danger{
  background: linear-gradient(135deg, #d64545, #f16a6a);
  box-shadow: 0 6px 18px rgba(214,69,69,.35);
}

.btn:focus,
a:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* ============ FORME ============ */
input[type=text], input[type=password], textarea, input[type=file] {
  width: 100%; max-width: 520px;
  padding: 12px; border-radius: 12px; border: none;
  background: rgba(255, 255, 255, .1);
  color: #fff; margin: 6px 0; font-size: 16px;
}
textarea{ min-height: 120px; resize: vertical; }
.edit-form { display: grid; gap: 10px; align-items: start; margin: 8px 0; }

/* ============ MODAL (LOGIN) ============ */
.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; transition: opacity .2s;
  z-index: 2000;
}
.modal[aria-hidden="true"]{ opacity: 0; pointer-events: none; }

.modal-card {
  background: rgba(15, 20, 35, .95);
  border: 1px solid var(--card-stroke);
  border-radius: 14px; max-width: 420px; width: 100%;
  padding: 20px; text-align: center;
  box-shadow: var(--shadow-2);
}
.modal-card h3 { margin: 0 0 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

/* ============ LANDING GRID (4 ploščice) ============ */
.grid-wrap{
  max-width: 1100px; margin: 5rem auto 7rem; padding: 0 16px;
  display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 28px;
}
.tile{
  position: relative;
  display:grid; place-items:center;
  min-height: 190px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tile::after{
  content:""; position:absolute; inset:0;
  background: radial-gradient(500px 200px at 20% 0%, rgba(255,255,255,.10), transparent 60%);
  pointer-events:none;
}
.tile span{
  text-transform: uppercase; letter-spacing: .8px; text-align:center;
  font-weight: 800; line-height: 1.1;
  font-size: clamp(1rem, 2.8vw, 1.6rem);
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.tile span svg{ display:block; margin: 0 auto 6px; opacity:.9; }
.tile:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(255,255,255,.22);
}
@media (max-width: 640px){
  .grid-wrap{ grid-template-columns: 1fr; margin: 3rem auto 4rem; }
  .tile{ min-height: 150px; }
}

/* ============ SOCIAL MODAL ============ */
.mkm-modal{
  position: fixed; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  z-index: 2100;
}
.mkm-modal[hidden]{ display:none; }
.mkm-modal__card{
  position: relative; width: min(560px, 92vw);
  background: var(--card);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem 1.6rem; color: #fff;
  box-shadow: var(--shadow-2);
}
.mkm-modal__card h3{ margin: 0 0 .6rem; font-size: 1.25rem; }
.mkm-close{
  position: absolute; right: .6rem; top: .4rem;
  font-size: 1.6rem; line-height: 1; border: 0;
  background: transparent; color: #fff; cursor: pointer;
}
.mkm-social{
  list-style: none; margin: .25rem 0 0; padding: 0;
  display: grid; gap: .6rem;
}
.mkm-social a{
  display: block; padding: .7rem 1rem;
  border: 1px solid var(--card-stroke); border-radius: var(--radius-md);
  text-decoration: none; color: #fff;
  transition: transform .15s ease, background .15s ease;
}
.mkm-social a:hover{ transform: translateY(-2px); background: #222; }


/* ============ TRACK LIST ============ */
.tracks { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}

.track-card {
  padding: 16px;
  margin-bottom: 14px;                 /* razmik med skladbami */
  border: 1px solid var(--card-stroke); /* rob kot pri komentarjih */
  border-radius: 12px;                  /* zaobljeni robovi */
  background: rgba(255,255,255,.04);    /* rahlo prosojno ozadje */
  box-shadow: var(--shadow-1);          /* nežna senca */
  transition: background .15s ease, box-shadow .15s ease;
}

.track-card:hover {
  background: rgba(255,255,255,.07);
  box-shadow: var(--shadow-2);
}

.track-head { 
  font-size: 1.1rem; 
  margin-bottom: 8px; 
  display:flex; 
  gap:.5rem; 
  flex-wrap:wrap; 
  align-items:baseline; 
}

.title { font-weight: 800; }

.title a { 
  color:#fff; 
  text-decoration:none; 
  border-bottom:1px dashed transparent; 
  transition:border-color .15s ease; 
}

.title a:hover { border-color: rgba(255,255,255,.45); }

.artist { opacity: .9; }

audio { 
  width: 100%; 
  display: block; 
  margin: 10px 0 6px; 
}

.track-meta {
  display: flex; 
  gap: 12px; 
  align-items: center; 
  justify-content: space-between;
}

.filename { opacity: .75; font-size: .9rem; }
.msg { opacity: .9; }


/* ============ TRACK DETAIL & COMMENTS ============ */
.track-detail-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.track-title{ margin: .2rem 0 .4rem; font-weight: 800; }
.desc p { margin: 0 0 8px; }
.details { margin-top: 10px; }
.details summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }

.comments{ list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.comment{
  border: 1px solid var(--card-stroke);
  background: rgba(255,255,255,.03);
  border-radius: 12px; padding: 12px;
}
.comment-meta{ display:flex; gap:.6rem; align-items:baseline; margin-bottom:4px; }
.comment p{ margin:.25rem 0 0; }

.muted { opacity: .8; }

/* ============ RESPONSIVE ============ */
@media (max-width: 360px) {
  .site-title { font-size: clamp(16px, 5vw, 22px); }
  h2 { font-size: clamp(14px, 4.5vw, 20px); }
  .btn { padding: 8px 12px; font-size: 0.85rem; }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}

/* Barvni picker + paleta */
.color-row{
  display:flex; gap:.5rem; align-items:center; flex-wrap:wrap;
}
input[type="color"]{
  width:48px; height:36px; border:none; padding:0;
  background: transparent; cursor: pointer;
  border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.swatches{
  list-style:none; margin:.5rem 0 0; padding:0;
  display:flex; flex-wrap:wrap; gap:.5rem;
}
.swatch{
  width:28px; height:28px; border-radius:999px;
  border:2px solid rgba(255,255,255,.7);
  background: var(--c);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  cursor:pointer; transition: transform .1s ease, box-shadow .1s ease;
}
.swatch:hover{ transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.35); }

.desc-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:.5rem;
  margin:.25rem 0 .5rem;
}
.desc-color-controls{
  display:flex; gap:.5rem; align-items:center;
}
.desc-color-controls input[type="color"]{
  appearance:none; width:22px; height:22px; padding:0; border:none;
  border-radius:6px; cursor:pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  background: transparent;
}
/* ===== Mobile header fix ===== */
@media (max-width: 560px){
  .site-header{ padding: 12px 10px; }

  /* naslov naj ima prostor za gumba levo/desno */
  .site-title{
    font-size: clamp(18px, 5vw, 24px);
    padding: 0 96px;              /* prostor za gumba */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-left, .top-right{
    top: 12px;                    /* malo višje, bolj stran od naslova */
    transform: translateY(0);
  }
  .top-left{ left: 10px; }
  .top-right{ right: 10px; }

  /* manjši gumbi v headerju */
  .btn.small{
    padding: 6px 10px;
    font-size: 0.85rem;
    line-height: 1.1;
  }
}

/* ekstra stisk za zelo ozke telefone */
@media (max-width: 380px){
  .site-title{ padding: 0 110px; font-size: 18px; }
  .btn.small{ padding: 5px 9px; font-size: 0.8rem; }
  .top-left{ left: 8px; }
  .top-right{ right: 8px; }
}

/* Alt-mail gumbi (Gmail / Outlook Web) */
.alt-mail{
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.alt-mail .btn{
  font-size: 0.85rem;
  padding: 6px 12px;
  line-height: 1.2;
}

/* Če imaš še <a> brez .btn, naj ne bodo podčrtani */
.alt-mail a{
  text-decoration: none;
  color: #fff;
}
.alt-mail a:hover{
  text-decoration: none;
}

/* Footer fix */
.site-footer {
  position: fixed;
  bottom: 12px;           /* razdalja od dna */
  left: 50%;              /* center */
  transform: translateX(-50%);
  text-align: center;
  z-index: 1000;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer a {
  color: #fff;
  text-decoration: underline;
  opacity: 0.85;
}

.site-footer a:hover {
  opacity: 1;
  text-decoration: none;
}
.track-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* razmik med gumbom in datumom */
  margin-top: 0.25rem;
}
.meta-row {
  display: flex;
  gap: 4rem;       /* večji razmik med elementi */
  margin: 0.25rem 0;
}

.meta-row .muted {
  font-size: 0.9em;
}


/* Opis naj se prelomi tudi pri zelo dolgih nizih brez presledkov */
.desc-body {
  overflow-wrap: anywhere;   /* moderni način – prelomi kjerkoli, če je treba */
  word-break: break-word;    /* fallback za stare brskalnike */
  white-space: normal;       /* zagotovi standardne prelome */
  overflow-x: hidden;        /* prepreči vodoravni scroll zaradi predolgih besed */
}

/* Če želiš ohraniti ročne \n prelome iz besedila opisa, uporabi raje: */
.desc-body p {
  white-space: pre-wrap;     /* ohrani \n in še vedno prelomi dolge nize */
  margin: 0;                 /* opcijsko: poravna razmike kot prej */
}
.track-actions form,
.track-actions a { display:inline-block; margin-left:0.25rem; }

/* === CART DRAWER (desni panel pod ikono) =============================== */
.cart-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(1px);
  z-index: 1800;                     /* nad toasti (1200) in headerjem (1000), pod modalom (2000) */
}
.cart-backdrop[hidden]{ display:none !important; }

.cart-sidebar{
  position: fixed;
  right: 16px;                       /* držimo se desnega roba, kjer je ikona */
  top: 72px;                         /* približno višina headerja */
  bottom: 16px;
  width: min(380px, 92vw);
  max-height: calc(100dvh - 88px);
  overflow: auto;

  z-index: 1900;                     /* nad backdropom */
  background: rgba(15, 20, 35, .96);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 14px;

  transform: translateX(110%);       /* start izven ekrana na desni */
  opacity: 0;
  transition: transform .25s ease, opacity .2s ease;
}
.cart-sidebar[aria-hidden="false"]{
  transform: translateX(0);
  opacity: 1;
}

.cart-header{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.cart-body{ display: grid; gap: 10px; }

.cart-list{ list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cart-item{
  display: grid;
  grid-template-columns: 1fr auto auto auto; /* naslov | qty | price | remove */
  gap: 8px; align-items: center;
}
.cart-item__title{ font-weight: 700; }
.cart-item__qty, .cart-item__price{ opacity: .85; font-variant-numeric: tabular-nums; }
.inline{ display: inline; }
.cart-total{ margin-top: 6px; font-weight: 700; }

/* gumbi v košarici */
.btn.small{ font-size: .9rem; padding: 6px 10px; line-height: 1.1; }
.btn.danger{ background: linear-gradient(135deg, #d64545, #f16a6a); box-shadow: 0 6px 18px rgba(214,69,69,.35); }

/* manjši, bolj "popover" stil na telefonih */
@media (max-width: 560px){
  .cart-sidebar{
    right: 8px; left: 8px;           /* skoraj čez celo širino */
    width: auto;
    top: 64px; bottom: 10px;
    transform: translateY(6px) scale(.98);
    transform-origin: top right;
  }
  .cart-sidebar[aria-hidden="false"]{
    transform: translateY(0) scale(1);
  }
}

input[type="range"]{
  width: 100%;
  accent-color: var(--accent);
}
