:root{
  --header-h: 22px;
  --footer-h: 90px;
  --nav-w: 260px;

  --panel: rgba(26,13,7,0.82);
  --border: #c28a4a;
  --text: #f7e3c5;
  --accent: #ffd28a;
}

/* ================= GLOBAL FIX ================= */

/* Prevent padding/borders causing overflow */
*, *::before, *::after{
  box-sizing: border-box;
}

/* ================= BASE ================= */

html,body{
  height:100%;
}

body{
  margin:0;
  background:#120a06;
  font-family: Georgia, serif;
  color: var(--text);
}

/* ================= CONTENT AREA ================= */

.content-area{
  margin-left: var(--nav-w);
  padding-top: calc(var(--header-h) + 18px);
  padding-bottom: calc(var(--footer-h) + 26px);
  min-height:100vh;
  position:relative;
  z-index:1;
}

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

.content-area::before{
  content:"";
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: var(--nav-w);
  right: 0;

  background: url('/img/backgrounds/main-bg.png') no-repeat;
  background-position: 60% center;
  background-size: 100% auto;

  opacity:.75;
  pointer-events:none;
  z-index:0;
}

/* ================= LIGHT OVERLAY ================= */

.content-area::after{
  content:"";
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: var(--nav-w);
  right: 0;

  background: radial-gradient(circle at 65% 40%,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.28) 55%,
    rgba(0,0,0,0.45) 100%);

  pointer-events:none;
  z-index:1;
}

.content-wrapper{
  max-width:1100px;
  margin:0 auto;
  padding:20px;
  position:relative;
  z-index:2;

  /* prevents accidental horizontal overflow */
  overflow-x:hidden;
}

/* ================= SCROLLING DIVIDER ================= */

.smurf-divider{
  width:100%;
  height:70px;
  margin:26px 0;

  background-image:url('/img/dividers/divider.png');
  background-repeat:repeat-x;
  background-size:auto 70px;
  background-position:0 center;

  animation:scrollDivider 25s linear infinite;

  opacity:.95;
  filter:drop-shadow(0 0 10px rgba(0,0,0,.55));
}

@keyframes scrollDivider{
  from{background-position:0 center;}
  to{background-position:-2000px center;}
}

/* ================= CARDS ================= */

.content-card,
.schedule-box,
.clock-box,
.admin-card{
  background:var(--panel);
  border:2px solid var(--border);
  border-radius:14px;
  padding:24px;
  margin-bottom:26px;

  box-shadow:
    0 0 18px rgba(255,200,120,.35),
    inset 0 0 10px rgba(0,0,0,.55);

  backdrop-filter:blur(4px);
  text-align:center;
}

/* Exceptions */

.page-schedule .content-card,
.page-djs .content-card,
.page-friends .content-card{
  text-align:left;
}

/* ================= BUTTONS ================= */

.admin-btn,
.button,
.play-btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,220,160,.28);
  background:rgba(255,220,160,.10);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  font-weight:700;
  transition:.15s ease;
}

.admin-btn:hover,
.button:hover,
.play-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 0 14px rgba(255,220,160,.25);
  background:rgba(255,220,160,.16);
}

.admin-btn.primary{
  background:linear-gradient(135deg,#ffb347,#ffcc33);
  color:#3b1b0a;
  font-weight:900;
}

/* ================= LISTEN BUTTONS ================= */

.listen-buttons,
.listen-inline{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:12px;
}

.listen-buttons a,
.listen-inline a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,220,160,.35);
  background:rgba(255,220,160,.10);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  box-shadow:
    0 0 12px rgba(255,200,120,.18),
    inset 0 0 10px rgba(0,0,0,.45);
}

.listen-buttons a:hover,
.listen-inline a:hover{
  background:rgba(255,220,160,.18);
  box-shadow:
    0 0 16px rgba(255,220,160,.25),
    inset 0 0 10px rgba(0,0,0,.55);
}

/* ================= FORMS ================= */

.form{
  max-width:760px;
  margin:0 auto;
}

.input-field{
  width:100%;
  max-width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(194,138,74,.55);
  background:rgba(0,0,0,.25);
  color:var(--text);
  margin:10px 0;
}

.input-field:focus{
  border-color:rgba(255,220,160,.65);
  box-shadow:0 0 12px rgba(255,220,160,.25);
}

/* ================= REQUEST FORMS ================= */

.request-wrapper{
  width:100%;
  max-width:760px;
  margin:0 auto;
}

.request-box{
  width:100%;
  background:rgba(255,220,160,.06);
  border:1px solid rgba(194,138,74,.55);
  border-radius:14px;
  padding:16px;
  margin:14px 0;
  box-shadow:inset 0 0 10px rgba(0,0,0,.45);
}

.request-field{
  text-align:left;
  margin-bottom:12px;
}

.request-field label{
  display:block;
  font-weight:700;
  margin-bottom:8px;
  color:var(--accent);
}

.request-input,
.request-textarea{
  width:100%;
  max-width:100%;
  display:block;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(194,138,74,.55);
  background:rgba(0,0,0,.25);
  color:var(--text);
}

.request-textarea{
  min-height:120px;
  resize:vertical;
}

.request-button{
  padding:12px 18px;
  border-radius:12px;
  border:1px solid rgba(255,220,160,.28);
  background:rgba(255,220,160,.14);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
}

/* ================= CLOCKS ================= */

.clock-flex{
  display:flex;
  justify-content:center;
  gap:18px;
  flex-wrap:wrap;
}

.clock-box{
  min-width:180px;
  background:rgba(255,220,160,.08);
  border:1px solid rgba(194,138,74,.55);
}

/* ================= SCHEDULE ================= */

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

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

.schedule-grid--vertical{
  display:flex;
  flex-direction:column;
  gap:16px;
}


/* force schedule cards full width */
.schedule-day-card{ width:100%; }

.schedule-day-card{
  text-align:left;
}

.schedule-day-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.badge-live{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,220,160,.28);
  background:rgba(255,220,160,.10);
  font-weight:700;
}

.schedule-empty{
  opacity:.85;
  padding:10px;
  background:rgba(0,0,0,.25);
  border-radius:12px;
}

.schedule-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.schedule-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:10px;
  border-radius:12px;
  background: rgba(255,220,160,.06);
  border:1px solid rgba(194,138,74,.55);
  box-shadow: inset 0 0 10px rgba(0,0,0,.45);
}

.schedule-row.current-hour{
  outline:2px solid rgba(255,210,138,.65);
}

.schedule-time{
  min-width:86px;
  font-weight:700;
  color:var(--accent);
}

.schedule-show{
  font-weight:700;
}

/* New schedule layout (Morning/Evening split) */
.schedule-split{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}

@media (min-width: 820px){
  .schedule-split{ grid-template-columns: 1fr 1fr; }
}

.schedule-half{
  padding:12px;
  border-radius:14px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(194,138,74,.55);
}

.schedule-half h3{
  margin:0 0 10px 0;
  font-size:1.1rem;
  display:flex;
  align-items:center;
  gap:8px;
}

.slot-row{
  display:grid;
  grid-template-columns: 86px 1fr;
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:14px;
  background: rgba(255,220,160,.06);
  border:1px solid rgba(194,138,74,.55);
  box-shadow: inset 0 0 10px rgba(0,0,0,.45);
  margin-bottom:10px;
}

.slot-time{
  font-weight:800;
  color:var(--accent);
  text-align:center;
  line-height:1.1;
}

.slot-pill{
  padding:12px 14px;
  border-radius:12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(194,138,74,.35);
}

.slot-pill .slot-show{ font-weight:800; }
.slot-pill .slot-dj{ opacity:.9; margin-top:2px; font-size:.95em; }


/* ================= ADMIN ================= */

.admin-wrap{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:20px;
}

.admin-title{
  color:#ffd8a8;
  letter-spacing:.1em;
  text-transform:uppercase;
  margin-bottom:15px;
}

/* ================= MOBILE ================= */

@media (max-width:1100px){

  .content-area{
    margin-left:0;
  }

  .content-area::before,
  .content-area::after{
    left:0;
  }

  .schedule-grid{grid-template-columns:1fr;}


  .clock-flex{flex-direction:column;gap:14px;}

  .admin-wrap{
    grid-template-columns:1fr;
  }
}

/* ================= ADMIN GRID (added for merged admin panel) ================= */

.admin-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}

.admin-card-link{
  display:block;
  padding:16px 14px;
  border-radius:14px;
  border:2px solid var(--border);
  background:rgba(255,220,160,.08);
  color:var(--text);
  text-decoration:none;
  font-weight:800;
  text-align:center;

  box-shadow:
    0 0 14px rgba(255,200,120,.20),
    inset 0 0 10px rgba(0,0,0,.45);
  transition:.15s ease;
}

.admin-card-link:hover{
  transform:translateY(-1px);
  background:rgba(255,220,160,.14);
  box-shadow:
    0 0 18px rgba(255,220,160,.28),
    inset 0 0 10px rgba(0,0,0,.55);
}


/* ================= MSG BANNERS ================= */
.msg{
  padding:10px 12px;
  border-radius:12px;
  margin:10px 0;
  border:1px solid rgba(255,220,160,.35);
  background:rgba(255,220,160,.10);
}
.msg.success{
  border-color:rgba(120,255,170,.45);
  background:rgba(120,255,170,.10);
}
.msg.error{
  border-color:rgba(255,80,120,.55);
  background:rgba(255,80,120,.10);
}


/* Force schedule cards vertical on the Schedule page */
.page-schedule .schedule-grid{
  grid-template-columns: 1fr;
}


/* Admin pages: stacked layout (one card per row) */
.admin-wrap.stack{
  grid-template-columns: 1fr;
}


/* Admin convenience */
.admin-topbar{
  display:flex;
  justify-content:flex-start;
  margin: 8px 0 14px;
}
.admin-return{
  display:inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 102, 0.45);
  background: rgba(0,0,0,0.45);
  text-decoration:none;
  color: #ffcc66;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 204, 102, 0.12);
}
.admin-return:hover{
  filter: brightness(1.12);
  box-shadow: 0 0 16px rgba(255, 204, 102, 0.18);
}



/* ================= FRIENDS PAGE ================= */

.friends-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:16px;
  margin-top: 18px;
}

.friend-card{
  padding:18px;
}

.friend-top{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

.friend-image{
  width:90px;
  min-width:90px;
  height:120px;
  border-radius:12px;
  border:1px solid rgba(255,220,160,.28);
  background: rgba(0,0,0,.25);
  box-shadow: 0 0 14px rgba(255,200,120,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.friend-image img{
  width:100%;
  height:100%;
  object-fit:contain; /* works for logos + pics */
  display:block;
  padding:8px;
}

.friend-image-fallback{
  font-size:34px;
  opacity:.9;
}

.friend-name{
  margin:0 0 6px 0;
}

.friend-desc{
  margin:0;
  opacity:.92;
  line-height:1.35;
}

.friend-actions{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
}

.friend-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid rgba(255,220,160,.35);
  background:rgba(255,220,160,.10);
  color:var(--text);
  text-decoration:none;
  font-weight:800;
  transition:.15s ease;
}

.friend-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 0 14px rgba(255,220,160,.25);
  background:rgba(255,220,160,.16);
}

@media (max-width: 420px){
  .friend-top{ gap:12px; }
  .friend-image{ width:82px; min-width:82px; height:110px; }
}


/* ================= DJs PAGE ================= */

.dj-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:18px;
  margin-top: 18px;
}

@media (max-width: 980px){
  .dj-grid{ grid-template-columns: 1fr; }
}

.dj-card{
  padding:18px;
}

.dj-image{
  width:160px;
  min-width:160px;
  height:200px;
  border-radius:14px;
  border:1px solid rgba(255,220,160,.28);
  background: rgba(0,0,0,.25);
  box-shadow: 0 0 14px rgba(255,200,120,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin: 0 auto 12px auto;
}

.dj-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.dj-name{
  margin: 6px 0 6px 0;
  text-align:center;
}

.dj-show{
  margin: 0 0 10px 0;
  text-align:center;
  opacity:.95;
  font-weight:700;
}

.dj-bio{
  margin:0;
  opacity:.92;
  line-height:1.4;
}

.btn-accent{
 display:inline-block;
 padding:10px 18px;
 background:#d9a44c;
 color:#000;
 border-radius:8px;
 text-decoration:none;
 font-weight:bold;
}
.btn-accent:hover{background:#f2c46f;}


/* ================= CHAT ================= */
.chat-card{
  display:flex;
  flex-direction:column;
}

.chat-box{
  width:100%;
  /* Fit within viewport so controls + footer remain visible */
  height:auto;
  min-height:300px;
  max-height:55vh;
  flex:1;
  overflow-y:auto;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(194,138,74,.55);
  background:rgba(0,0,0,.22);
  box-shadow:inset 0 0 10px rgba(0,0,0,.45);
}

.chat-msg{
  padding:10px 12px;
  border-radius:12px;
  margin:10px 0;
  border:1px solid rgba(194,138,74,.25);
  background:rgba(255,220,160,.05);
}

.chat-msg.admin{
  border-color: rgba(0, 204, 136, .55);
  background: rgba(0, 204, 136, .08);
}

.chat-msg .meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-weight:800;
  opacity:.95;
  margin-bottom:6px;
}

.chat-msg .who{
  color: var(--accent);
}

.chat-msg.admin .who{
  color: #00cc88;
}

.chat-msg .time{
  font-weight:700;
  opacity:.75;
}

.chat-controls{
  margin-top:14px;
}

.chat-input-row{
  display:flex;
  gap:10px;
  margin-top:10px;
}

.chat-input-row .request-input{
  flex:1;
}

.chat-emoji{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.emoji-btn{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(194,138,74,.55);
  background:rgba(0,0,0,.18);
  cursor:pointer;
  font-size:18px;
}

.emoji-btn:hover{
  background:rgba(255,220,160,.12);
}

.chat-hint{
  opacity:.75;
  margin-top:10px;
  font-size:.95em;
}

@media (max-width: 700px){
  .chat-input-row{ flex-direction:column; }
  .chat-box{ max-height:50vh; min-height:240px; }
}


/* Live Chat page - fit and emoji picker */
.chat-card{ width:100%; }
.chat-input-row{ flex-wrap:wrap; }
.chat-input-row .btn{ flex:0 0 auto; min-width:90px; }
.chat-input-row input{ flex:1 1 420px; }

.btn-emoji{ padding:10px 14px; border-radius:10px; }
.emoji-panel{
  margin-top:12px;
  display:none;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(194,138,74,.55);
  background:rgba(0,0,0,.25);
}
.emoji-panel.open{ display:block; }
.emoji-search-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}
.emoji-search{ flex:1 1 auto; }
.btn-emoji-close{ padding:10px 14px; }
.emoji-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap:8px;
  max-height:220px;
  overflow:auto;
  padding-right:6px;
}
.emoji-pick{
  border:1px solid rgba(194,138,74,.45);
  background:rgba(0,0,0,.18);
  border-radius:10px;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  padding:8px 0;
}
.emoji-pick:hover{
  box-shadow:0 0 10px rgba(255,200,120,.25);
}
.emoji-empty{
  grid-column:1/-1;
  opacity:.85;
  padding:10px;
}



/* Admin permissions checkbox grid */
.perm-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:10px;
}
.perm-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(217,164,76,0.35);
}
.perm-item input[type="checkbox"]{
  transform: scale(1.15);
  accent-color: #d9a44c;
}


/* Live DJ badges */
.live-ribbon{display:inline-block;margin-left:10px;padding:4px 10px;border-radius:999px;border:1px solid rgba(255,215,120,.9);background:rgba(255,215,120,.18);color:#ffd78a;font-size:.75em;letter-spacing:.12em;box-shadow:0 0 10px rgba(255,215,120,.25);}
.dj-card.live{box-shadow:0 0 18px rgba(120,255,220,.25);border-color:rgba(120,255,220,.75) !important;}
.dj-live-tag{display:inline-block;margin:8px auto 0 auto;padding:4px 10px;border-radius:999px;border:1px solid rgba(120,255,220,.85);background:rgba(120,255,220,.12);color:#9fffe2;font-weight:800;font-size:.8em;}
.dj-nextup{opacity:.9;margin-top:8px;font-size:.95em;}

/* Admin layout helpers */
.admin-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start;}
@media(max-width: 980px){.admin-grid-2{grid-template-columns:1fr;}}
.admin-form .admin-label{display:block;margin:10px 0 6px;opacity:.9;}
.admin-input{width:100%;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,215,120,.35);background:rgba(0,0,0,.35);color:var(--text-color,#f2e7d2);outline:none;}
.admin-input:focus{border-color:rgba(255,215,120,.75);box-shadow:0 0 0 3px rgba(255,215,120,.12);} 
