/* ============================================================
   KỸ NĂNG SỐNG — Landing & Auth CSS
   ============================================================ */

/* ─── Landing Screen ────────────────────────────────────── */
.landing-screen { background: var(--bg-main); }

/* Hero */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 16px;
  overflow: hidden;
}
.hero-stars { position: absolute; inset: 0; pointer-events: none; }
.hero-stars .star {
  position: absolute; background: #fff;
  border-radius: 50%; animation: twinkle var(--d, 3s) var(--delay, 0s) infinite;
}
@keyframes twinkle { 0%,100% { opacity: 0.15; } 50% { opacity: 0.85; } }
.hero .app-logo { font-size: 72px; margin-bottom: 12px; filter: drop-shadow(0 0 20px rgba(124,77,255,0.3)); }
.hero h1 {
  font-family: var(--font-head); font-size: clamp(32px, 7vw, 56px);
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px; font-weight: 900;
}
.hero .subtitle {
  font-size: clamp(15px, 3vw, 20px); color: var(--c-text2);
  max-width: 520px; margin-bottom: 28px; line-height: 1.6;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-scroll { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-size: 28px; animation: bounce 2s infinite; cursor: pointer; }
@keyframes bounce { 0%,20%,50%,80%,100%{transform:translateX(-50%) translateY(0)}40%{transform:translateX(-50%) translateY(-10px)}60%{transform:translateX(-50%) translateY(-5px)} }

/* Floating emojis */
.hero-float {
  position: absolute; font-size: 36px;
  animation: hfloat var(--d,6s) var(--delay,0s) infinite ease-in-out;
  pointer-events: none; opacity: 0.4;
}
@keyframes hfloat { 0%,100%{transform:translate(0,0) rotate(0deg);opacity:0.3}50%{transform:translate(15px,-18px) rotate(12deg);opacity:0.6} }

/* Section titles */
.section { padding: 60px 16px; }
.section-title {
  font-family: var(--font-head); font-size: clamp(24px, 5vw, 36px);
  text-align: center; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.section-sub { text-align: center; color: var(--c-text2); font-size: 15px; margin-bottom: 32px; }

/* Group Cards */
.groups-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px; max-width: 1100px; margin: 0 auto;
}
.group-card {
  background: var(--bg-card); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 22px 18px; cursor: pointer;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.group-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-primary)44; }
.group-card-accent { position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.group-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 12px;
}
.group-card h3 { font-size: 16px; margin-bottom: 4px; font-family: var(--font); font-weight: 700; }
.group-card p { font-size: 13px; color: var(--c-muted); margin-bottom: 10px; }
.group-count { font-size: 12px; color: var(--c-accent); display: flex; align-items: center; gap: 6px; }

/* Pricing */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; max-width: 960px; margin: 0 auto; align-items: start;
}
.price-card {
  background: var(--bg-card); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 28px 24px; position: relative;
  transition: all 0.3s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.featured {
  border-color: var(--c-gold); background: linear-gradient(135deg, var(--bg-card), var(--c-gold)08);
  transform: scale(1.03);
}
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--c-gold), var(--c-orange));
  color: #000; font-size: 11px; font-weight: 800;
  padding: 4px 16px; border-radius: 20px;
}
.price-icon { font-size: 40px; text-align: center; margin-bottom: 8px; }
.price-name { font-family: var(--font-head); font-size: 22px; text-align: center; margin-bottom: 2px; }
.price-tagline { font-size: 13px; color: var(--c-muted); text-align: center; margin-bottom: 16px; }
.price-divider { height: 1px; background: var(--c-border); margin-bottom: 16px; }
.price-amount { text-align: center; margin-bottom: 20px; }
.price-currency { font-size: 18px; color: var(--c-muted); vertical-align: super; }
.price-number { font-family: var(--font-head); font-size: 42px; color: var(--c-gold); font-weight: 900; }
.price-period { font-size: 14px; color: var(--c-muted); }
.price-features { list-style: none; margin-bottom: 20px; }
.price-features li { padding: 6px 0; font-size: 14px; color: var(--c-text2); display: flex; align-items: center; gap: 8px; }
.price-features i { color: var(--c-green); font-size: 14px; }

/* Footer */
.footer {
  text-align: center; padding: 30px 16px;
  color: var(--c-muted); font-size: 13px;
  border-top: 1px solid var(--c-border);
}

/* ─── Auth Modal ────────────────────────────────────────── */
.auth-modal {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: var(--bg-modal); backdrop-filter: blur(8px);
  align-items: flex-start; justify-content: center; padding: 16px;
  overflow-y: auto;
}
.auth-modal.active { display: flex; }
.auth-box {
  background: var(--bg-card); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 32px 28px; width: 100%;
  max-width: 400px; position: relative; animation: scaleIn 0.3s ease;
  margin: auto;
}
@keyframes scaleIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.auth-close {
  position: absolute; top: 12px; right: 14px;
  font-size: 22px; cursor: pointer; color: var(--c-muted);
  padding: 4px;
}
.auth-art {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary)22, var(--c-accent)22);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 16px;
}
.auth-title { font-family: var(--font-head); font-size: 24px; text-align: center; margin-bottom: 4px; }
.auth-sub { font-size: 14px; color: var(--c-muted); text-align: center; margin-bottom: 20px; }
.input-group { margin-bottom: 14px; }
.input-group label { display: block; font-size: 13px; color: var(--c-text2); margin-bottom: 6px; font-weight: 600; }
.input-group input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-input); border: 1.5px solid var(--c-border);
  color: var(--c-text); font-size: 15px; transition: border-color 0.2s;
}
.input-group input:focus { border-color: var(--c-primary); outline: none; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--c-muted); }
.auth-switch span { color: var(--c-accent); cursor: pointer; font-weight: 700; }

/* ─── Premium Trial Button ─── */
.btn-trial {
  background: linear-gradient(135deg, #7c4dff, #651fff);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px 32px;
  border-radius: 16px;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(124, 77, 255, 0.4);
  position: relative;
  overflow: hidden;
  animation: glowPulse 2.5s infinite ease-in-out;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex; align-items: center; gap: 10px;
}
.btn-trial::after {
  content: '';
  position: absolute; top: -50%; left: -100%; width: 50%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: rotate(35deg);
  animation: shine 4s infinite;
}
.btn-trial:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 30px rgba(124, 77, 255, 0.6);
  background: linear-gradient(135deg, #8c61ff, #7c4dff);
}

/* ─── Profile Modal Overrides ─── */
#profile-modal .auth-box {
  background: rgba(17, 20, 39, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(124, 77, 255, 0.2);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  max-width: 440px;
}
#profile-modal .p-tab {
  padding: 10px 16px; border-radius: 12px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--c-muted);
  transition: all 0.2s; position: relative;
  white-space: nowrap;
}
#profile-modal .p-tab.active {
  color: var(--c-primary); background: rgba(124, 77, 255, 0.1);
}
#profile-modal .p-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 15%; right: 15%; height: 3px;
  background: var(--c-primary); border-radius: 3px 3px 0 0;
}
#profile-modal .avatar-option {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  cursor: pointer; transition: all 0.2s; background: var(--bg-card2);
  user-select: none;
}
#profile-modal .avatar-option:hover { transform: scale(1.1); border-color: var(--c-primary-light); }
#profile-modal .avatar-option.active { 
  border-color: var(--c-primary); 
  background: rgba(124, 77, 255, 0.1); 
  transform: scale(1.1); 
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.3); 
}

#profile-modal [id^="p-sect-"] {
  animation: tabSwitch 0.3s ease-out;
}

#profile-modal .profile-tabs {
  display: flex !important; gap: 8px; overflow-x: auto; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
#profile-modal .profile-tabs::-webkit-scrollbar { display: none; }

/* ─── Premium USP Split ─── */
.usp-section {
  padding: 48px 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(64, 196, 255, 0.05));
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.usp-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px; max-width: 1100px; margin: 0 auto;
}
.usp-card {
  text-align: center; padding: 24px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--c-border);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.usp-card:hover {
  transform: translateY(-8px);
  border-color: var(--c-primary-light);
  box-shadow: 0 12px 32px rgba(124, 77, 255, 0.15);
}
.usp-icon {
  font-size: 42px; margin-bottom: 16px; display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.usp-card:hover .usp-icon { transform: scale(1.2) rotate(8deg); }
.usp-card h3 { font-size: 19px; margin-bottom: 8px; color: var(--c-text); font-family: var(--font-head); }
.usp-card p { font-size: 14px; color: var(--c-muted); line-height: 1.5; }

/* ─── Form Elements Styling ─── */
select {
  width: 100%;
  background-color: var(--bg-input);
  color: var(--c-text);
  border: 1.5px solid var(--c-border);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  transition: border-color 0.2s;
}
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
select:focus {
  border-color: var(--c-primary);
}
