:root {
  --bg-1: #070b16;
  --bg-2: #0f1830;
  --accent-1: #7c3aed;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --text: #eef2ff;
  --muted: #cbd5e1;
  --glass: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 58, 237, 0.35), transparent 30%),
    radial-gradient(circle at 80% 25%, rgba(34, 211, 238, 0.28), transparent 28%),
    radial-gradient(circle at 70% 75%, rgba(244, 114, 182, 0.2), transparent 22%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
}

.art-layer, .art-layer::before, .art-layer::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  z-index: -2;
}

.art-layer {
  background: linear-gradient(115deg, transparent 0 44%, rgba(255,255,255,0.035) 44% 46%, transparent 46% 100%),
              linear-gradient(65deg, transparent 0 48%, rgba(255,255,255,0.03) 48% 50%, transparent 50% 100%);
  filter: blur(0.5px);
}

.art-layer::before {
  background: radial-gradient(circle at 25% 60%, rgba(124, 58, 237, 0.16), transparent 18%),
              radial-gradient(circle at 60% 35%, rgba(34, 211, 238, 0.14), transparent 16%),
              radial-gradient(circle at 85% 75%, rgba(244, 114, 182, 0.12), transparent 14%);
  animation: drift 12s ease-in-out infinite alternate;
}

.art-layer::after {
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 90px),
                    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 90px);
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
  opacity: 0.5;
}

@keyframes drift {
  from { transform: translate3d(-20px, 10px, 0) scale(1); }
  to { transform: translate3d(30px, -10px, 0) scale(1.08); }
}

/* Bubbles for index.html */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rise infinite ease-in;
    box-shadow: 0 0 10px rgba(255,255,255,0.05), inset 0 0 10px rgba(255,255,255,0.05);
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) scale(1.5); opacity: 0; }
}

.page-container { display: flex; flex-direction: column; min-height: 100vh; }

.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 40px; background: rgba(15, 24, 48, 0.6);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.nav-brand {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none;
  background: linear-gradient(90deg, #ffffff, #c4b5fd, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.2s ease; font-weight: 500; }
.nav-links a:hover { color: #fff; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff !important; padding: 8px 16px; border-radius: 8px; font-weight: 600;
  border: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; display: inline-block;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4); }

.wrap { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 60px; padding: 40px 24px; width: 100%; }

.card {
  position: relative; width: min(760px, 100%); padding: 40px 28px;
  border: 1px solid var(--border); border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.06));
  backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0,0,0,0.35); text-align: center;
}

.text-page-content { text-align: left; max-width: 800px; width: 100%; }
.text-page-content h2 { margin-top: 32px; }
.text-page-content p { margin-left: 0; max-width: 100%; }

.badge {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}
.feature-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.3s, background 0.3s;
}
.feature-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
}
.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
}
.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}
.feature-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.stat-box {
  text-align: center;
}
.stat-number {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(90deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h1 { margin: 0; font-size: clamp(32px, 6vw, 64px); line-height: 0.95; letter-spacing: -0.04em; }
.home-h1 { font-size: clamp(40px, 8vw, 72px); }
h1 span, h2 span { background: linear-gradient(90deg, #ffffff, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 32px; margin-bottom: 16px; font-weight: 600; }
p { margin: 18px auto 0; max-width: 560px; color: var(--muted); font-size: clamp(16px, 2vw, 18px); line-height: 1.6; }

.grid { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile {
  aspect-ratio: 9/16; min-height: 250px; border-radius: 22px; border: 1px solid rgba(255,255,255,0.12);
  background: radial-gradient(circle at 25% 30%, rgba(255,255,255,0.14), transparent 25%), linear-gradient(135deg, rgba(124,58,237,0.24), rgba(34,211,238,0.18), rgba(244,114,182,0.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); position: relative; overflow: hidden; transition: transform 0.3s ease, border-color 0.3s ease; cursor: pointer;
}
.tile:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.3); }
.tile:nth-child(2) { background: radial-gradient(circle at 75% 25%, rgba(255,255,255,0.12), transparent 20%), linear-gradient(135deg, rgba(34,211,238,0.24), rgba(124,58,237,0.18), rgba(255,255,255,0.06)); }
.tile:nth-child(3) { background: radial-gradient(circle at 40% 70%, rgba(255,255,255,0.12), transparent 22%), linear-gradient(135deg, rgba(244,114,182,0.22), rgba(124,58,237,0.16), rgba(34,211,238,0.18)); }
.tile iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; z-index: 10; pointer-events: auto; }
.tile::after { display: none; }

.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; text-align: left; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label { font-size: 14px; color: var(--muted); font-weight: 500; }
.input-group input { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; border-radius: 12px; color: white; font-size: 16px; font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.input-group input:focus { border-color: var(--accent-1); box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2); }
.auth-form .btn-primary { margin-top: 8px; padding: 14px; font-size: 16px; text-align: center; }
.form-footer { margin-top: 24px; font-size: 14px; color: var(--muted); }
.form-footer a { color: var(--accent-2); text-decoration: none; }
.form-footer a:hover { text-decoration: underline; }
.form-error { display: none; color: #f87171; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.2); padding: 12px; border-radius: 8px; font-size: 14px; margin-top: 10px; text-align: center; }

.site-footer { padding: 32px 40px; background: rgba(7, 11, 22, 0.8); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-top: auto; }
.footer-col h4 { color: #fff; margin-top: 0; margin-bottom: 16px; font-size: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--accent-2); }
.footer-bottom { grid-column: 1 / -1; text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; color: rgba(255,255,255,0.4); display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 720px) {
  .card { padding: 30px 18px; }
  .grid { grid-template-columns: 1fr; }
  .tile { min-height: 110px; }
  .navbar { padding: 16px 20px; flex-wrap: wrap; flex-direction: row; }
  .mobile-menu-btn { display: block; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 16px; align-items: center; padding-top: 16px; }
  .nav-links.active { display: flex; }
  .dropdown:hover .dropdown-menu { position: static; box-shadow: none; display: flex; border: none; background: transparent; }
  .site-footer { padding: 32px 20px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center;}
  .cookie-banner { flex-direction: column; text-align: center; gap: 16px; bottom: 10px; }
}

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { display: flex; align-items: center; }
.arrow { font-size: 10px; margin-left: 6px; transition: transform 0.2s; }
.dropdown:hover .arrow { transform: rotate(180deg); }
.dropdown-menu { 
  position: absolute; top: 100%; left: 0; background: var(--bg-2); 
  border: 1px solid var(--border); border-radius: 12px; padding: 8px 0; 
  display: none; min-width: 200px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 1000; flex-direction: column;
}
.dropdown:hover .dropdown-menu { display: flex; }
.dropdown-menu a { padding: 10px 20px; display: block; color: var(--muted); }
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: #fff; }

.mobile-menu-btn { display: none; }

/* Cookie Banner */
.cookie-banner { 
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); 
  background: rgba(15, 24, 48, 0.85); border: 1px solid var(--border); 
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 16px 24px; border-radius: 16px; display: flex; align-items: center; 
  gap: 24px; z-index: 9999; box-shadow: 0 20px 40px rgba(0,0,0,0.4); max-width: 90%; width: 600px;
  opacity: 0; transform: translate(-50%, 20px); transition: opacity 0.4s, transform 0.4s;
}
.cookie-banner.show { opacity: 1; transform: translate(-50%, 0); }
.cookie-text { font-size: 14px; color: var(--muted); line-height: 1.5; text-align: left; }
.cookie-text a { color: var(--accent-2); text-decoration: none; }
.cookie-btn { 
  background: #fff; color: var(--bg-1); border: none; padding: 10px 20px; 
  border-radius: 8px; font-weight: 600; cursor: pointer; transition: transform 0.2s, background 0.2s; white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-2px); background: var(--accent-2); color: #fff; }

/* Loading State for Buttons */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
