:root {
  --accent: #32d4ff;
  --accent2: #7d5cff;
  --text: #ffffff;
  --muted: rgba(255,255,255,0.82);
  --card-bg: rgba(20, 20, 34, 0.58);
  --card-border: rgba(255,255,255,0.12);
  --shadow: 0 10px 28px rgba(0,0,0,0.30);
  --danger-bg: rgba(255, 90, 90, 0.16);
  --danger-border: rgba(255, 90, 90, 0.25);
  --success-bg: rgba(32, 217, 151, 0.16);
  --success-border: rgba(32, 217, 151, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, Tahoma, sans-serif;
  color: var(--text);
  background: #020617;
  position: relative;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
  linear-gradient(rgba(0,0,0,0.22), rgba(0,0,0,0.48)),
  url('./assets/bg.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
  transform: translateZ(0);
}

.mobile-frame {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.mobile-app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.auth-card {
  width: 100%;
  min-height: calc(100vh - 28px);
  min-height: calc(100dvh - 28px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.logo-wrap img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.title {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.3;
}

.subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.tab-btn {
  flex: 1;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.form {
  display: none;
}

.form.active {
  display: block;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.input-wrap {
  position: relative;
}

.field input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  color: white;
  outline: none;
  font-size: 15px;
  padding: 0 14px 0 68px;
}

.field input::placeholder {
  color: rgba(255,255,255,0.58);
}

.field input:focus {
  border-color: rgba(50, 212, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(50, 212, 255, 0.10);
}

.toggle-pass {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  color: white;
  height: 36px;
  min-width: 56px;
  padding: 0 10px;
  font-size: 12px;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.message {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.8;
  word-break: break-word;
}

.message.error {
  display: block;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.message.success {
  display: block;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.small-note {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  line-height: 1.7;
}

.app-shell {
  display: none;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 14px;
}

.app-shell.active {
  display: block;
}

.top-bar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.user-box img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 6px;
  flex-shrink: 0;
}

.user-box h3 {
  font-size: 18px;
  margin-bottom: 4px;
  line-height: 1.4;
  word-break: break-word;
}

.user-box p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.logout-btn {
  border: 0;
  background: linear-gradient(135deg, #ff6b6b, #ff3b8d);
  color: white;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.dashboard {
  display: grid;
  gap: 12px;
}

.box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.box h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.4;
}

.box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 767px) {
  .mobile-frame {
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .bg-layer {
    background-size: cover;
    background-position: center top;
  }

  .mobile-app,
  .app-shell {
    padding: 10px;
  }

  .auth-card {
    min-height: calc(100vh - 20px);
    min-height: calc(100dvh - 20px);
    border-radius: 22px;
    padding: 20px 14px;
  }

  .title {
    font-size: 24px;
  }

  .subtitle,
  .small-note,
  .box p,
  .user-box p {
    font-size: 13px;
  }

  .tabs,
  .top-bar {
    padding: 10px 12px;
    gap: 8px;
  }

  .tab-btn,
  .submit-btn,
  .logout-btn,
  button {
    font-size: 14px;
  }

  .tab-btn {
    height: 44px;
  }

  .field input {
    height: 48px;
    font-size: 14px;
  }

  .submit-btn {
    height: 50px;
  }

  .logo-wrap img {
    width: 74px;
    height: 74px;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .logout-btn {
    width: 100%;
  }

  .box h3,
  .user-box h3 {
    font-size: 17px;
  }
}

@media (min-width: 768px) {
  .mobile-frame {
    max-width: 430px;
    margin: 0 auto;
  }
}

@media (max-width: 380px) {
  .mobile-app,
  .app-shell {
    padding: 8px;
  }

  .auth-card {
    min-height: calc(100vh - 16px);
    min-height: calc(100dvh - 16px);
    padding: 18px 12px;
    border-radius: 20px;
  }

  .title {
    font-size: 22px;
  }

  .logo-wrap img {
    width: 66px;
    height: 66px;
  }

  .field input,
  .submit-btn {
    height: 46px;
  }

  .tab-btn {
    height: 42px;
    font-size: 13px;
  }
}
.warning-box {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 196, 0, 0.18), rgba(255, 170, 0, 0.10));
  border: 1px solid rgba(255, 196, 0, 0.35);
  text-align: center;
  line-height: 1.9;
  box-shadow: 0 8px 20px rgba(255, 196, 0, 0.10);
}

.warning-title {
  color: #ffd54a;
  font-weight: 900;
  font-size: 16px;
  margin-left: 6px;
}

.warning-text {
  color: #fff7db;
  font-size: 14px;
  font-weight: 700;
}
.gift-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.gift-modal.show {
  display: flex;
}

.gift-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(135deg, rgba(125, 92, 255, 0.92), rgba(50, 212, 255, 0.92));
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0,0,0,0.30);
  color: #fff;
}

.gift-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.gift-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.gift-card p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255,255,255,0.95);
}

.gift-claim-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  margin-top: 16px;
  background: #fff;
  color: #4c33d4;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.daily-countdown {
  color: #ffe9a8;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 4px;
}

.gift-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.gift-modal.show {
  display: flex;
}

.gift-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(135deg, rgba(125, 92, 255, 0.96), rgba(50, 212, 255, 0.96));
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0,0,0,0.30);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.gift-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

.gift-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.gift-card p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255,255,255,0.96);
}

.gift-plus-animation {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 900;
  color: #fff7a8;
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  transition: all 0.45s ease;
}

.gift-plus-animation.show {
  opacity: 1;
  transform: translateY(0) scale(1.08);
}

.gift-claim-btn,
.gift-close-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.gift-claim-btn {
  background: #fff;
  color: #4c33d4;
}

.gift-close-btn {
  display: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.24);
}
.gift-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.gift-modal.show {
  display: flex;
}

.gift-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(135deg, rgba(125, 92, 255, 0.96), rgba(50, 212, 255, 0.96));
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0,0,0,0.30);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.gift-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

.gift-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.gift-card p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255,255,255,0.96);
}

.gift-plus-burst {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, 20px) scale(0.7);
  font-size: 38px;
  font-weight: 900;
  color: #fff6a8;
  text-shadow: 0 8px 22px rgba(255, 225, 0, 0.35);
  opacity: 0;
  pointer-events: none;
}

.gift-plus-burst.show {
  animation: giftBurstUp 1s ease forwards;
}

@keyframes giftBurstUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 30px) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.15);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -34px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60px) scale(0.95);
  }
}

.gift-claim-btn,
.gift-close-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.gift-claim-btn {
  background: #fff;
  color: #4c33d4;
}

.gift-close-btn {
  display: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.24);
}