:root{
  --bg:#0b0c10;
  --panel:#11131a;
  --card:#151825;
  --text:#f3f5ff;
  --muted:#a6aac0;
  --line:#24283a;

  --accent:#7c5cff;
  --accent2:#00d4ff;
  --danger:#ff3b6a;
  --ok:#31d07a;

  --radius:16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);

  /* genre colors */
  --g-bollywood:#31d07a; /* green */
  --g-copy:#00d4ff;
  --g-jazz:#7c5cff;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans JP", sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(124,92,255,.22), transparent 60%),
              radial-gradient(1000px 600px at 80% 10%, rgba(0,212,255,.15), transparent 55%),
              var(--bg);
  color:var(--text);
}

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 20px;
}

header{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px;
}
.topRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}
.title{
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
}
.hint{
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

/* right menu */
.menuWrap{
  position: relative;
  display:flex;
  align-items:center;
}
.iconBtn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;

  /* bigger tap target */
  padding: 12px 14px;
  min-width: 44px;
  min-height: 44px;

  cursor:pointer;
  font-weight: 950;
  font-size: 18px;
  line-height: 1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.iconBtn:active{ transform: scale(.98); }

.menu{
  position:absolute;
  right:0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: linear-gradient(180deg, rgba(21,24,37,.98), rgba(17,19,26,.98));
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  display:none;
  z-index: 10000;
}
.menu.open{ display:block; }
.menuItem{
  width:100%;
  text-align:left;
  border:none;
  background: transparent;
  color: var(--text);
  padding: 10px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
}
.menuItem:hover{
  background: rgba(255,255,255,.06);
}

/* Genre pills */
.pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.pill{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select:none;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.pill:active{ transform: scale(.98); }
.pill.active{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* bollywood pill should look green even when not active */
.pill[data-genre="bollywood"]{
  border-color: rgba(49,208,122,.40);
  color: rgba(231,255,244,.95);
  background: rgba(49,208,122,.10);
}

/* active color by genre */
.pill.active[data-genre="bollywood"]{
  background: rgba(49,208,122,.22);
  border-color: rgba(49,208,122,.70);
}
.pill.active[data-genre="copy"]{
  background: rgba(0,212,255,.16);
  border-color: rgba(0,212,255,.45);
}
.pill.active[data-genre="jazz"]{
  background: rgba(124,92,255,.18);
  border-color: rgba(124,92,255,.55);
}

/* Calendar container */
#calendar{
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* FullCalendar restyle */
.fc .fc-toolbar{
  margin: 6px 6px 10px;
  gap: 10px;
}
.fc .fc-toolbar-title{
  font-size: 18px;
  font-weight: 900;
  letter-spacing:.3px;
}
.fc .fc-button{
  border:1px solid var(--line) !important;
  background: rgba(255,255,255,.04) !important;
  color: var(--text) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  font-weight: 900 !important;
  box-shadow:none !important;
}
.fc .fc-button:hover{
  background: rgba(255,255,255,.07) !important;
}
.fc .fc-button:disabled{ opacity:.45; }

.fc-theme-standard td, .fc-theme-standard th{ border-color: rgba(255,255,255,.06); }
.fc .fc-scrollgrid{ border-color: rgba(255,255,255,.06); }
.fc .fc-col-header-cell-cushion{
  color: var(--muted);
  font-weight: 800;
  padding: 8px 0;
  font-size: 12px;
}
.fc .fc-daygrid-day-number{
  color: rgba(243,245,255,.85);
  font-weight: 900;
  font-size: 12px;
  padding: 6px 8px;
}

/* Event base: dot only (title hidden) */
.fc .fc-daygrid-event{
  border: 0;
  border-radius: 999px;
  padding: 0;
  margin: 2px 6px;
  background: transparent;
}
.fc .fc-daygrid-event .fc-event-time{ display:none; }
.fc .fc-daygrid-event .fc-event-title{ display:none; }

/* dot-event layout: dot + optional check */
.fc .fc-daygrid-dot-event{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

/* show only dot big (dayGrid dot element) */
.fc .fc-daygrid-event-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  margin:0;
  border:0;
  background: rgba(255,255,255,.25);
}

/* dot color by genre */
.g-bollywood .fc-daygrid-event-dot{ background: var(--g-bollywood); }
.g-copy     .fc-daygrid-event-dot{ background: var(--g-copy); }
.g-jazz     .fc-daygrid-event-dot{ background: var(--g-jazz); }

/* reserved = add white check next to dot */
.my-reserved{ background: transparent !important; }
.my-reserved .fc-daygrid-event-dot{ background: var(--g-bollywood); }
.my-reserved::after{
  content:"✓";
  display:inline-block;
  margin-left:6px;
  font-weight: 950;
  color:#fff;
  transform: translateY(-1px);
}

/* Status list */
.statusList{
  display:grid;
  gap:10px;
}
.statusCard{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 12px;
}
.statusRow{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:baseline;
}
.statusTitle{
  font-weight: 950;
}
.statusMeta{
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}
.nicknames{
  margin-top: 8px;
  color: rgba(243,245,255,.92);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.badge{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  background: rgba(49,208,122,.16);
  border: 1px solid rgba(49,208,122,.40);
  color: rgba(231,255,244,.95);
}

/* Modal */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:14px;
  z-index:9999;
}
.modal{
  width:min(720px, 100%);
  background: linear-gradient(180deg, rgba(21,24,37,.98), rgba(17,19,26,.98));
  border:1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: var(--shadow);

  /* IMPORTANT: keep modal inside viewport */
  max-height: min(78vh, 720px);
  display:flex;
  flex-direction:column;
}
.modalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
  gap:12px;
}
.modalTitle{
  font-size:16px;
  font-weight:950;
  line-height:1.3;
}
.closeBtn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;

  min-height: 40px;
  padding:10px 12px;

  cursor:pointer;
  font-weight:900;
}
.modalBody{
  padding:14px 16px 16px;
  display:grid;
  gap:12px;

  /* IMPORTANT: body scroll */
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:8px 10px;
  font-size:14px;
}
.kv div:nth-child(odd){
  color:var(--muted);
  font-weight:800;
}
.row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:10px;
  align-items:center;
}
input[type="text"]{
  width:100%;
  padding:12px 12px;
  font-size:16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline:none;
}
input[type="text"]::placeholder{ color: rgba(166,170,192,.75); }

.btn{
  border:none;
  border-radius:14px;
  padding:13px 12px;
  font-size:15px;
  font-weight:950;
  cursor:pointer;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(0,212,255,.55));
  color:#071018;
  white-space:nowrap;
}
.btn.secondary{
  background: rgba(255,255,255,.06);
  color: var(--text);
  border:1px solid rgba(255,255,255,.12);
}
.btn.danger{
  background: rgba(255,59,106,.92);
  color:#fff;
}
.actions{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.msg{
  font-size:14px;
  color:var(--muted);
  line-height:1.35;
}
.msg.ok{ color: var(--ok); font-weight:900; }
.msg.err{ color: var(--danger); font-weight:900; }

@media (max-width:520px){
  .wrap{ padding: 12px 10px 18px; }
  .kv{ grid-template-columns: 90px 1fr; }
  .actions{ grid-template-columns: 1fr; }
  .fc .fc-toolbar-title{ font-size: 16px; }
  .fc .fc-button{ padding: 7px 9px !important; border-radius: 12px !important; }
  #calendar{ padding: 8px; }

  /* more modal height on phone */
  .modal{ max-height: 86vh; }
}
