 :root {
  --nav:        #3F91E2;
  --nav-dark:   #2e7acc;
  --frame:      #6BB5FF;
  --frame-soft: rgba(107,181,255,0.12);
  --white:      #FFFFFF;
  --bg:         #F0F6FF;
  --bg2:        #E6F1FF;
  --surface:    #FFFFFF;
  --border:     #D0E6FF;
  --text:       #0f2340;
  --text2:      #3a5a82;
  --muted:      #7a9cc0;
  --accent:     #3F91E2;
  --accent2:    #FF5C35;
  --success:    #00C97A;
  --gold:       #F5B800;
  --nav-h:      4rem;
  --radius:     0.625rem;
  --shadow:     0 0.125rem 1rem rgba(63,145,226,0.10);
  --shadow-lg:  0 0.5rem 2.5rem rgba(63,145,226,0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
}

body {
  font-family: 'Fredoka', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--nav);
  box-shadow: 0 0.125rem 1.25rem rgba(63,145,226,0.35);
  display: flex;
  align-items: center;
  padding: 0 2%;
}

.logo {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.65rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo img {
  height: clamp(1.75rem, 3.5vw, 3.25rem);
  width: auto;
  object-fit: contain;
}

.logo span {
  opacity: 0.7;
  font-weight: 400;
}

.nav-links {
  display: flex;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: 500;
  padding: 0 clamp(0.5rem, 1.1vw, 1.1rem);
  height: var(--nav-h);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: clamp(0.5rem, 1.1vw, 1.1rem);
  right: clamp(0.5rem, 1.1vw, 1.1rem);
  height: 3px;
  background: #fff;
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-btn.active {
  color: #fff;
}

.nav-btn.active::after {
  transform: scaleX(1);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-search {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.375rem;
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  padding: 0.35rem 0.85rem;
  outline: none;
  width: clamp(7rem, 12vw, 13rem);
}

.nav-search::placeholder {
  color: rgba(255,255,255,0.55);
}

.nav-search:focus {
  background: rgba(255,255,255,0.25);
  width: clamp(9rem, 15vw, 16rem);
}

.nav-login-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 0.375rem;
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.7rem, 0.9vw, 0.875rem);
  padding: 0.35rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav-login-btn:hover {
  background: rgba(255,255,255,0.32);
}

.nav-logout-btn {
  color: rgba(255,255,255,0.7);
  font-size: clamp(0.7rem, 0.85vw, 0.85rem);
  text-decoration: none;
}

.nav-logout-btn:hover {
  color: #fff;
}

.nav-user {
  color: rgba(255,255,255,0.85);
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
}

.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.hero {
  background: linear-gradient(135deg, var(--nav) 0%, #1a6fc4 100%);
  padding: clamp(2rem, 5vw, 4rem) 5% clamp(1.75rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  right: 15%;
  top: 50%;
  transform: translateY(-50%) rotate(-10deg);
  width: clamp(10rem, 22vw, 25rem);
  height: clamp(10rem, 22vw, 25rem);
  background: url('/assets/img/pogachar2.png') no-repeat center;
  background-size: contain;
  opacity: 0.2;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  left: 15%;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  width: clamp(10rem, 22vw, 25rem);
  height: clamp(10rem, 22vw, 25rem);
  background: url('/assets/img/finish.png') no-repeat center;
  background-size: contain;
  opacity: 0.2;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: clamp(0.6rem, 0.8vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 1.25rem;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.75rem, 4.5vw, 4.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  opacity: 0.65;
  font-weight: 400;
}

.hero p {
  color: rgba(255,255,255,0.8);
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.75rem;
  max-width: clamp(18rem, 45vw, 35rem);
  margin: 0 auto;
  overflow: hidden;
}

.hero-stat {
  flex: 1;
  padding: 1.25rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.hero-stat:last-child {
  border-right: none;
}

.hero-stat .n {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
}

.hero-stat .l {
  font-size: clamp(0.55rem, 0.75vw, 0.75rem);
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
  display: block;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem;
  padding: 2rem 5%;
  max-width: 90rem;
  margin: 0 auto;
}

.home-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.75rem);
  cursor: pointer;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--frame);
  transform: scaleX(0);
  transform-origin: left;
}

.home-card:hover {
  border-color: var(--frame);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.home-card:hover::before {
  transform: scaleX(1);
}

.home-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.home-card p {
  color: var(--muted);
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  line-height: 1.55;
}

.home-card .hc-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--muted);
  font-size: clamp(0.85rem, 1vw, 1rem);
}

.home-card:hover .hc-arrow {
  color: var(--accent);
}

.home-recent {
  padding: 0 5% 2.5rem;
  max-width: 90rem;
  margin: 0 auto;
}

.section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recent-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.recent-item:hover {
  border-color: var(--frame);
}

.recent-icon {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  flex-shrink: 0;
}

.recent-info {
  flex: 1;
}

.recent-info strong {
  display: block;
  font-weight: 600;
  font-size: clamp(0.78rem, 1vw, 0.9rem);
}

.recent-info span {
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  color: var(--muted);
}

.recent-winner {
  text-align: right;
}

.recent-winner-label {
  display: block;
  font-size: clamp(0.62rem, 0.75vw, 0.68rem);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recent-winner strong {
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  color: var(--accent);
}

.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--border);
  margin-top: 3rem;
}

.footer-inner {
  max-width: 90rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1.25rem, 3vw, 2.5rem) 5%;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.footer-brand .footer-logo img {
  height: clamp(1.75rem, 3vw, 2.5rem);
  width: auto;
  object-fit: contain;
}

.footer-brand .footer-logo span {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.3rem);
  font-weight: 700;
  color: var(--accent);
}