body {
  margin: 0;
  padding: 0;
  background: #09090b;
  color: #e4e4e7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  font-size: 26px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, 
        rgba(255, 204, 0, 0.15) 0%, 
        rgba(99, 102, 241, 0.1) 50%,
        rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(255, 204, 0, 0.4);
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 600;
  color: white;
  font-family: "Montserrat-Bold", Helvetica, sans-serif;
  font-size: 14px;
  user-select: none;
}

.balance-icon {
  width: 20px;
  height: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #fff;
  color: #09090b;
}

.btn-primary:hover {
  background: #e4e4e7;
}

.btn-outline {
  background: transparent;
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Tasks Button */
.btn-tasks {
  background: linear-gradient(135deg, 
        rgba(236, 72, 153, 0.2) 0%, 
        rgba(168, 85, 247, 0.2) 50%,
        rgba(59, 130, 246, 0.2) 100%);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #fff;
  padding: 8px 14px;
  border-radius: 30px;
  gap: 6px;
  position: relative;
}

.btn-tasks:hover {
  background: linear-gradient(135deg, 
        rgba(236, 72, 153, 0.3) 0%, 
        rgba(168, 85, 247, 0.3) 50%,
        rgba(59, 130, 246, 0.3) 100%);
  border-color: rgba(236, 72, 153, 0.6);
}

.btn-tasks i {
  font-size: 14px;
}

.tasks-label {
  font-size: 13px;
  font-weight: 600;
}

.tasks-badge {
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Tasks Modal */
.tasks-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.tasks-modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  position: relative;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #a1a1aa;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

/* Referral Card */
.referral-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, 
        rgba(255, 204, 0, 0.15) 0%, 
        rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.referral-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 12px;
}

.referral-info {
  flex: 1;
}

.referral-big-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.referral-coin-icon {
  width: 20px;
  height: 20px;
}

.referral-info p {
  font-size: 12px;
  color: #a1a1aa;
  margin: 0;
}

.referral-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.referral-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Tasks Header */
.tasks-header {
  margin-bottom: 16px;
}

.tasks-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

/* Tasks Grid */
.tasks-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tasks-loading {
  text-align: center;
  padding: 40px 20px;
  color: #a1a1aa;
  font-size: 14px;
}

/* Quest Card */
.quest-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, 
        rgba(255, 204, 0, 0.15) 0%, 
        rgba(99, 102, 241, 0.1) 50%,
        rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(255, 204, 0, 0.4);
  border-radius: 16px;
  padding: 12px 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.quest-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.quest-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quest-info {
  flex: 1;
  margin-left: 12px;
}

.quest-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
}

.quest-reward {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #fbbf24;
  font-weight: 500;
}

.quest-reward img {
  width: 16px;
  height: 16px;
}

.quest-action {
  margin-left: 12px;
}

.quest-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quest-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.quest-btn.completed {
  background: rgba(255, 255, 255, 0.1);
  color: #71717a;
  cursor: default;
}

.quest-btn.completed:hover {
  transform: none;
  box-shadow: none;
}

/* Main */
.site-main {
  padding-top: 64px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: #a1a1aa;
  line-height: 1.6;
  margin: 0;
}

/* Cards Grid */
.cards-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.card-icon.purple { background: rgba(168, 85, 247, 0.15); }
.card-icon.pink { background: rgba(236, 72, 153, 0.15); }
.card-icon.blue { background: rgba(59, 130, 246, 0.15); }
.card-icon.green { background: rgba(34, 197, 94, 0.15); }
.card-icon.yellow { background: rgba(234, 179, 8, 0.15); }
.card-icon.red { background: rgba(239, 68, 68, 0.15); }

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.card p {
  font-size: 14px;
  color: #a1a1aa;
  line-height: 1.6;
  margin: 0;
}

/* Auth Pages */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 40px 24px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px;
}

.auth-box h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
  text-align: center;
}

.auth-box .subtitle {
  text-align: center;
  color: #a1a1aa;
  margin: 0 0 32px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #a1a1aa;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.form-group input::placeholder {
  color: #52525b;
}

.auth-box .btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #a1a1aa;
}

.auth-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

.success-msg {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

/* Cabinet */
.cabinet-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.cabinet-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.cabinet-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.cabinet-info h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.cabinet-info p {
  color: #a1a1aa;
  margin: 0;
  font-size: 14px;
}

.cabinet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
}

.stat-card .label {
  font-size: 13px;
  color: #a1a1aa;
  margin: 0 0 8px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px;
  text-align: center;
  color: #52525b;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .cards-grid { grid-template-columns: 1fr; }
  .auth-box { padding: 28px; }
  .header-inner { padding: 0 16px; }
}
