/* ╔══════════════════════════════════════════════════╗
   ║  Makhluot Contests — "Golden Gift Box" Theme    ║
   ║  Brand new design from scratch — 2026            ║
   ╚══════════════════════════════════════════════════╝ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@500;700;800;900&family=Orbitron:wght@700;800;900&display=swap');

/* ── Design Tokens ── */
:root {
  --bg:          #FFFDF7;
  --bg-card:     #FFFFFF;
  --bg-input:    #FFF9EE;

  --gold-100:    #FFF7E0;
  --gold-200:    #FFECB3;
  --gold-300:    #FFD54F;
  --gold-400:    #FFCA28;
  --gold:        #F59E0B;
  --gold-dark:   #B45309;

  --purple-100:  #EDE9FE;
  --purple-200:  #DDD6FE;
  --purple:      #7C3AED;
  --purple-deep: #4C1D95;

  --success:     #10B981;
  --danger:      #EF4444;

  --text:        #1E1B4B;
  --text-body:   #374151;
  --text-muted:  #9CA3AF;
  --text-light:  #D1D5DB;

  --line:        rgba(0,0,0,0.06);
  --line-gold:   rgba(245,158,11,0.2);

  --shadow-sm:   0 2px 8px rgba(30,27,75,0.04);
  --shadow-md:   0 8px 24px rgba(30,27,75,0.06);
  --shadow-lg:   0 20px 40px rgba(30,27,75,0.08);
  --shadow-gold: 0 8px 30px rgba(245,158,11,0.25);
  --shadow-purple: 0 8px 30px rgba(124,58,237,0.2);

  --radius:      20px;
  --radius-sm:   12px;
  --radius-lg:   28px;
  --radius-full: 9999px;

  --font-head:   'Tajawal', sans-serif;
  --font-body:   'Cairo', sans-serif;
  --font-mono:   'Orbitron', monospace;

  --header-h:    72px;
  --max-w:       1120px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: light !important; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); color: var(--text); line-height: 1.3; }

/* ── Particle Canvas ── */
#mk-particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.6;
}

/* ── Confetti Container ── */
#mk-confetti {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden;
}
.mk-confetti-piece {
  position: absolute; width: 10px; height: 10px; top: -20px;
  animation: confettiFall var(--fall-duration, 3s) var(--fall-delay, 0s) ease-in forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(var(--spin, 720deg)) scale(0.4); opacity: 0; }
}

/* ── Layout ── */
.mk-container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ╔══════════════════╗
   ║     HEADER       ║
   ╚══════════════════╝ */
.mk-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,253,247,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  transition: box-shadow var(--transition);
}
.mk-header.scrolled { box-shadow: var(--shadow-md); }
.mk-header .mk-container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}

.mk-brand {
  display: flex; align-items: center; gap: 12px;
}
.mk-brand__icon {
  font-size: 28px;
  animation: giftBounce 2s ease-in-out infinite;
}
@keyframes giftBounce {
  0%,100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-5deg); }
  75% { transform: translateY(-2px) rotate(5deg); }
}
.mk-brand__text b {
  display: block; font-family: var(--font-head);
  font-size: 22px; font-weight: 900; color: var(--purple-deep);
}
.mk-brand__text small {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
}

.mk-nav { display: flex; align-items: center; gap: 10px; }
.mk-nav a {
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; color: var(--text-body);
  background: var(--gold-100); border: 1px solid var(--line-gold);
  transition: all var(--transition);
}
.mk-nav a:hover {
  background: var(--gold); color: #fff; border-color: var(--gold);
  transform: translateY(-1px); box-shadow: var(--shadow-gold);
}

/* User Avatar Chip in Header */
.mk-user-chip {
  display: inline-flex !important; align-items: center !important; gap: 8px !important;
  padding: 4px 14px 4px 6px !important; border-radius: 50px !important;
  background: var(--gold-100) !important; border: 1px solid var(--line-gold) !important;
  color: var(--gold-dark) !important; font-weight: 800 !important; font-size: 13px !important;
  transition: all var(--transition) !important; text-decoration: none !important;
}
.mk-user-chip:hover {
  background: #fff !important; border-color: var(--gold) !important;
  box-shadow: 0 4px 12px rgba(245,158,11,0.2) !important; transform: translateY(-1px) !important;
}
.mk-user-chip__img {
  width: 28px !important; height: 28px !important; border-radius: 50% !important;
  object-fit: cover !important; border: 2px solid var(--gold) !important;
  background: var(--purple-light) !important; flex-shrink: 0 !important;
}
.mk-user-chip__icon { font-size: 16px !important; line-height: 1 !important; }
.mk-user-chip__name { font-size: 12px !important; font-weight: 800 !important; color: var(--gold-dark) !important; }

/* ╔══════════════════╗
   ║   HERO SECTION   ║
   ╚══════════════════╝ */
.mk-hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); margin-top: 24px; margin-bottom: 28px;
  animation: heroReveal 0.8s ease-out;
}
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mk-hero__cover {
  position: relative; height: 320px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple) 50%, var(--gold) 100%);
}
.mk-hero__cover img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.mk-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.3) 35%,
    rgba(0,0,0,0.08) 100%
  );
}

.mk-hero__body {
  padding: 0 32px 28px; position: relative; z-index: 2; margin-top: -40px;
}
.mk-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: var(--radius-full);
  background: var(--gold-100); color: var(--gold-dark);
  font-size: 13px; font-weight: 800; margin-bottom: 12px;
  border: 1px solid var(--line-gold);
}
.mk-hero__title {
  font-size: 34px; font-weight: 900; line-height: 1.25;
  color: var(--text);
}
.mk-hero__stats {
  display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap;
}
.mk-stat {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.mk-stat__icon { font-size: 18px; }
.mk-stat__val { color: var(--purple); font-weight: 800; }

/* ╔══════════════════╗
   ║    COUNTDOWN     ║
   ╚══════════════════╝ */
.mk-countdown-wrap {
  background: linear-gradient(135deg, var(--purple-deep) 0%, #2d1065 50%, #1e0a4a 100%);
  border-radius: var(--radius-lg); padding: 36px 24px;
  text-align: center; margin-bottom: 28px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-purple);
  border: 1px solid rgba(124,58,237,0.3);
}
.mk-countdown-wrap::before {
  content: ''; position: absolute; inset: -2px;
  background: linear-gradient(45deg, var(--gold), var(--purple), var(--gold), var(--purple));
  background-size: 300% 300%;
  border-radius: inherit; z-index: -1;
  animation: borderGlow 4s ease infinite;
  filter: blur(4px); opacity: 0.5;
}
@keyframes borderGlow {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.mk-countdown-label {
  color: var(--gold-300); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px;
  font-family: var(--font-head);
}
.mk-countdown-label .mk-gift-pulse {
  display: inline-block; animation: giftBounce 1.5s ease-in-out infinite;
}

.mk-flip-clock {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; direction: ltr; flex-wrap: wrap;
}
.mk-flip-unit {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mk-flip-digits {
  display: flex; gap: 4px;
}
.mk-flip-card {
  width: 48px; height: 60px; position: relative;
  border-radius: 12px; overflow: hidden;
  background: rgba(15, 7, 35, 0.7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35), inset 0 1px 1px rgba(255,255,255,0.2), 0 0 15px rgba(245,158,11,0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}
.mk-flip-card__digit {
  font-family: var(--font-mono); font-size: 34px; font-weight: 900;
  background: linear-gradient(180deg, #FFE082 0%, #FFB300 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1; text-shadow: 0 0 10px rgba(255, 179, 0, 0.3);
}
.mk-flip-card.pop {
  animation: cardPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes cardPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); border-color: #FFD54F; box-shadow: 0 0 25px rgba(255,213,79,0.5); }
  100% { transform: scale(1); }
}
.mk-flip-label {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 1px;
  font-family: var(--font-head);
}
.mk-flip-sep {
  font-size: 32px; font-weight: 900; color: var(--gold-300);
  margin: 0 2px; margin-top: -20px;
  animation: colonPulse 1s infinite alternate;
}
@keyframes colonPulse {
  0% { opacity: 0.3; text-shadow: none; }
  100% { opacity: 1; text-shadow: 0 0 10px var(--gold-300); }
}

/* ╔══════════════════╗
   ║   CONTENT GRID   ║
   ╚══════════════════╝ */
.mk-grid {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 24px; align-items: start;
}
.mk-grid__main { min-width: 0; }
.mk-grid__side { min-width: 0; position: sticky; top: calc(var(--header-h) + 20px); }

/* ── Card Base ── */
.mk-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); margin-bottom: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.mk-card:hover { box-shadow: var(--shadow-md); }

.mk-card__header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mk-card__header span:first-child { font-size: 22px; }
.mk-card__header h2 { font-size: 18px; font-weight: 800; flex: 1; }

/* ── Prize Card ── */
.mk-prize-card {
  display: flex; align-items: center; gap: 28px;
  background: linear-gradient(135deg, #FFFDF7 0%, #FFF7E0 100%);
  border: 1px solid var(--line-gold);
  perspective: 800px;
}
.mk-prize-card[data-tilt] {
  transition: transform 0.15s ease-out;
}
.mk-prize-card__img {
  position: relative; width: 130px; height: 130px; flex-shrink: 0;
}
.mk-prize-card__img img {
  width: 100%; height: 100%; object-fit: contain;
  position: relative; z-index: 2;
  animation: prizeFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(245,158,11,0.3));
}
@keyframes prizeFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}
.mk-prize-card__glow {
  position: absolute; inset: 10px;
  background: radial-gradient(circle, var(--gold-300) 0%, transparent 70%);
  filter: blur(20px); opacity: 0.6; z-index: 1;
  animation: glowPulse 2s ease-in-out infinite alternate;
}
@keyframes glowPulse {
  0% { opacity: 0.4; transform: scale(0.9); }
  100% { opacity: 0.7; transform: scale(1.1); }
}
.mk-prize-card__info h3 {
  font-size: 14px; color: var(--text-muted); font-weight: 700; margin-bottom: 4px;
}
.mk-prize-card__name {
  font-size: 26px; font-weight: 900; color: var(--gold-dark);
  font-family: var(--font-head); margin-bottom: 8px;
}
.mk-prize-card__winners {
  display: inline-block; padding: 4px 14px;
  background: var(--gold-100); color: var(--gold-dark);
  border-radius: var(--radius-full); font-size: 13px; font-weight: 700;
  border: 1px solid var(--line-gold);
}

/* ── Rules Card ── */
.mk-rules-card .mk-card__body {
  font-size: 15px; line-height: 1.8;
}
.mk-rules-card .mk-rules-box {
  margin-top: 16px; padding: 16px 20px;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 14px;
}

/* ╔══════════════════╗
   ║   PARTICIPANTS   ║
   ╚══════════════════╝ */
.mk-count-badge {
  background: var(--purple-100); color: var(--purple);
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 800;
}
.mk-participants {
  display: flex; flex-direction: column; gap: 8px;
}
.mk-participant {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line);
  transition: all var(--transition);
  position: relative;
}
.mk-participant:hover {
  background: var(--bg-card); border-color: var(--gold-200);
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}
.mk-participant--winner {
  border-color: var(--gold-300) !important;
  background: var(--gold-100) !important;
}
.mk-participant--winner::before {
  content: '👑'; position: absolute; top: -8px; right: 8px;
  font-size: 16px; animation: crownBob 1.5s ease-in-out infinite;
}
@keyframes crownBob {
  0%,100% { transform: translateY(0) rotate(0); }
  50%     { transform: translateY(-3px) rotate(5deg); }
}
.mk-participant__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; background: var(--text-light); flex-shrink: 0;
}
.mk-participant--winner .mk-participant__avatar {
  border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(245,158,11,0.3);
}
.mk-participant__avatar--fallback {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--purple-100); color: var(--purple);
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.mk-participant__info { min-width: 0; flex: 1; }
.mk-participant__name {
  display: block; font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mk-participant__user {
  display: block; font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mk-participant__comment {
  display: block; font-size: 11px; color: var(--purple-deep);
  font-style: italic; font-weight: 600; margin-top: 3px;
  background: var(--purple-100); padding: 2px 8px; border-radius: 6px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mk-participant__badge {
  font-size: 11px; font-weight: 800; color: var(--gold-dark);
  background: var(--gold-200); padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Delivery Hub */
.mk-delivery-hub { margin-top: 32px; width: 100%; }
.mk-delivery-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  margin-top: 20px !important;
}
@media (max-width: 1024px) {
  .mk-delivery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  .mk-delivery-grid { grid-template-columns: 1fr !important; }
}

.mk-delivery-card {
  background: #FFFDF7;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line-gold);
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.mk-delivery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(245,158,11,0.15);
}
.mk-delivery-card.is-delivered {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
}
.mk-delivery-card.is-pending {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, #FFFDF7 0%, #FFFBEB 100%);
}
.mk-delivery-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.mk-delivery-card__user {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.mk-delivery-card__user b {
  font-size: 15px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.mk-delivery-badge {
  font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: var(--radius-full);
  flex-shrink: 0; letter-spacing: 0.3px;
}
.mk-delivery-badge.is-delivered {
  background: rgba(16, 185, 129, 0.15); color: #047857; border: 1px solid rgba(16, 185, 129, 0.3);
}
.mk-delivery-badge.is-pending {
  background: var(--gold-100); color: var(--gold-dark); border: 1px solid var(--gold-200);
}
.mk-delivery-card__meta {
  font-size: 13px; color: var(--text-body); line-height: 1.7;
}
.mk-delivery-card__comment {
  font-size: 12px; color: var(--purple-deep); background: var(--purple-100);
  padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(124,58,237,0.15);
  font-style: italic; line-height: 1.5; word-break: break-word;
}

/* Media Library Picker Grid */
.mk-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.mk-media-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--line);
  aspect-ratio: 1;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
}
.mk-media-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.mk-media-item:hover {
  border-color: var(--gold);
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(245,158,11,0.2);
}
.mk-media-item__overlay {
  position: absolute; inset: 0; background: rgba(76, 29, 149, 0.75);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
}
.mk-media-item:hover .mk-media-item__overlay {
  opacity: 1;
}
.mk-media-item__overlay span {
  font-size: 11px; font-weight: bold; background: var(--gold);
  padding: 4px 8px; border-radius: 6px; color: var(--gold-dark);
}


.mk-participant-extra { display: none !important; }

.mk-btn-more {
  width: 100%; padding: 12px; margin-top: 12px;
  background: var(--bg); border: 1px dashed var(--text-light);
  border-radius: var(--radius-sm); color: var(--text-muted);
  font-weight: 700; font-size: 13px;
  transition: all var(--transition);
}
.mk-btn-more:hover {
  border-color: var(--purple); color: var(--purple);
  background: var(--purple-100);
}

/* ╔══════════════════╗
   ║    CTA BUTTON    ║
   ╚══════════════════╝ */
.mk-cta-wrap {
  margin-bottom: 20px;
}
.mk-btn-cta {
  position: relative; width: 100%; padding: 18px 24px;
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: #fff; font-family: var(--font-head);
  font-size: 18px; font-weight: 800;
  box-shadow: var(--shadow-gold);
  transition: all var(--transition);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: ctaPulse 2.5s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%,100% { box-shadow: var(--shadow-gold); }
  50%     { box-shadow: 0 8px 40px rgba(245,158,11,0.45); }
}
.mk-btn-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(245,158,11,0.5);
}
.mk-btn-cta:active { transform: translateY(0) scale(0.98); }

.mk-btn-cta__shine {
  position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transform: skewX(-25deg);
  animation: shineSlide 3s infinite;
}
@keyframes shineSlide {
  0%   { left: -120%; }
  50%  { left: 120%; }
  100% { left: 120%; }
}

/* ── Registered State ── */
.mk-registered {
  text-align: center; padding: 20px;
}
.mk-registered__box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(16,185,129,0.08); border: 2px solid var(--success);
  border-radius: 16px; padding: 16px; margin-bottom: 12px;
  color: var(--success); font-weight: 800; font-size: 16px;
}
.mk-btn-cancel {
  width: 100%; padding: 12px;
  background: transparent; border: 2px solid var(--danger);
  color: var(--danger); border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px;
  transition: all var(--transition);
}
.mk-btn-cancel:hover { background: var(--danger); color: #fff; }

.mk-closed-box {
  text-align: center; padding: 16px;
  border: 2px solid var(--text-light); border-radius: 16px;
  color: var(--text-muted); font-weight: 700;
}

/* ╔══════════════════╗
   ║      MODAL       ║
   ╚══════════════════╝ */
.mk-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all 0.35s ease;
}
.mk-modal.active { opacity: 1; visibility: visible; }

.mk-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(30,27,75,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mk-modal__dialog {
  position: relative; width: 100%; max-width: 440px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 36px 32px; margin: 20px;
  box-shadow: 0 25px 60px rgba(30,27,75,0.2);
  transform: translateY(30px) scale(0.92);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mk-modal.active .mk-modal__dialog {
  transform: translateY(0) scale(1);
}

.mk-modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); color: var(--text-muted);
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); border: 1px solid var(--line);
}
.mk-modal__close:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.mk-modal__header {
  text-align: center; margin-bottom: 28px;
}
.mk-modal__gift {
  font-size: 48px; margin-bottom: 12px;
  display: inline-block;
  animation: giftOpen 1s ease-in-out infinite alternate;
}
@keyframes giftOpen {
  0%   { transform: scale(1) rotate(0); }
  100% { transform: scale(1.1) rotate(-5deg); }
}
.mk-modal__header h2 {
  font-size: 22px; font-weight: 900; margin-bottom: 4px;
}
.mk-modal__header p {
  color: var(--text-muted); font-size: 14px;
}

.mk-form-group { margin-bottom: 18px; }
.mk-form-group label {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.mk-input-wrap {
  position: relative; display: flex; align-items: center;
}
.mk-input-wrap__icon {
  position: absolute; right: 14px; font-size: 18px; color: var(--text-muted);
  pointer-events: none;
}
.mk-input {
  width: 100%; padding: 14px 44px 14px 14px;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; background: var(--bg-input);
  transition: border-color var(--transition), background var(--transition);
}
.mk-input:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px var(--gold-100);
}
.mk-form-hint {
  display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted);
}

.mk-btn-submit {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff; font-size: 16px; font-weight: 800;
  border-radius: var(--radius-sm); font-family: var(--font-head);
  transition: all var(--transition);
  box-shadow: var(--shadow-purple);
}
.mk-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124,58,237,0.35);
}

/* Progress */
.mk-progress { margin-top: 16px; text-align: center; }
.mk-progress__bar {
  height: 6px; background: var(--line); border-radius: 3px;
  overflow: hidden; margin-bottom: 8px;
}
.mk-progress__fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--purple));
  border-radius: 3px; transition: width 0.5s ease;
}
.mk-progress__text {
  font-size: 13px; color: var(--text-muted); font-weight: 600;
}

/* ╔══════════════════╗
   ║     FOOTER       ║
   ╚══════════════════╝ */
.mk-footer {
  text-align: center; padding: 32px 20px;
  color: var(--text-muted); font-size: 13px;
  border-top: 1px solid var(--line); margin-top: 60px;
  background: var(--bg-card);
}
.mk-footer a { color: var(--purple); font-weight: 700; }

/* ╔══════════════════╗
   ║  FLASH MESSAGES  ║
   ╚══════════════════╝ */
.mk-flash {
  position: fixed; top: calc(var(--header-h) + 12px);
  left: 50%; transform: translateX(-50%);
  z-index: 5000; padding: 14px 28px;
  border-radius: var(--radius); font-weight: 800;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  animation: flashIn 0.5s ease-out;
  max-width: 90%;
}
.mk-flash--ok {
  background: #065f46; border: 1px solid var(--success); color: #fff;
}
.mk-flash--error {
  background: #991b1b; border: 1px solid var(--danger); color: #fff;
}
@keyframes flashIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ╔══════════════════╗
   ║   ADMIN PANEL    ║
   ╚══════════════════╝ */
.mk-admin-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.mk-admin-title .mk-kicker {
  font-size: 13px; color: var(--purple); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.mk-admin-title h1 { font-size: 28px; }

.mk-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.mk-admin-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.mk-admin-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mk-admin-card .mk-status {
  display: inline-block; padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  margin-bottom: 8px;
}
.mk-status.open  { background: rgba(16,185,129,0.1); color: var(--success); }
.mk-status.draft { background: var(--gold-100); color: var(--gold-dark); }
.mk-status.closed, .mk-status.drawn { background: rgba(239,68,68,0.1); color: var(--danger); }

.mk-admin-card h2 { font-size: 18px; margin-bottom: 6px; }
.mk-admin-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.mk-admin-card__actions {
  display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ── Admin Buttons ── */
.mk-btn {
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  transition: all var(--transition);
}
.mk-btn--primary {
  background: var(--purple); color: #fff;
}
.mk-btn--primary:hover { background: var(--purple-deep); transform: translateY(-1px); }
.mk-btn--ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--text-body);
}
.mk-btn--ghost:hover { border-color: var(--purple); color: var(--purple); }
.mk-btn--gold {
  background: var(--gold); color: #fff;
}
.mk-btn--gold:hover { background: var(--gold-dark); }

/* ── Admin Form ── */
.mk-editor {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.mk-field { margin-bottom: 0; }
.mk-field.full { grid-column: 1 / -1; }
.mk-field label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.mk-field input, .mk-field select, .mk-field textarea {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg);
  transition: border-color var(--transition);
}
.mk-field input:focus, .mk-field select:focus, .mk-field textarea:focus {
  outline: none; border-color: var(--purple);
}
.mk-field textarea { min-height: 80px; resize: vertical; }
.mk-field small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }

.mk-editor-actions {
  grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--line);
}

/* ── Table ── */
.mk-table-wrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius-sm); }
.mk-table-wrap table { width: 100%; border-collapse: collapse; }
.mk-table-wrap th, .mk-table-wrap td {
  padding: 12px 16px; text-align: right; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.mk-table-wrap th {
  background: var(--bg); font-weight: 700; color: var(--text);
}
.mk-table-wrap .winner { color: var(--gold-dark); font-weight: 800; }

/* ── Login ── */
.mk-login-card {
  max-width: 400px; margin: 60px auto;
  background: var(--bg-card); padding: 40px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); text-align: center;
}
.mk-login-card .mk-kicker {
  font-size: 12px; color: var(--purple); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.mk-login-card h1 { font-size: 24px; margin-bottom: 24px; }
.mk-login-card form { text-align: right; }
.mk-error-text { color: var(--danger); font-size: 14px; font-weight: 700; margin-bottom: 16px; }

/* ── Account ── */
.mk-account-head {
  text-align: center; margin-bottom: 30px; padding: 20px 0;
}
.mk-account-head .mk-kicker {
  font-size: 12px; color: var(--purple); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.mk-account-head h1 { font-size: 28px; margin: 8px 0; }

.mk-account-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.mk-account-contest {
  display: flex; gap: 16px;
  background: var(--bg-card); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.mk-account-contest__cover {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: var(--purple-100);
}
.mk-account-contest__cover img { width: 100%; height: 100%; object-fit: cover; }

/* ── Empty State ── */
.mk-empty {
  max-width: 480px; margin: 50px auto; padding: 40px 24px;
  text-align: center; background: var(--bg-card);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.mk-empty__icon { font-size: 52px; margin-bottom: 16px; }
.mk-empty h1, .mk-empty h2 { margin-bottom: 12px; }
.mk-empty p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }
.mk-empty__actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ── Link Box (Admin) ── */
.mk-link-box {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; padding: 12px; background: var(--purple-100);
  border-radius: var(--radius-sm); border: 1px dashed var(--purple);
}
.mk-link-box input {
  flex: 1; background: transparent !important;
  border: none !important; color: var(--purple) !important;
  font-weight: 700; cursor: pointer;
}

/* ── Preview Banner ── */
.mk-preview-banner {
  background: var(--gold-100); color: var(--gold-dark);
  padding: 10px; text-align: center; font-weight: 800;
  font-size: 14px; border-bottom: 1px solid var(--line-gold);
}

/* ╔══════════════════╗
   ║   SCROLL REVEAL  ║
   ╚══════════════════╝ */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
  opacity: 1; transform: translateY(0);
}

/* ╔══════════════════╗
   ║    RESPONSIVE    ║
   ╚══════════════════╝ */
@media (max-width: 900px) {
  .mk-grid { grid-template-columns: 1fr; }
  .mk-grid__side { position: static; }
  .mk-hero__body { padding: 0 20px 24px; }
  .mk-hero__title { font-size: 26px; }
  .mk-hero__cover { height: 200px; }
  .mk-countdown-wrap { padding: 24px 16px; }
  .mk-flip-card { width: 44px; height: 56px; }
  .mk-flip-card__top, .mk-flip-card__bottom { font-size: 28px; }
  .mk-flip-card__top  { line-height: 56px; }
  .mk-flip-card__bottom { line-height: 56px; }
  .mk-flip-sep { font-size: 24px; }
  .mk-editor { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .mk-brand__text b { font-size: 18px; }
  .mk-hero__title { font-size: 22px; }
  .mk-hero__body { margin-top: -40px; padding: 0 16px 20px; }
  .mk-prize-card { flex-direction: column; text-align: center; gap: 16px; }
  .mk-prize-card__img { width: 100px; height: 100px; margin: 0 auto; }
  .mk-flip-card { width: 38px; height: 48px; }
  .mk-flip-card__top, .mk-flip-card__bottom { font-size: 22px; }
  .mk-flip-card__top  { line-height: 48px; }
  .mk-flip-card__bottom { line-height: 48px; }
  .mk-flip-sep { font-size: 20px; margin-top: -14px; }
  .mk-flip-label { font-size: 9px; }
  .mk-card { padding: 20px; }
  .mk-modal__dialog { padding: 28px 20px; }
  .mk-nav a { padding: 6px 12px; font-size: 12px; }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Print ── */
@media print {
  .mk-header, .mk-footer, .mk-modal, #mk-particles, #mk-confetti,
  .mk-btn-cta, .mk-countdown-wrap { display: none !important; }
}
