* { box-sizing: border-box; }
body {
  margin: 0; padding: 20px; min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow-x: hidden;
}
body::before {
  content: ''; position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138,43,226,.4), transparent 70%);
  animation: float 8s ease-in-out infinite;
}
body::after {
  content: ''; position: absolute; bottom: -100px; right: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,117,252,.4), transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }

.container {
  max-width: 680px; width: 100%; position: relative; z-index: 2;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px; padding: 0; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: fadeInUp .6s ease;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.banner {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  padding: 35px 30px 30px; text-align: center; position: relative; overflow: hidden;
}
.banner::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  animation: shine 3s infinite;
}
@keyframes shine { 0% { left: -100%; } 100% { left: 100%; } }
.banner h1 {
  margin: 0; font-size: 38px; font-weight: 800; letter-spacing: 3px;
  color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.4);
  position: relative; z-index: 1;
}
.banner h1 span {
  background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255,215,0,.6));
}
.banner p { margin: 8px 0 0; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; letter-spacing: 1px; position: relative; z-index: 1; }
.banner .crown { font-size: 28px; display: block; margin-bottom: 5px; position: relative; z-index: 1; }

.content { padding: 30px; }
.stage-indicator { text-align: center; font-weight: 600; color: rgba(255,255,255,.8); margin-bottom: 18px; font-size: 13px; letter-spacing: .5px; }
.progress-bar-wrap { height: 8px; background: rgba(255,255,255,.1); border-radius: 10px; margin-bottom: 25px; overflow: hidden; }
.progress-bar { height: 100%; width: 20%; border-radius: 10px; background: linear-gradient(90deg, #6a11cb, #2575fc); transition: width .5s ease; box-shadow: 0 0 15px rgba(37,117,252,.6); }

h4.title { color: #fff; text-align: center; font-weight: 700; font-size: 20px; margin: 0 0 20px; letter-spacing: .5px; }

.instructions { background: rgba(37,117,252,.15); border-left: 4px solid #2575fc; padding: 16px 18px; border-radius: 12px; margin-bottom: 22px; }
.instructions h5 { color: #7db8ff; margin: 0 0 8px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.instructions ul { margin: 0; padding-left: 18px; }
.instructions li { color: rgba(255,255,255,.8); font-size: 13px; margin-bottom: 5px; line-height: 1.5; }

.step-btn {
  width: 100%; padding: 16px 20px; font-size: 16px; font-weight: 600;
  margin-bottom: 14px; border: none; border-radius: 14px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative; color: #fff;
  background: linear-gradient(135deg, #4a4a6a, #2d2d44);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  cursor: pointer; overflow: hidden;
}
.step-btn::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s;
}
.step-btn:hover::before { left: 100%; }
.step-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,.4); }
.step-btn.waiting { background: linear-gradient(135deg, #ff416c, #ff4b2b); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 6px 20px rgba(255,65,108,.5); } 50% { box-shadow: 0 6px 35px rgba(255,65,108,.9); } }
.step-btn.completed { background: linear-gradient(135deg, #11998e, #38ef7d); box-shadow: 0 6px 20px rgba(56,239,125,.4); }

.status {
  text-align: center; margin-top: 18px; font-weight: 500; font-size: 13px;
  color: rgba(255,255,255,.8); padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  min-height: 20px;
}
.tab-warning { display: none; text-align: center; color: #ff6b6b; font-weight: 600; margin-top: 12px; padding: 12px; font-size: 13px; background: rgba(255,65,108,.15); border: 1px solid rgba(255,65,108,.3); border-radius: 12px; }
.tab-info { display: none; text-align: center; color: #4dd0e1; font-weight: 600; margin-top: 12px; padding: 12px; font-size: 13px; background: rgba(77,208,225,.1); border: 1px solid rgba(77,208,225,.3); border-radius: 12px; }
.reopen-info { text-align: center; margin: 10px 0; padding: 12px; font-size: 13px; background: rgba(255,193,7,.15); border: 1px solid rgba(255,193,7,.3); border-radius: 12px; color: #ffd54f; font-weight: 500; }
.reopen-button { background: rgba(255,255,255,.2); border: none; border-radius: 50%; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-left: 8px; vertical-align: middle; transition: transform .3s; }
.reopen-button:hover { transform: rotate(180deg); background: rgba(255,255,255,.3); }

.completion-message { text-align: center; margin: 15px 0; padding: 16px; background: linear-gradient(135deg, rgba(17,153,142,.3), rgba(56,239,125,.3)); border: 1px solid rgba(56,239,125,.4); border-radius: 12px; color: #a7ffb5; font-weight: 600; font-size: 14px; display: none; animation: fadeInUp .4s ease; }

.continue-btn {
  width: 100%; padding: 16px; font-size: 16px; font-weight: 700;
  border-radius: 14px; border: none; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  box-shadow: 0 8px 25px rgba(37,117,252,.5);
  transition: all .3s; text-transform: uppercase; letter-spacing: 1px;
}
.continue-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(37,117,252,.7); }

.stage { display: none; }
.stage.active { display: block; animation: fadeInUp .4s ease; }

.modal-custom { display: none; position: fixed; z-index: 9999; padding-top: 4%; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background: rgba(0,0,0,.7); backdrop-filter: blur(5px); }
.modal-content-custom { background: #fff; margin: auto; padding: 0; border: none; width: 70%; border-radius: 16px; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,.6); animation: fadeInUp .3s ease; }
.modal-header-custom { padding: 14px 22px; background: linear-gradient(135deg, #6a11cb, #2575fc); display: flex; align-items: center; justify-content: space-between; }
.modal-header-custom h2 { font-size: 16px; margin: 0; color: #fff; font-weight: 600; }
.modal-close { color: #fff; font-size: 26px; font-weight: bold; cursor: pointer; display: none; transition: transform .3s; line-height: 1; }
.modal-close:hover { transform: scale(1.2); color: #ffd700; }
.modal-body-custom { padding: 0; background: #f5f5f5; }
.modal-body-custom iframe { display: block; }

@media (max-width: 990px) {
  .modal-custom { padding-top: 0; height: 100vh; }
  .modal-content-custom { width: 100%; height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
  .modal-close { font-size: 24px; }
  .banner h1 { font-size: 30px; }
  .content { padding: 22px; }
}
@media (max-width: 500px) {
  body { padding: 12px; }
  .banner h1 { font-size: 26px; letter-spacing: 2px; }
  .banner { padding: 28px 20px 24px; }
}