/*
 * Future Platform — Professional Landing Page Theme
 * Version: 1.0
 * Safe visual layer: does not change PHP, database queries, links, forms, or JavaScript.
 * Load this file AFTER the existing inline <style> block in index.php.
 */

:root {
  --fp-primary: #7067f0;
  --fp-primary-strong: #5548df;
  --fp-secondary: #20c7d9;
  --fp-accent: #ffbf5f;
  --fp-bg: #080d1b;
  --fp-surface: rgba(17, 25, 48, 0.82);
  --fp-surface-strong: #111a31;
  --fp-border: rgba(164, 181, 222, 0.17);
  --fp-text: #f4f7ff;
  --fp-muted: #a7b3cc;
  --fp-radius: 24px;
  --fp-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  color: var(--fp-text);
  background:
    radial-gradient(ellipse at 12% 8%, rgba(86, 72, 223, 0.16), transparent 34%),
    radial-gradient(ellipse at 88% 32%, rgba(32, 199, 217, 0.09), transparent 32%),
    var(--fp-bg);
  font-family: "Cairo", "Inter", system-ui, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #fff;
  background: rgba(112, 103, 240, 0.7);
}

a {
  transition: color .22s ease, background-color .22s ease, border-color .22s ease,
              box-shadow .22s ease, transform .22s ease;
}

.bg-animation {
  background:
    radial-gradient(circle at 18% 18%, rgba(112, 103, 240, .19), transparent 32%),
    radial-gradient(circle at 82% 30%, rgba(32, 199, 217, .11), transparent 30%),
    linear-gradient(135deg, #080d1b 0%, #101633 52%, #080d1b 100%);
  pointer-events: none;
}

.bg-animation span {
  background: radial-gradient(circle, rgba(173, 185, 255, .18), rgba(32, 199, 217, .025));
  box-shadow: 0 0 28px rgba(112, 103, 240, .08);
}

/* Header */
nav {
  padding: 1rem clamp(1rem, 4vw, 4.5rem);
  min-height: 82px;
  background: rgba(8, 13, 27, .82);
  border-bottom: 1px solid rgba(164, 181, 222, .13);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.logo {
  gap: 12px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  letter-spacing: -.035em;
  background-image: linear-gradient(110deg, #fff 8%, #b8c5ff 48%, #55e1e8 100%);
}

.logo i {
  filter: drop-shadow(0 0 12px rgba(32, 199, 217, .32));
}

.nav-links {
  gap: clamp(1rem, 2vw, 2rem);
  margin-bottom: 0;
}

.nav-links a {
  color: #c5cee3;
  font-size: .94rem;
}

.nav-links a::after {
  height: 2px;
  bottom: -8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--fp-primary), var(--fp-secondary));
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
}

.nav-auth-group {
  gap: 14px;
}

.lang-btn {
  border-color: var(--fp-border);
  background: rgba(255, 255, 255, .035);
  border-radius: 12px;
  padding: .55rem .8rem;
  transition: background .2s ease, border-color .2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(32, 199, 217, .45);
}

.lang-menu {
  top: calc(100% + 12px);
  right: 0;
  padding: 7px;
  border: 1px solid #e7eaf3;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
  overflow: hidden;
}

.lang-menu a {
  border-radius: 9px;
  padding: .65rem .85rem;
}

.btn-login {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: .65rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--fp-primary), #5146d8 65%, #3f8de7);
  box-shadow: 0 8px 24px rgba(91, 78, 226, .26);
}

.btn-login:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(91, 78, 226, .36);
}

/* Hero */
.hero {
  min-height: min(820px, 92vh);
  padding: 145px 5% 90px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(720px, 88vw);
  aspect-ratio: 1;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 78, 226, .19), rgba(32, 199, 217, .055) 38%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-content {
  max-width: 920px;
  animation-duration: .8s;
}

.hero-badge {
  padding: .55rem 1.1rem;
  color: #8deaf0;
  background: rgba(32, 199, 217, .08);
  border-color: rgba(32, 199, 217, .25);
  letter-spacing: .01em;
}

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.8rem);
  line-height: 1.24;
  letter-spacing: -.045em;
  margin-bottom: 1.5rem;
  background-image: linear-gradient(130deg, #fff 15%, #d9e0ff 55%, #83e8ef 100%);
  filter: drop-shadow(0 12px 35px rgba(0, 0, 0, .12));
}

.hero p {
  max-width: 700px;
  color: #b2bfd7;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 2;
  margin-bottom: 2.2rem;
}

.cta-button {
  justify-content: center;
  min-height: 54px;
  padding: .9rem 1.7rem;
  gap: 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 15px;
  background: linear-gradient(120deg, #7168f1, #5549dc 65%, #3e9bdc);
  box-shadow: 0 12px 32px rgba(91, 78, 226, .27);
  font-size: 1.03rem;
}

.cta-button:hover,
.cta-button:focus-visible {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(91, 78, 226, .38);
}

/* Shared sections */
.features,
.about-section {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 5rem);
}

.features {
  background: linear-gradient(180deg, rgba(255,255,255,.012), rgba(255,255,255,.035) 50%, rgba(255,255,255,.012));
  border-top: 1px solid rgba(164, 181, 222, .055);
  border-bottom: 1px solid rgba(164, 181, 222, .055);
}

.section-title {
  max-width: 820px;
  margin: 0 auto clamp(2.3rem, 5vw, 4rem);
}

.section-title h2 {
  font-size: clamp(1.8rem, 3.3vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.35;
  color: #f7f8ff;
}

.section-title h2 i {
  filter: drop-shadow(0 4px 14px rgba(255, 191, 95, .18));
}

.section-title p {
  color: var(--fp-muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

.cards-grid {
  width: 100%;
  max-width: 1240px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.card {
  position: relative;
  min-width: 0;
  padding: clamp(1.5rem, 2.5vw, 2.1rem);
  color: var(--fp-text);
  text-align: center;
  background: linear-gradient(145deg, rgba(22, 32, 59, .88), rgba(13, 20, 40, .9));
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
  overflow-wrap: anywhere;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(112, 103, 240, .52);
  background: linear-gradient(145deg, rgba(27, 38, 70, .96), rgba(14, 23, 45, .96));
  box-shadow: 0 22px 45px rgba(0, 0, 0, .22), 0 0 0 1px rgba(112, 103, 240, .05);
}

.card-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 1.4rem;
  border-radius: 19px;
  background: linear-gradient(140deg, var(--fp-primary), #3b9dd9);
  box-shadow: 0 12px 25px rgba(91, 78, 226, .23);
  font-size: 1.65rem;
  transition: transform .28s ease, border-radius .28s ease;
}

.card:hover .card-icon {
  transform: translateY(-2px) rotate(-3deg);
  border-radius: 22px;
}

.card h3 {
  color: #f5f7ff;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: .8rem;
}

.card p {
  color: #aebbd4;
  font-size: .94rem;
  line-height: 1.9;
}

.card .text-muted {
  color: #aebbd4 !important;
}

.card .text-info {
  color: #66dce8 !important;
}

.card.vr-card .card-icon {
  background: linear-gradient(140deg, #e45aa7, #7865f2);
}

.card .badge {
  letter-spacing: .01em;
  padding: .4rem .75rem;
}

.badge-active {
  color: #6de5a3;
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .28);
}

.badge-upcoming {
  color: #c5cee3;
  background: rgba(148, 163, 184, .1);
  border-color: rgba(148, 163, 184, .2);
}

.card .contest-btn {
  min-height: 43px;
  padding: .65rem 1.1rem;
  border-radius: 13px;
  border: 1px solid transparent;
}

.contest-btn.active {
  color: #101528;
  background: linear-gradient(135deg, #ffd17e, #ffad42);
  box-shadow: 0 8px 20px rgba(255, 173, 66, .15);
}

.contest-btn.active:hover {
  color: #101528;
  transform: translateY(-2px);
}

.contest-btn.disabled {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

/* About */
.about-section {
  background:
    radial-gradient(ellipse at 18% 50%, rgba(112, 103, 240, .11), transparent 45%),
    linear-gradient(110deg, rgba(11, 17, 35, .98), rgba(17, 23, 49, .96));
}

.about-container {
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1240px;
}

.about-image img {
  border: 1px solid rgba(164, 181, 222, .22);
  border-radius: 26px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, .3);
}

.about-content h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -.04em;
}

.about-content h2 span {
  background-image: linear-gradient(100deg, #70e2eb, #9c91ff 80%);
}

.about-content p {
  color: #b8c4dc;
  line-height: 2;
}

/* Pricing cards */
#pricing .cards-grid {
  align-items: stretch;
}

#pricing .card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 2.5rem;
}

#pricing .card > .card-icon {
  align-self: center;
}

#pricing .card > h3 {
  margin-top: .4rem;
}

#pricing .card > h2 {
  color: #ffd17e !important;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 900;
}

#pricing .card > p {
  margin-bottom: .9rem;
}

#pricing .card > p[style*="color"] {
  color: #70e2eb !important;
}

#pricing .card > span[style*="position:absolute"] {
  top: 16px !important;
  right: 16px !important;
  padding: .35rem .75rem !important;
  color: #251b0b;
  background: linear-gradient(135deg, #ffd17e, #ffad42) !important;
  font-weight: 800;
}

#pricing .card form {
  margin-top: auto;
  padding-top: 1rem;
}

#pricing .cta-button {
  color: #fff;
  background: linear-gradient(120deg, #18a979, #119cba);
  box-shadow: 0 10px 25px rgba(17, 156, 186, .18);
}

#pricing .cta-button:hover {
  box-shadow: 0 15px 30px rgba(17, 156, 186, .28);
}

/* Footer */
footer {
  padding: 2.5rem 1rem;
  background: rgba(5, 9, 19, .65);
  border-top: 1px solid rgba(164, 181, 222, .12);
  color: #9ba9c4;
}

.visitor-counter {
  padding: .6rem 1rem;
  color: #80e6ed;
  background: rgba(32, 199, 217, .075);
  border: 1px solid rgba(32, 199, 217, .16);
  border-radius: 14px;
}

.visitor-counter i {
  color: #ffd17e;
}

footer p {
  margin-bottom: 0;
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(32, 199, 217, .75);
  outline-offset: 3px;
}

/* Responsive refinements */
@media (max-width: 1000px) {
  nav {
    gap: 1rem;
  }

  .nav-links {
    gap: .9rem;
  }

  .nav-links a {
    font-size: .86rem;
  }

  .btn-login {
    padding-inline: 1rem;
  }
}

@media (max-width: 768px) {
  nav {
    min-height: 72px;
    padding: .8rem 1rem;
  }

  .logo {
    font-size: 1.12rem;
    gap: 8px;
  }

  .logo i {
    font-size: 1.5rem;
  }

  .nav-auth-group {
    gap: 8px;
  }

  .lang-btn {
    padding: .48rem .62rem;
    font-size: .82rem;
  }

  .btn-login {
    min-height: 40px;
    padding: .5rem .8rem;
    font-size: .86rem;
  }

  .hero {
    min-height: 78vh;
    padding: 125px 1.2rem 65px;
  }

  .hero-badge {
    font-size: .8rem;
    padding: .45rem .8rem;
  }

  .hero p {
    margin-bottom: 1.8rem;
  }

  .cta-button {
    width: 100%;
    max-width: 360px;
    min-height: 50px;
    padding: .8rem 1rem;
    font-size: .98rem;
  }

  .features,
  .about-section {
    padding: 4rem 1rem;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .card {
    padding: 1.6rem 1.25rem;
    border-radius: 20px;
  }

  .about-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .about-image,
  .about-content {
    min-width: 0;
    width: 100%;
  }

  .about-image img {
    max-width: min(100%, 520px);
  }

  #pricing .card {
    padding-top: 2.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
