/* ============================================================
   PYMAPP - Global Design System
   Dark Purple / Galactic Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-deep: #050210;
  --bg-dark: #0a0420;
  --bg-card: rgba(20, 10, 45, 0.6);
  --accent-purple: #9b51e0;
  --accent-violet: #5100ff;
  --accent-pink: #ff4081;
  --accent-light: #d8a4ff;
  --text-primary: #ffffff;
  --text-muted: #b3a0cd;
  --text-faint: #7a6899;
  --border: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(155, 81, 224, 0.4);
  --glow-purple: 0 0 40px rgba(155, 81, 224, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 0.3s ease;
  --font: 'Outfit', sans-serif;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  display: block;
  /* prevent flex/grid conflicts in admin */
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Admin layout fallback — works even if admin.css path fails */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  background: rgba(5, 2, 16, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 32px;
  min-width: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-purple);
  border-radius: 3px;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-purple));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(81, 0, 255, 0.4);
}

.btn-gradient {
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  color: #fff;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155, 81, 224, 0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent-purple);
  background: rgba(155, 81, 224, 0.1);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--glow-purple);
  transform: translateY(-4px);
}

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-purple {
  background: rgba(155, 81, 224, 0.2);
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
}

.badge-green {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.badge-pink {
  background: rgba(255, 64, 129, 0.15);
  color: var(--accent-pink);
  border: 1px solid rgba(255, 64, 129, 0.3);
}

/* ---- Inputs ---- */
.input,
.textarea,
.select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(155, 81, 224, 0.15);
}

.textarea {
  resize: vertical;
  min-height: 100px;
}

.select {
  cursor: pointer;
}

.select option {
  background: var(--bg-dark);
}

.label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ---- Form Groups ---- */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Stars Background ---- */
.stars-bg {
  position: relative;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(81, 0, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(155, 81, 224, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 64, 129, 0.06) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Ccircle cx='50' cy='80' r='1' fill='white' opacity='0.4'/%3E%3Ccircle cx='150' cy='200' r='0.8' fill='white' opacity='0.3'/%3E%3Ccircle cx='300' cy='50' r='1.2' fill='white' opacity='0.5'/%3E%3Ccircle cx='450' cy='150' r='0.6' fill='white' opacity='0.3'/%3E%3Ccircle cx='550' cy='300' r='1' fill='white' opacity='0.4'/%3E%3Ccircle cx='100' cy='400' r='0.8' fill='white' opacity='0.35'/%3E%3Ccircle cx='250' cy='350' r='1.5' fill='white' opacity='0.25'/%3E%3Ccircle cx='500' cy='450' r='0.9' fill='white' opacity='0.4'/%3E%3Ccircle cx='75' cy='550' r='1.1' fill='white' opacity='0.3'/%3E%3Ccircle cx='400' cy='500' r='0.7' fill='white' opacity='0.45'/%3E%3Ccircle cx='200' cy='100' r='0.9' fill='white' opacity='0.35'/%3E%3Ccircle cx='350' cy='250' r='1.3' fill='white' opacity='0.2'/%3E%3C/svg%3E");
  background-size: cover, cover, cover, 600px 600px;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: rgba(155, 81, 224, 0.1);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* ---- Divider ---- */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  border-radius: 2px;
  margin: 16px auto;
}

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(20, 10, 45, 0.95);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  color: var(--text-primary);
  font-size: 0.95rem;
  backdrop-filter: blur(20px);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(37, 211, 102, 0.5);
}

.toast.error {
  border-color: rgba(255, 64, 129, 0.5);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(5, 2, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
  font-weight: 300;
}

.footer-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  color: var(--text-faint);
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text-muted);
}

.social-link:hover {
  border-color: var(--accent-purple);
  color: var(--accent-light);
  background: rgba(155, 81, 224, 0.1);
}

/* ---- Animations ---- */
@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-12px)
  }
}

@keyframes glow {

  0%,
  100% {
    opacity: 0.6
  }

  50% {
    opacity: 1
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center
  }

  100% {
    background-position: 200% center
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1
  }

  100% {
    transform: scale(2);
    opacity: 0
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-fadeInUp {
  animation: fadeInUp 0.7s ease forwards;
}

[data-aos] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Pricing Toggle ---- */
.pricing-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}

.toggle-label {
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}

.toggle-label.active {
  color: var(--text-primary);
}

.toggle-switch {
  width: 52px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border-accent);
  transition: background var(--transition);
}

.toggle-switch.on {
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-purple));
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left var(--transition);
}

.toggle-switch.on::after {
  left: 27px;
}

.annual-badge {
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-mobile {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(5, 2, 16, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
  }

  .nav-mobile.open {
    display: flex;
  }

  .nav-mobile a {
    font-size: 1.1rem;
    color: var(--text-muted);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-actions .btn:first-child {
    display: none;
  }
}