/* styles.css · partea 5/5 */
.social-apple {
  color: white;
  background: #111;
}

.account-setup-note,
.account-notice {
  margin: 13px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #5e6764;
  background: #eeede7;
  font-size: 0.62rem;
  line-height: 1.5;
}

.account-notice {
  color: #7a5221;
  background: #faead0;
}

.account-privacy {
  margin: 18px 0 0;
  color: #969b98;
  font-size: 0.58rem;
  line-height: 1.5;
  text-align: center;
}

.account-card-active {
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

.account-status-dot {
  width: 9px;
  height: 9px;
  margin-right: 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(34, 184, 167, 0.13);
}

.account-profile {
  margin-top: 52px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-avatar {
  width: 66px;
  height: 66px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  color: #071b19;
  background: var(--teal);
  font-family: var(--serif);
  font-size: 2rem;
}

.account-profile h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.account-profile p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.account-ready-list {
  margin-top: 36px;
  padding: 22px 0;
  display: grid;
  gap: 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #59615e;
  font-size: 0.75rem;
}

.account-ready-list i {
  margin-right: 8px;
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 800;
}

.account-signout {
  margin-top: auto;
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: left;
}

.account-explainer {
  width: min(100% - 80px, 1360px);
  margin: 0 auto;
  padding: 100px 0 112px;
}

.account-explainer > div:first-child {
  max-width: 860px;
}

.account-explainer h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.2vw, 4.65rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
}

.account-feature-grid {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.account-feature-grid article {
  min-height: 220px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(17, 21, 61, 0.055);
}

.account-feature-grid article > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-size: 1rem;
}

.account-feature-grid strong {
  margin-top: 36px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
}

.account-feature-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

@keyframes subject-orbit {
  to { transform: rotate(342deg); }
}

@keyframes subject-orbit-alt {
  to { transform: rotate(388deg); }
}

@keyframes orbit-drift {
  to { transform: rotate(338deg); }
}

@keyframes orbit-drift-alt {
  to { transform: rotate(-382deg); }
}

@keyframes star-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.22); }
}

@media (max-width: 1100px) {
  .header-inner,
  .domain-section,
  .home-feature,
  .subject-stats,
  .module-section,
  .subject-cta,
  .problem-explorer-wrap,
  .leaderboard-wrap,
  .account-explainer {
    width: min(100% - 48px, 960px);
  }

  .primary-navigation { gap: 22px; }
  .hero-copy { width: calc(100% - 48px); margin-left: 24px; }
  .home-hero { grid-template-columns: minmax(0, 63%) minmax(0, 37%); }
  .home-feature { grid-template-columns: 0.12fr 1.2fr 0.9fr; }
  .home-feature .text-link { grid-column: 2; }
  .subject-hero { grid-template-columns: minmax(0, 1fr) 360px; gap: 38px; }
  .subject-visual { width: 350px; }
  .lessons-section { grid-template-columns: 0.48fr 1fr; gap: 45px; }
  .problem-tools { grid-template-columns: 1fr 0.45fr; }
  .problem-search { grid-column: 1 / -1; }
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-overview { grid-template-columns: minmax(0, 1fr) 320px; }
  .podium { padding-left: 24px; padding-right: 24px; }
  .ranking-row {
    grid-template-columns: 55px minmax(160px, 1.2fr) minmax(120px, 0.75fr) 0.5fr 0.5fr 0.65fr;
    gap: 12px;
  }
  .scoring-section { grid-template-columns: 0.55fr 1fr; gap: 36px; }
  .account-hero { grid-template-columns: minmax(0, 1fr) 430px; gap: 48px; }
}

@media (max-width: 820px) {
  .site-header { height: 70px; }
  .header-inner { width: calc(100% - 36px); }
  .brand { font-size: 1rem; }
  .brand-mark { width: 36px; height: 36px; transform: scale(0.88); }
  .menu-toggle { display: block; }

  .primary-navigation {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    height: auto;
    padding: 16px 18px 22px;
    display: grid;
    gap: 2px;
    background: rgba(245, 242, 232, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(17, 21, 61, 0.12);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  }

  .primary-navigation.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .primary-navigation a {
    min-height: 48px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(17, 21, 61, 0.08);
  }

  .primary-navigation a::after { display: none; }

  .home-hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .hero-copy {
    width: calc(100% - 40px);
    margin: 0 20px;
    padding: 70px 0 62px;
  }

  .hero-copy h1 { font-size: clamp(3.4rem, 14vw, 5.4rem); }
  .hero-cosmos {
    order: 2;
    min-height: 370px;
    margin: 0;
    clip-path: none;
  }

  .domain-section { width: calc(100% - 40px); padding: 75px 0 85px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .domain-grid { grid-template-columns: 1fr; }
  .domain-card { min-height: 380px; }
  .home-feature {
    width: calc(100% - 40px);
    margin-bottom: 82px;
    padding: 34px 27px;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .home-feature .text-link { grid-column: auto; }
  .feature-number { display: none; }
  .footer-main { grid-template-columns: 1fr; gap: 50px; }

  .subject-hero {
    min-height: auto;
    padding: 58px 20px 95px;
    grid-template-columns: 1fr;
    gap: 70px;
  }
  .subject-breadcrumb { margin-bottom: 35px; }
  .subject-hero h1 { font-size: clamp(3.25rem, 13vw, 5rem); }
  .subject-visual { width: min(100%, 365px); justify-self: center; }
  .subject-visual > p { bottom: -45px; }
  .subject-stats {
    width: calc(100% - 40px);
    grid-template-columns: repeat(2, 1fr);
  }
  .module-section { width: calc(100% - 40px); padding: 78px 0; }
  .lessons-section {
    padding: 80px 20px;
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .lessons-intro { position: static; }
  .lesson-row { grid-template-columns: 38px 1fr; }
  .lesson-check { grid-column: 2; justify-self: start; }
  .subject-cta {
    width: calc(100% - 40px);
    margin: 78px auto;
    padding: 35px 28px;
    flex-direction: column;
    align-items: flex-start;
  }

  .problems-hero {
    padding: 58px 20px 62px;
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .problems-hero h1 { font-size: clamp(3.2rem, 14vw, 5rem); }
  .problem-explorer-wrap { width: calc(100% - 40px); padding: 44px 0 80px; }
  .problem-tools { grid-template-columns: 1fr; }
  .problem-search { grid-column: auto; }
  .problem-grid { grid-template-columns: 1fr; }
  .problem-card { min-height: 285px; }

  .leaderboard-hero {
    min-height: auto;
    padding: 58px 20px 62px;
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .leaderboard-hero h1 { font-size: clamp(3.2rem, 14vw, 5rem); }
  .leaderboard-wrap { width: calc(100% - 40px); padding: 44px 0 80px; }
  .leaderboard-toolbar { align-items: stretch; flex-direction: column; }
  .period-switch { align-self: flex-start; }
  .leaderboard-overview { grid-template-columns: 1fr; }
  .your-score-card { min-height: 330px; }
  .ranking-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .ranking-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .ranking-header,
  .ranking-row > :nth-child(3),
  .ranking-row > :nth-child(4),
  .ranking-row > :nth-child(5) { display: none; }
  .row-points { grid-column: 3; }
  .scoring-section { padding: 34px 28px; grid-template-columns: 1fr; }

  .account-hero {
    min-height: auto;
    padding: 58px 20px 70px;
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .account-intro h1 { font-size: clamp(3.2rem, 14vw, 5rem); }
  .account-card { width: min(100%, 520px); justify-self: center; }
  .account-explainer { width: calc(100% - 40px); padding: 78px 0 85px; }
  .account-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .hero-copy { padding-top: 52px; }
  .hero-copy h1 { font-size: clamp(3.1rem, 15.5vw, 4.25rem); }
  .hero-lede { margin-top: 27px; font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .trust-row { display: grid; }
  .hero-cosmos { min-height: 310px; }
  .hero-annotation { left: 20px; right: auto; flex-direction: column; gap: 5px; }
  .section-heading h2 { font-size: 2.8rem; }
  .domain-card { padding: 21px; }
  .footer-links { gap: 25px; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .subject-actions { flex-direction: column; }
  .subject-stats > div { min-height: 112px; padding: 20px; }
  .subject-stats strong { font-size: 2rem; }
  .module-cloud { display: grid; }
  .module-cloud span { width: 100%; }
  .lesson-row { padding: 20px; }
  .lesson-main p { font-size: 0.78rem; }
  .problem-results-heading { flex-direction: column; gap: 8px; }
  .problem-dialog-backdrop { padding: 0; align-items: end; }
  .problem-dialog {
    width: 100%;
    max-height: 94vh;
    padding: 30px 20px;
    border-radius: 18px 18px 0 0;
  }
  .dialog-close { right: 14px; top: 13px; }
  .problem-formula { font-size: 0.82rem; }
  .dialog-footer { align-items: flex-start; flex-direction: column; }
  .dialog-footer > span { display: none; }
  .final-answer { flex-direction: column; gap: 7px; }
  .leaderboard-hero-note { padding: 22px; }
  .leader-tabs { display: grid; grid-template-columns: repeat(2, 1fr); }
  .leader-tabs button { padding: 0 10px; }
  .period-switch { width: 100%; }
  .period-switch button { flex: 1; padding: 0 8px; }
  .podium { min-height: 325px; padding: 32px 10px 0; gap: 6px; }
  .podium-card { height: 200px; padding: 21px 5px 18px; }
  .podium-card.rank-1 { height: 247px; }
  .podium-card.rank-3 { height: 184px; }
  .podium-card .leader-avatar { width: 44px; height: 44px; margin: 8px 0 13px; }
  .podium-card strong { font-size: 0.72rem; }
  .podium-card small { display: none; }
  .podium-card b { font-size: 0.65rem; }
  .your-score-card { padding: 27px; }
  .your-rank > span { font-size: 3.5rem; }
  .ranking-panel { margin-top: 68px; }
  .ranking-row { min-height: 72px; padding: 0 14px; }
  .row-user { gap: 9px; }
  .row-user .leader-avatar { width: 38px; height: 38px; }
  .row-points { font-size: 0.67rem; }
  .scoring-section { margin-top: 70px; }
  .scoring-grid { grid-template-columns: 1fr; }
  .scoring-grid article { min-height: 105px; }
  .account-benefits { display: grid; }
  .account-benefits li { width: 100%; }
  .account-card { min-height: 540px; padding: 27px 20px; }
  .account-card > h2 { font-size: 2.65rem; }
  .social-auth-button small { display: none; }
  .account-card-active { min-height: 410px; }
  .account-profile { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Elemente specifice versiunii statice HTML */

.local-account-form {
  margin-top: 24px;
  display: grid;
  gap: 9px;
}

.local-account-form label {
  margin-top: 3px;
  color: #525a57;
  font-size: 0.68rem;
  font-weight: 700;
}

.local-account-form label small {
  color: #8a908e;
  font-weight: 500;
}

.local-account-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #faf9f4;
}

.local-account-form input:focus {
  border-color: var(--teal-dark);
  outline: 3px solid rgba(34, 184, 167, 0.16);
}

.local-account-form .button {
  width: 100%;
  margin-top: 8px;
  border: 0;
  cursor: pointer;
}

#account-card-root {
  position: relative;
  z-index: 1;
  min-width: 0;
}

#account-card-root .account-card {
  width: 100%;
}

.account-notice:empty {
  display: none;
}

.static-warning,
.not-found-page {
  width: min(100% - 40px, 760px);
  margin: 10vh auto;
}

.static-warning {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.not-found-page {
  min-height: 70vh;
  display: grid;
  align-content: center;
  justify-items: start;
}

.not-found-page h1 {
  margin: 0;
  color: var(--indigo);
  font-family: var(--serif);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
}

.not-found-page > p:not(.kicker) {
  margin: 28px 0;
  color: var(--muted);
}
