/* ===========================================================================
   FINI — Cute Apply WL (Sunny Ocean)
   =========================================================================== */

:root {
  --teal-glow: #2dd4ff;
  --pink-glow: #ff8ad8;
  --gold-glow: #ffd166;
  --text-main: #1d4d6e;
  --text-dim: #5481a3;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
}

* { box-sizing: border-box; }

body, html {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .badge-cute, .btn-text, .t-btn, .p-badge, .btn-play {
  font-family: "Fredoka", sans-serif;
}

/* =========================================================================
   BACKGROUND EFFECTS
   ========================================================================= */
.cute-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('/assets/apply-bg.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.cute-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(217, 242, 255, 0.4) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bubbles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(1) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translateY(-50vh) scale(1.2) translateX(20px); }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) scale(0.8) translateX(-20px); opacity: 0; }
}

/* =========================================================================
   NAVIGATION
   ========================================================================= */
.nav-return {
  position: fixed;
  top: 30px; left: 40px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(29, 77, 110, 0.08);
}
.nav-return:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(29, 77, 110, 0.12);
  color: var(--teal-glow);
}

/* =========================================================================
   LAYOUT
   ========================================================================= */
.apply-main {
  display: flex;
  min-height: 100vh;
  padding: 100px 20px 60px;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* --- Center Box --- */
.apply-box {
  width: 100%;
  max-width: 540px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 36px;
  padding: 48px;
  box-shadow: 
    0 30px 60px rgba(29, 77, 110, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.apply-header {
  text-align: center;
  margin-bottom: 36px;
}
.badge-cute {
  display: inline-block;
  background: linear-gradient(135deg, #ff8ad8, #ffb8e4);
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(255, 138, 216, 0.3);
}
.apply-header h1 {
  font-size: 38px;
  margin: 0 0 12px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.apply-header .subtitle {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

/* --- Tasks --- */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.task-row {
  display: flex;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  transition: all 0.3s;
}
.task-row:hover {
  background: #fff;
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(29, 77, 110, 0.06);
}

.t-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  margin-right: 16px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}
.i-x { background: #000; }
.i-heart { background: linear-gradient(135deg, #ff40b4, #ff8ad8); }
.i-comment { background: linear-gradient(135deg, #9333ea, #c084fc); }
.i-bell { background: linear-gradient(135deg, #f59e0b, #fcd34d); }
.t-icon svg { width: 22px; height: 22px; }

.t-details { flex: 1; }
.t-name { display: block; font-weight: 700; font-size: 15px; color: var(--text-main); margin-bottom: 2px; }
.t-sub { display: block; font-size: 12px; color: var(--text-dim); }

.task-btn {
  background: rgba(45, 212, 255, 0.1);
  border: 1px solid var(--teal-glow);
  color: var(--text-main);
  padding: 8px 20px;
  border-radius: 999px;
  font-family: "Fredoka", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}
.task-btn:hover {
  background: var(--teal-glow);
  color: #fff;
  box-shadow: 0 6px 15px rgba(45, 212, 255, 0.3);
  transform: translateY(-2px);
}
.task-btn.verifying {
  background: transparent;
  color: var(--gold-glow);
  border-color: var(--gold-glow);
  border-style: dashed;
}
.task-btn.done {
  background: #4ade80;
  border-color: #4ade80;
  color: #fff;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
  display: flex; align-items: center; justify-content: center;
}

/* --- Form --- */
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  padding-left: 4px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .prefix {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.input-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  padding: 16px 16px 16px 44px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: 16px;
  outline: none;
  transition: all 0.3s;
}
.input-wrap input::placeholder { color: rgba(84, 129, 163, 0.4); }
.input-wrap input:focus {
  background: #fff;
  border-color: var(--teal-glow);
  box-shadow: 0 0 0 4px rgba(45, 212, 255, 0.15);
}

.apply-msg {
  min-height: 20px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 600;
}
.apply-msg.err { color: #f43f5e; }
.shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

/* --- Submit Button --- */
.submit-btn {
  position: relative;
  width: 100%;
  padding: 18px;
  background: linear-gradient(180deg, var(--teal-glow) 0%, #0abff4 100%);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  outline: none;
  box-shadow: 
    0 10px 20px rgba(45, 212, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.submit-btn .btn-text {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.submit-btn .shine {
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  z-index: 1;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(45, 212, 255, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.submit-btn:hover .shine { animation: shineSweep 1s ease infinite; }
@keyframes shineSweep { 100% { left: 200%; } }

.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.submit-btn.submitting .btn-text { animation: pulseSubmit 1s infinite; }
@keyframes pulseSubmit { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* =========================================================================
   SUCCESS STATE HYBRID
   ========================================================================= */
.success-state {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1.05);
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 36px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(29, 77, 110, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.success-state.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.success-state.hidden { display: none; }

.success-check-hybrid {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border: 3px solid var(--teal-glow);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--teal-glow);
  background: rgba(45, 212, 255, 0.1);
  box-shadow: 0 0 20px rgba(45, 212, 255, 0.2);
}
.success-check-hybrid svg { width: 36px; height: 36px; }

.success-state h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 36px;
  line-height: 1.1;
  color: var(--text-main);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.success-p-hybrid {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 32px;
  line-height: 1.5;
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

.user-details-hybrid {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
  border-radius: 16px;
}
.ud-row-hybrid {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.ud-row-hybrid span { 
  color: var(--text-dim); 
  font-weight: 700; 
  font-family: "VT323", monospace;
  font-size: 18px;
  letter-spacing: 0.05em;
}
.ud-row-hybrid strong { 
  color: var(--text-main); 
  font-weight: 400; 
  font-family: "JetBrains Mono", monospace; 
  font-size: 14px;
}
.ud-line-hybrid {
  height: 1px; width: 100%; background: rgba(255, 255, 255, 0.8);
  margin: 12px 0;
}

.promo-card-hybrid {
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(255, 255, 255, 1);
  padding: 24px;
  border-radius: 20px;
  margin-bottom: 32px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(29, 77, 110, 0.05);
}
.p-badge-hybrid {
  display: inline-block;
  color: var(--text-main);
  font-family: "VT323", monospace;
  font-size: 20px;
  margin-bottom: 16px;
}
.p-row-hybrid {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; margin-bottom: 12px;
  line-height: 1.4;
  gap: 16px;
}
.p-row-hybrid:last-child { margin-bottom: 0; }
.p-row-hybrid span { color: var(--text-dim); flex: 1; font-weight: 500; font-family: "Inter", sans-serif; }
.p-row-hybrid strong { 
  color: var(--text-main); 
  font-weight: 700; 
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.btn-play {
  display: inline-block;
  padding: 16px 32px;
  background: linear-gradient(180deg, var(--gold-glow) 0%, #f59e0b 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3), inset 0 2px 0 rgba(255,255,255,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-play:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 12px 25px rgba(245, 158, 11, 0.4), inset 0 2px 0 rgba(255,255,255,0.5);
}

/* =========================================================================
   CONFETTI
   ========================================================================= */
.confetti-piece {
  position: fixed;
  top: -20px;
  width: 10px; height: 20px;
  z-index: 100;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); }
}

/* =========================================================================
   ANIMATIONS (Scroll Reveal)
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 600px) {
  .apply-main { padding: 80px 16px 40px; }
  .apply-box { padding: 36px 24px; }
  .apply-header h1 { font-size: 32px; }
  .task-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .task-btn { width: 100%; }
  .success-state { padding: 40px 24px; width: calc(100% - 32px); }
}