/* ---------- base ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}
html, body { height: 100% }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, "Helvetica Neue", Arial;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background .5s ease;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}
/* stars overlay */
.stars {
    position: fixed;
    inset: 0;
    background: transparent url('https://assets.codepen.io/1538474/star.svg') repeat;
    animation: sparkle 120s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: .6
}
@keyframes sparkle { from { background-position: 0 0 } to { background-position: 1000px 1000px } }
/* header */
header { position: relative; z-index: 5; padding: 18px 20px }
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
    flex-wrap: wrap
}
/* brand */
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer }
#site-logo {
    width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.06)
}
.brand-text { line-height: 1 }
.site-name {
    font-weight: 800; font-size: 1.6rem;
    background: linear-gradient(90deg, #ff6ec4, #7873f5, #00d2ff);
    -webkit-background-clip: text; color: transparent
}
.site-tag { font-size: .82rem; opacity: .85; margin-top: 2px }
/* Luxury Netflix-Style Search Bar */
.search-container {
  flex: 1;
  max-width: 600px; /* wider for premium feel */
  margin: 10px auto;
  position: relative;
}

#search {
  width: 100%;
  padding: 16px 24px; /* bigger padding */
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  color: #fff;
  outline: none;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.4s ease;
  box-shadow: 
    inset 0 4px 15px rgba(0,0,0,0.4),
    0 8px 30px rgba(0,0,0,0.3);
}

#search::placeholder {
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

#search:focus {
  border-color: transparent;
  box-shadow: 
    0 0 0 3px rgba(120,115,245,0.4),
    0 0 30px rgba(255,110,196,0.3),
    inset 0 4px 15px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.6);
  transform: scale(1.02);
}

/* Premium Autocomplete Dropdown */
.autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  overflow: hidden;
  max-height: 320px;
  display: none;
  margin-top: 12px;
  z-index: 20;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.8),
    0 0 30px rgba(120,115,245,0.2);
  border: 1px solid rgba(120,115,245,0.2);
}

.autocomplete div {
  padding: 16px 24px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.autocomplete div:last-child {
  border-bottom: none;
}

.autocomplete div:hover {
  background: linear-gradient(90deg, rgba(120,115,245,0.3), rgba(255,110,196,0.3));
  padding-left: 32px;
  color: #00ffea;
  text-shadow: 0 0 10px rgba(0,255,234,0.4);
}/* Premium Nav with More Dropdown */
nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 20px;
  position: relative;
}
.nav-main {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-more {
  position: relative;
}
#more-btn {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
#more-btn:hover {
  background: rgba(120,115,245,0.25);
  box-shadow: 0 0 20px rgba(120,115,245,0.5);
  transform: translateY(-2px);
}
.more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  min-width: 220px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 10px;
  overflow: hidden;
  z-index: 100;
  animation: fadeInDown 0.3s ease;
}
.more-dropdown.show {
  display: block;
}
.more-dropdown a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.more-dropdown a:hover {
  background: rgba(120,115,245,0.4);
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
nav a {
    color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px;
    transition: all .2s; font-weight: 600
}
nav a.active, nav a:hover {
    background: rgba(255,255,255,.06);
    box-shadow: 0 8px 30px rgba(120,115,245,.08)
}
/* pages */
.page { display: none; padding: 28px 20px; min-height: calc(100vh - 140px) }
.page.active { display: block; animation: fadeIn .5s both }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
/* cards grid */
.cards-container {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1200px; margin: 0 auto
}
.card {
    height: 420px; border-radius: 18px; overflow: hidden; position: relative;
    background: rgba(255,255,255,.04); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.06); box-shadow: 0 20px 40px rgba(0,0,0,.45);
    cursor: pointer; transition: transform .35s, box-shadow .35s
}
.card:hover { transform: translateY(-10px); box-shadow: 0 40px 80px rgba(120,115,245,.14) }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s }
.card:hover img { transform: scale(1.06) }
.card .content {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,.85))
}
.card h2 { font-size: 1.2rem; margin-bottom: 6px }
/* 3-dots menu – top-right corner of poster image */
.menu-dots {
    position: absolute; top: 12px; right: 12px; font-size: 24px; cursor: pointer;
    color: rgba(255,255,255,0.9); user-select: none; z-index: 5;
    background: rgba(0,0,0,0.5); width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); transition: all .2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.menu-dots:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}
.menu-dropdown {
    display: none; position: absolute; right: 0; top: 48px;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    border-radius: 10px; min-width: 120px; box-shadow: 0 8px 25px rgba(0,0,0,0.6); z-index: 10;
}
.menu-dropdown.show { display: block; }
.menu-item {
    padding: 12px 16px; cursor: pointer; font-size: 0.95rem; transition: background .2s;
}
.menu-item:hover { background: rgba(120,115,245,0.3); }
/* detail card */
.detail-card {
    width: 100%; max-width: 1100px; margin: 20px auto; border-radius: 18px;
    overflow: hidden; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.6)
}
.detail-card img { width: 100%; height: 70vh; object-fit: cover; display: block }
.detail-content {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 28px;
    text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.85))
}
#detail-title { font-size: 2.4rem; margin-bottom: 8px; font-weight: 800 }
/* back button */
#back-btn {
    position: fixed; top: 22px; left: 22px; background: rgba(0,0,0,.6);
    border-radius: 40px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.06);
    z-index: 40; color: #fff; display: none; cursor: pointer; transition: background .2s;
}
#event-detail.active #back-btn { display: block }
#back-btn:hover { background: rgba(0,0,0,.8); }
/* share button */
#share-btn {
    display: inline-flex; align-items: center; gap: .6rem; padding: 10px 18px;
    border-radius: 999px; border: none; background: linear-gradient(90deg, #ff00c8, #00ffea);
    color: #fff; cursor: pointer; font-weight: 700; margin-top: 14px;
    box-shadow: 0 12px 40px rgba(0,255,234,.12); transition: all .3s;
}
#share-btn:hover {
    transform: translateY(-2px); box-shadow: 0 15px 40px rgba(0,255,234,.4);
}
/* countdown flip rings */
.flip-container {
    display: flex; gap: 30px; margin-top: 35px; justify-content: center;
}
.flip-unit { text-align: center; position: relative; }
.flip-box {
    width: 120px; height: 120px; border-radius: 50%; display: flex;
    justify-content: center; align-items: center; position: relative; z-index: 2;
    background: rgba(255,255,255,.05); backdrop-filter: blur(5px);
    box-shadow: 0 0 10px rgba(0,0,0,.4); transition: all .5s ease-in-out; overflow: hidden;
}
.time-value {
    font-size: 2.5rem; font-weight: 800; color: #fff; position: absolute; z-index: 5;
}
.flip-label {
    margin-top: 10px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
    color: #00ffea; font-weight: 700; text-shadow: 0 0 8px rgba(0,255,234,.5);
}
.countdown-ring {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    transform: rotate(-90deg); overflow: visible;
}
.ring-track { fill: none; stroke: rgba(0,0,0,0.4); stroke-width: 10; }
.ring-progress {
    fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear;
}
.ring-progress#ring-ss { stroke: #00ffea; filter: drop-shadow(0 0 8px rgba(0,255,234,.7)); }
.ring-progress#ring-mm { stroke: #ff6ec4; filter: drop-shadow(0 0 8px rgba(255,110,196,.7)); }
.ring-progress#ring-hh { stroke: #7873f5; filter: drop-shadow(0 0 8px rgba(120,115,245,.7)); }
.ring-progress#ring-dd { stroke: #00d2ff; filter: drop-shadow(0 0 8px rgba(0,210,255,.7)); }
.flip-box.flip .time-value { animation: flipAnim .3s ease-out; }
@keyframes flipAnim {
    0% { transform: rotateX(0deg) scale(1); }
    40% { transform: rotateX(-60deg) scale(.95); }
    100% { transform: rotateX(0deg) scale(1); }
}
/* add event form */
.add-event-form {
    max-width: 550px; margin: 40px auto; padding: 35px;
    background: rgba(255,255,255,.03); backdrop-filter: blur(12px);
    border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 15px 50px rgba(0,0,0,.6); position: relative;
}
.add-event-form h1 {
    text-align: center; margin-bottom: 30px; font-size: 2.2rem; font-weight: 800;
    text-shadow: 0 0 15px rgba(120,115,245,.4);
}
.add-event-form label {
    display: block; margin-top: 18px; margin-bottom: 7px; font-weight: 700;
    font-size: 1.05rem; opacity: .95; color: #00ffea; letter-spacing: .5px;
}
.add-event-form input[type="text"],
.add-event-form input[type="datetime-local"],
.add-event-form input[type="url"],
.add-event-form select {
    width: 100%; padding: 14px 18px; margin-bottom: 15px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.4);
    color: #fff; font-size: 1rem; outline: none; transition: all .3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,.4);
}
.add-event-form input:focus,
.add-event-form select:focus {
    border-color: #ff6ec4; box-shadow: 0 0 0 1px #ff6ec4, 0 0 15px rgba(255,110,196,.6);
    background: rgba(0,0,0,.55);
}
.add-event-form input::placeholder { color: rgba(255,255,255,.5); }
.add-event-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%01-3.3%2018l-123.4%20123.4c-4.3%204.3-9.5%206.5-15%206.5s-10.7-2.2-15-6.5L8.7%2087.4c-5.5-5.5-8.3-12-8.3-18%200-6.4%202.8-12.8%208.3-18.3%2011-11%2029-11%2040%200l110%20110%20110-110c11-11%2029-11%2040%200%205.5%205.5%208.3%2011.9%208.3%2018.3z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 12px auto;
}
.add-event-form button[type="submit"] {
    width: 100%; margin-top: 30px; padding: 16px; border: none; border-radius: 999px;
    background: linear-gradient(90deg, #ff00c8, #00ffea); color: #fff;
    font-weight: 800; font-size: 1.2rem; cursor: pointer; transition: all .3s;
    box-shadow: 0 10px 30px rgba(0,255,234,.2);
}
.add-event-form button[type="submit"]:hover {
    opacity: .9; transform: translateY(-2px); box-shadow: 0 15px 40px rgba(0,255,234,.4);
}
#back-btn-add {
    position: absolute; top: 25px; left: 25px; background: rgba(0,0,0,.4);
    border-radius: 40px; padding: 10px 18px; border: 1px solid rgba(255,255,255,.1);
    z-index: 40; color:#fff; cursor: pointer; font-weight: 600; transition: background .2s;
}
#back-btn-add:hover { background: rgba(0,0,0,.6); }
/* FAB */
#add-event-fab {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    z-index: 100; cursor: pointer; font-size: 1.8rem; color: #fff; border: none;
    background: linear-gradient(135deg, #7873f5, #ff6ec4);
    box-shadow: 0 8px 30px rgba(120,115,245,.4), 0 0 20px rgba(255,110,196,.6);
    transition: all .3s ease-in-out;
}
#add-event-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(120,115,245,.6), 0 0 30px rgba(255,110,196,.8);
}
/* Edit & Delete Modals */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    align-items: center; justify-content: center; z-index: 1000;
}
.modal.show { display: flex; }
.modal-content {
    width: 90%; max-width: 550px; padding: 35px; background: rgba(255,255,255,.03);
    backdrop-filter: blur(12px); border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 15px 50px rgba(0,0,0,.6); position: relative; text-align: center;
}
.close-modal {
    position: absolute; top: 15px; right: 25px; font-size: 28px; cursor: pointer;
    color: #aaa; transition: color .2s;
}
.close-modal:hover { color: #fff; }
#edit-form label, #edit-form input, #edit-form select {
    display: block; width: 100%; margin: 10px 0;
}
#edit-form input, #edit-form select {
    padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15);
    background: rgba(0,0,0,.4); color: #fff;
}
#edit-form button {
    width: 100%; margin-top: 20px; padding: 16px; border: none; border-radius: 999px;
    background: linear-gradient(90deg, #ff00c8, #00ffea); color: #fff;
    font-weight: 800; cursor: pointer;
}
.image-tip {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 8px 0 15px;
  color: #00ffea;
  font-style: italic;
  line-height: 1.4;
}
#cancel-delete-btn, #confirm-delete-btn {
  padding:12px 30px; border:none; border-radius:999px; color:white; cursor:pointer; font-weight:600;
}
#cancel-delete-btn:hover { background: rgba(255,255,255,0.2); }
#confirm-delete-btn:hover { background: #ff6666; }
/* responsive */
@media (max-width: 900px) {
    .header-inner { flex-direction: column; gap: 16px; }
    nav { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 10px; scrollbar-width: none; }
    nav::-webkit-scrollbar { display: none; }
    .nav-main { justify-content: flex-start; }
    .detail-card img { height: 55vh }
    #detail-title { font-size: 1.6rem }
    .card { height: 360px }
    .flip-container { gap: 15px; }
    .flip-box { width: 80px; height: 80px; }
    .time-value { font-size: 1.8rem; }
    .flip-label { font-size: 12px; }
}/* ---------- base ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}
html, body { height: 100% }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, "Helvetica Neue", Arial;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background .5s ease;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}
/* stars overlay */
.stars {
    position: fixed;
    inset: 0;
    background: transparent url('https://assets.codepen.io/1538474/star.svg') repeat;
    animation: sparkle 120s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: .6
}
@keyframes sparkle { from { background-position: 0 0 } to { background-position: 1000px 1000px } }
/* header */
header { position: relative; z-index: 5; padding: 18px 20px }
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
    flex-wrap: wrap
}
/* brand */
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer }
#site-logo {
    width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.06)
}
.brand-text { line-height: 1 }
.site-name {
    font-weight: 800; font-size: 1.6rem;
    background: linear-gradient(90deg, #ff6ec4, #7873f5, #00d2ff);
    -webkit-background-clip: text; color: transparent
}
.site-tag { font-size: .82rem; opacity: .85; margin-top: 2px }
/* search */
.search-container { flex: 1; max-width: 520px; margin: 10px auto; position: relative }
#search {
    width: 100%; padding: 12px 16px; border-radius: 999px; border: none;
    background: rgba(255,255,255,.06); color: #fff; outline: none;
    font-size: .95rem; box-shadow: 0 6px 20px rgba(0,0,0,.5); transition: all .3s;
}
#search:focus {
    border-color: #7873f5;
    box-shadow: 0 0 0 3px rgba(120,115,245,0.2);
}
.autocomplete {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(0,0,0,.85); border-radius: 12px; overflow: hidden;
    max-height: 260px; display: none; padding: 6px; z-index: 20;
    box-shadow: 0 10px 30px rgba(0,0,0,.8);
}
.autocomplete div {
    padding: 10px 12px; cursor: pointer; border-radius: 8px; transition: background .2s;
}
.autocomplete div:hover { background: rgba(120,115,245,0.15); }
/* Premium Nav with More Dropdown */
nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 20px;
  position: relative;
}
.nav-main {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-more {
  position: relative;
}
#more-btn {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
#more-btn:hover {
  background: rgba(120,115,245,0.25);
  box-shadow: 0 0 20px rgba(120,115,245,0.5);
  transform: translateY(-2px);
}
.more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  min-width: 220px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 10px;
  overflow: hidden;
  z-index: 100;
  animation: fadeInDown 0.3s ease;
}
.more-dropdown.show {
  display: block;
}
.more-dropdown a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.more-dropdown a:hover {
  background: rgba(120,115,245,0.4);
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
nav a {
    color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px;
    transition: all .2s; font-weight: 600
}
nav a.active, nav a:hover {
    background: rgba(255,255,255,.06);
    box-shadow: 0 8px 30px rgba(120,115,245,.08)
}
/* pages */
.page { display: none; padding: 28px 20px; min-height: calc(100vh - 140px) }
.page.active { display: block; animation: fadeIn .5s both }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
/* cards grid */
.cards-container {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1200px; margin: 0 auto
}
.card {
    height: 420px; border-radius: 18px; overflow: hidden; position: relative;
    background: rgba(255,255,255,.04); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.06); box-shadow: 0 20px 40px rgba(0,0,0,.45);
    cursor: pointer; transition: transform .35s, box-shadow .35s
}
.card:hover { transform: translateY(-10px); box-shadow: 0 40px 80px rgba(120,115,245,.14) }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s }
.card:hover img { transform: scale(1.06) }
.card .content {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,.85))
}
.card h2 { font-size: 1.2rem; margin-bottom: 6px }
/* 3-dots menu – top-right corner of poster image */
.menu-dots {
    position: absolute; top: 12px; right: 12px; font-size: 24px; cursor: pointer;
    color: rgba(255,255,255,0.9); user-select: none; z-index: 5;
    background: rgba(0,0,0,0.5); width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); transition: all .2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.menu-dots:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}
.menu-dropdown {
    display: none; position: absolute; right: 0; top: 48px;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    border-radius: 10px; min-width: 120px; box-shadow: 0 8px 25px rgba(0,0,0,0.6); z-index: 10;
}
.menu-dropdown.show { display: block; }
.menu-item {
    padding: 12px 16px; cursor: pointer; font-size: 0.95rem; transition: background .2s;
}
.menu-item:hover { background: rgba(120,115,245,0.3); }
/* detail card */
.detail-card {
    width: 100%; max-width: 1100px; margin: 20px auto; border-radius: 18px;
    overflow: hidden; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.6)
}
.detail-card img { width: 100%; height: 70vh; object-fit: cover; display: block }
.detail-content {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 28px;
    text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.85))
}
#detail-title { font-size: 2.4rem; margin-bottom: 8px; font-weight: 800 }
/* back button */
#back-btn {
    position: fixed; top: 22px; left: 22px; background: rgba(0,0,0,.6);
    border-radius: 40px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.06);
    z-index: 40; color: #fff; display: none; cursor: pointer; transition: background .2s;
}
#event-detail.active #back-btn { display: block }
#back-btn:hover { background: rgba(0,0,0,.8); }
/* share button */
#share-btn {
    display: inline-flex; align-items: center; gap: .6rem; padding: 10px 18px;
    border-radius: 999px; border: none; background: linear-gradient(90deg, #ff00c8, #00ffea);
    color: #fff; cursor: pointer; font-weight: 700; margin-top: 14px;
    box-shadow: 0 12px 40px rgba(0,255,234,.12); transition: all .3s;
}
#share-btn:hover {
    transform: translateY(-2px); box-shadow: 0 15px 40px rgba(0,255,234,.4);
}
/* countdown flip rings */
.flip-container {
    display: flex; gap: 30px; margin-top: 35px; justify-content: center;
}
.flip-unit { text-align: center; position: relative; }
.flip-box {
    width: 120px; height: 120px; border-radius: 50%; display: flex;
    justify-content: center; align-items: center; position: relative; z-index: 2;
    background: rgba(255,255,255,.05); backdrop-filter: blur(5px);
    box-shadow: 0 0 10px rgba(0,0,0,.4); transition: all .5s ease-in-out; overflow: hidden;
}
.time-value {
    font-size: 2.5rem; font-weight: 800; color: #fff; position: absolute; z-index: 5;
}
.flip-label {
    margin-top: 10px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
    color: #00ffea; font-weight: 700; text-shadow: 0 0 8px rgba(0,255,234,.5);
}
.countdown-ring {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    transform: rotate(-90deg); overflow: visible;
}
.ring-track { fill: none; stroke: rgba(0,0,0,0.4); stroke-width: 10; }
.ring-progress {
    fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear;
}
.ring-progress#ring-ss { stroke: #00ffea; filter: drop-shadow(0 0 8px rgba(0,255,234,.7)); }
.ring-progress#ring-mm { stroke: #ff6ec4; filter: drop-shadow(0 0 8px rgba(255,110,196,.7)); }
.ring-progress#ring-hh { stroke: #7873f5; filter: drop-shadow(0 0 8px rgba(120,115,245,.7)); }
.ring-progress#ring-dd { stroke: #00d2ff; filter: drop-shadow(0 0 8px rgba(0,210,255,.7)); }
.flip-box.flip .time-value { animation: flipAnim .3s ease-out; }
@keyframes flipAnim {
    0% { transform: rotateX(0deg) scale(1); }
    40% { transform: rotateX(-60deg) scale(.95); }
    100% { transform: rotateX(0deg) scale(1); }
}
/* add event form */
.add-event-form {
    max-width: 550px; margin: 40px auto; padding: 35px;
    background: rgba(255,255,255,.03); backdrop-filter: blur(12px);
    border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 15px 50px rgba(0,0,0,.6); position: relative;
}
.add-event-form h1 {
    text-align: center; margin-bottom: 30px; font-size: 2.2rem; font-weight: 800;
    text-shadow: 0 0 15px rgba(120,115,245,.4);
}
.add-event-form label {
    display: block; margin-top: 18px; margin-bottom: 7px; font-weight: 700;
    font-size: 1.05rem; opacity: .95; color: #00ffea; letter-spacing: .5px;
}
.add-event-form input[type="text"],
.add-event-form input[type="datetime-local"],
.add-event-form input[type="url"],
.add-event-form select {
    width: 100%; padding: 14px 18px; margin-bottom: 15px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.4);
    color: #fff; font-size: 1rem; outline: none; transition: all .3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,.4);
}
.add-event-form input:focus,
.add-event-form select:focus {
    border-color: #ff6ec4; box-shadow: 0 0 0 1px #ff6ec4, 0 0 15px rgba(255,110,196,.6);
    background: rgba(0,0,0,.55);
}
.add-event-form input::placeholder { color: rgba(255,255,255,.5); }
.add-event-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%01-3.3%2018l-123.4%20123.4c-4.3%204.3-9.5%206.5-15%206.5s-10.7-2.2-15-6.5L8.7%2087.4c-5.5-5.5-8.3-12-8.3-18%200-6.4%202.8-12.8%208.3-18.3%2011-11%2029-11%2040%200l110%20110%20110-110c11-11%2029-11%2040%200%205.5%205.5%208.3%2011.9%208.3%2018.3z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 12px auto;
}
.add-event-form button[type="submit"] {
    width: 100%; margin-top: 30px; padding: 16px; border: none; border-radius: 999px;
    background: linear-gradient(90deg, #ff00c8, #00ffea); color: #fff;
    font-weight: 800; font-size: 1.2rem; cursor: pointer; transition: all .3s;
    box-shadow: 0 10px 30px rgba(0,255,234,.2);
}
.add-event-form button[type="submit"]:hover {
    opacity: .9; transform: translateY(-2px); box-shadow: 0 15px 40px rgba(0,255,234,.4);
}
#back-btn-add {
    position: absolute; top: 25px; left: 25px; background: rgba(0,0,0,.4);
    border-radius: 40px; padding: 10px 18px; border: 1px solid rgba(255,255,255,.1);
    z-index: 40; color:#fff; cursor: pointer; font-weight: 600; transition: background .2s;
}
#back-btn-add:hover { background: rgba(0,0,0,.6); }
/* FAB */
#add-event-fab {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    z-index: 100; cursor: pointer; font-size: 1.8rem; color: #fff; border: none;
    background: linear-gradient(135deg, #7873f5, #ff6ec4);
    box-shadow: 0 8px 30px rgba(120,115,245,.4), 0 0 20px rgba(255,110,196,.6);
    transition: all .3s ease-in-out;
}
#add-event-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(120,115,245,.6), 0 0 30px rgba(255,110,196,.8);
}
/* Edit & Delete Modals */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    align-items: center; justify-content: center; z-index: 1000;
}
.modal.show { display: flex; }
.modal-content {
    width: 90%; max-width: 550px; padding: 35px; background: rgba(255,255,255,.03);
    backdrop-filter: blur(12px); border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 15px 50px rgba(0,0,0,.6); position: relative; text-align: center;
}
.close-modal {
    position: absolute; top: 15px; right: 25px; font-size: 28px; cursor: pointer;
    color: #aaa; transition: color .2s;
}
.close-modal:hover { color: #fff; }
#edit-form label, #edit-form input, #edit-form select {
    display: block; width: 100%; margin: 10px 0;
}
#edit-form input, #edit-form select {
    padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15);
    background: rgba(0,0,0,.4); color: #fff;
}
#edit-form button {
    width: 100%; margin-top: 20px; padding: 16px; border: none; border-radius: 999px;
    background: linear-gradient(90deg, #ff00c8, #00ffea); color: #fff;
    font-weight: 800; cursor: pointer;
}
.image-tip {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 8px 0 15px;
  color: #00ffea;
  font-style: italic;
  line-height: 1.4;
}
#cancel-delete-btn, #confirm-delete-btn {
  padding:12px 30px; border:none; border-radius:999px; color:white; cursor:pointer; font-weight:600;
}
#cancel-delete-btn:hover { background: rgba(255,255,255,0.2); }
#confirm-delete-btn:hover { background: #ff6666; }
/* responsive */
@media (max-width: 900px) {
    .header-inner { flex-direction: column; gap: 16px; }
    nav { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 10px; scrollbar-width: none; }
    nav::-webkit-scrollbar { display: none; }
    .nav-main { justify-content: flex-start; }
    .detail-card img { height: 55vh }
    #detail-title { font-size: 1.6rem }
    .card { height: 360px }
    .flip-container { gap: 15px; }
    .flip-box { width: 80px; height: 80px; }
    .time-value { font-size: 1.8rem; }
    .flip-label { font-size: 12px; }
}
#share-btn {
  /* your existing styles */
  transition: all 0.3s ease;
}
#share-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0,255,234,0.4);
}
/* Category Backgrounds – smooth fade */
body {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  transition: background 1s ease-in-out;
}

/* Dark overlay for readability + stars on top */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4); /* subtle dark tint for text readability */
  pointer-events: none;
  z-index: 1;
}
.stars { z-index: 2; } /* stars above overlay */

/* Optional: darker overlay on light backgrounds */
.admin-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(120,115,245,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(120,115,245,0.4);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(120,115,245,0.3);
  z-index: 999;
  animation: fadeIn 0.5s ease;
  transition: all 0.3s;
}

.admin-indicator:hover {
  background: rgba(120,115,245,0.3);
  box-shadow: 0 0 25px rgba(120,115,245,0.5);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
/* Permanent 3-Dots Menu – Visible, Premium & Working on All Cards */
.menu-dots {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 32px;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  user-select: none;
}

.menu-dots:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

/* Dropdown Menu */
.menu-dropdown {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  min-width: 140px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 200;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-dropdown.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Status overlay for HAPPENING NOW / ENDED */
.status-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  background: rgba(15, 12, 41, 0.85);
  padding: 20px 40px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Menu Items */
.menu-item {
  padding: 14px 20px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 8px;
}
.menu-item:hover {
  background: rgba(255,255,255,0.1);
}

/* =====================
   SMOOTH ANIMATIONS
   ===================== */

/* Smooth page transitions */
.page {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.page.active {
    opacity: 1;
    transform: translateY(0);
}

/* Cards fade in animation */
.cards-container .card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeIn 0.5s ease forwards;
}
@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger card animations */
.cards-container .card:nth-child(1) { animation-delay: 0.05s; }
.cards-container .card:nth-child(2) { animation-delay: 0.1s; }
.cards-container .card:nth-child(3) { animation-delay: 0.15s; }
.cards-container .card:nth-child(4) { animation-delay: 0.2s; }
.cards-container .card:nth-child(5) { animation-delay: 0.25s; }
.cards-container .card:nth-child(6) { animation-delay: 0.3s; }
.cards-container .card:nth-child(7) { animation-delay: 0.35s; }
.cards-container .card:nth-child(8) { animation-delay: 0.4s; }

/* Card hover effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Button smooth transitions */
button, .nav a, .brand {
    transition: all 0.3s ease;
}

/* Modal fade in */
.modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    opacity: 1;
}
.modal-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal.show .modal-content {
    transform: scale(1);
}

/* Search bar focus animation */
#search:focus {
    border-color: #7873f5;
    box-shadow: 
        inset 0 4px 15px rgba(0,0,0,0.4),
        0 8px 30px rgba(120,115,245,0.4),
        0 0 0 3px rgba(120,115,245,0.2);
}

/* Nav link hover */
.nav a:hover {
    color: #00d2ff;
    text-shadow: 0 0 10px rgba(0,210,255,0.5);
}

/* FAB button pulse */
#add-event-fab {
    animation: fabPulse 2s ease-in-out infinite;
}
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 5px 20px rgba(120,115,245,0.4); }
    50% { box-shadow: 0 5px 30px rgba(120,115,245,0.7); }
}

/* Countdown ring glow animation */
.ring-progress {
    filter: drop-shadow(0 0 8px currentColor);
    transition: stroke-dashoffset 0.5s ease-out;
}

/* Status overlay animation */
.status-overlay {
    animation: statusFadeIn 0.5s ease;
}
@keyframes statusFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Flip animation for time values */
.time-value {
    transition: transform 0.3s ease;
}

/* Header smooth transition */
header {
    transition: background 0.3s ease;
}

/* Autocomplete smooth show */
.autocomplete {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.autocomplete[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

/* =====================
   ENHANCED COUNTDOWN
   ===================== */

/* Enhanced flip box with glow */
.flip-box {
    width: 120px; height: 120px; border-radius: 50%; display: flex;
    justify-content: center; align-items: center; position: relative; z-index: 2;
    background: rgba(255,255,255,0.05); backdrop-filter: blur(5px);
    box-shadow: 
        0 0 20px rgba(0,0,0,0.4),
        inset 0 0 30px rgba(255,255,255,0.05),
        0 0 40px rgba(120,115,245,0.2);
    transition: all .5s ease-in-out; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.flip-box:hover {
    box-shadow: 
        0 0 30px rgba(0,0,0,0.5),
        inset 0 0 40px rgba(255,255,255,0.08),
        0 0 60px rgba(120,115,245,0.4);
    transform: scale(1.05);
}

/* Enhanced time value with glow */
.time-value {
    font-size: 2.5rem; font-weight: 800; color: #fff; position: absolute; z-index: 5;
    text-shadow: 
        0 0 10px rgba(255,255,255,0.5),
        0 0 20px rgba(120,115,245,0.5),
        0 0 30px rgba(120,115,245,0.3);
}

/* Enhanced ring track */
.ring-track { 
    fill: none; 
    stroke: rgba(255,255,255,0.1); 
    stroke-width: 8; 
}

/* Enhanced ring progress with stronger glow */
.ring-progress {
    fill: none; 
    stroke-width: 8; 
    stroke-linecap: round; 
    transition: stroke-dashoffset 0.5s ease-out;
}
.ring-progress#ring-ss { 
    stroke: #00ffea; 
    filter: drop-shadow(0 0 12px rgba(0,255,234,0.9)) drop-shadow(0 0 24px rgba(0,255,234,0.5));
}
.ring-progress#ring-mm { 
    stroke: #ff6ec4; 
    filter: drop-shadow(0 0 12px rgba(255,110,196,0.9)) drop-shadow(0 0 24px rgba(255,110,196,0.5));
}
.ring-progress#ring-hh { 
    stroke: #7873f5; 
    filter: drop-shadow(0 0 12px rgba(120,115,245,0.9)) drop-shadow(0 0 24px rgba(120,115,245,0.5));
}
.ring-progress#ring-dd { 
    stroke: #00d2ff; 
    filter: drop-shadow(0 0 12px rgba(0,210,255,0.9)) drop-shadow(0 0 24px rgba(0,210,255,0.5));
}

/* Enhanced labels */
.flip-label {
    margin-top: 10px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
    color: #00ffea; font-weight: 700; 
    text-shadow: 0 0 8px rgba(0,255,234,.5), 0 0 16px rgba(0,255,234,.3);
}

/* Countdown container glow */
.flip-container {
    display: flex; gap: 30px; margin-top: 35px; justify-content: center;
    filter: drop-shadow(0 0 20px rgba(120,115,245,0.3));
}
.flip-unit { 
    text-align: center; 
    position: relative; 
}

.menu-item:hover {
  background: rgba(120, 115, 245, 0.4);
}

.menu-item[data-action="delete"]:hover {
  background: rgba(255, 68, 68, 0.4);
}
/* Fix for event detail page z-index */
.page { display: none; padding: 28px 20px; min-height: calc(100vh - 140px); position: relative; z-index: 1; }
.page.active { display: block; animation: fadeIn .5s both; z-index: 10; }
