/* ================= GLOBAL RESET ================= */

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

body {
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url('/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: #fff;
  display: block;
  overflow-x: hidden;
}

main,
.page-wrap,
.site-page,
.content-wrap,
.page-content {
  width: 100%;
}

/* ================= HEADER ================= */

.site-header-wrap {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 22px 0 18px;
  overflow: hidden;
  box-sizing: border-box;
}

.site-header-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(8, 4, 28, 0.96) 0%,
      rgba(14, 6, 40, 0.94) 18%,
      rgba(12, 5, 38, 0.96) 50%,
      rgba(14, 6, 40, 0.94) 82%,
      rgba(8, 4, 28, 0.96) 100%
    );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
}

.site-header-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  pointer-events: none;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
}

.logo {
  display: block;
  margin: 0 auto 18px;
  border-radius: 20px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}

/* ================= NAV ================= */

.nav-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  width: 100%;
  max-width: 1400px;
  box-sizing: border-box;
}

.nav-btn,
.header-user-box {
  flex: 0 1 auto;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 24px rgba(236, 72, 153, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
}

.nav-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
  box-shadow:
    0 14px 28px rgba(236, 72, 153, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav-btn:visited,
.nav-btn:active,
.nav-btn:focus {
  color: #fff;
  text-decoration: none;
}

.nav-btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.nav-btn-google:hover {
  opacity: 0.98;
}

.nav-btn-google:visited,
.nav-btn-google:active,
.nav-btn-google:focus {
  color: #111827;
  text-decoration: none;
}

.google-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 45%, #fbbc05 72%, #ea4335 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.header-user-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
}

.header-user-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  max-width: 230px;
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-btn-logout {
  min-width: auto;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  white-space: nowrap;
}

.nav-btn-logout:hover {
  transform: translateY(-2px);
}

.nav-btn-logout:visited,
.nav-btn-logout:active,
.nav-btn-logout:focus {
  color: #fff;
  text-decoration: none;
}

/* ================= AUTH CARDS ================= */

.auth-card {
  margin: 0 auto 24px;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 18px 16px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.auth-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

.auth-sub {
  color: #d8cdf6;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.login-btn,
.logout-btn {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.login-btn:hover,
.logout-btn:hover {
  transform: translateY(-1px);
}

.login-btn {
  padding: 12px 16px;
  font-size: 14px;
  background: #ffffff;
  color: #111827;
  min-width: 220px;
}

.logout-btn {
  padding: 10px 14px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

/* ================= FOOTER ================= */

.site-footer-wrap {
  position: relative;
  z-index: 20;
  width: 100%;
  margin-top: 60px;
  padding: 26px 0 28px;
  overflow: hidden;
  box-sizing: border-box;
  text-align: center;
}

.site-footer-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(8, 4, 28, 0.96) 0%,
      rgba(14, 6, 40, 0.94) 18%,
      rgba(12, 5, 38, 0.96) 50%,
      rgba(14, 6, 40, 0.94) 82%,
      rgba(8, 4, 28, 0.96) 100%
    );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
}

.site-footer-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  pointer-events: none;
}

.footer-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

/* ================= YOUTUBE LINKS ================= */

.youtube-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #ff0000;
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: bold;
  font-size: 14px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.youtube-link:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.youtube-link:visited,
.youtube-link:active,
.youtube-link:focus {
  color: white;
  text-decoration: none;
}

/* ================= BUTTONS ================= */

.vote-btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #facc15);
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.45);
}

/* ================= HOME ONLY ================= */

body.home-page .top-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

body.home-page .top-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 12px;
  backdrop-filter: blur(10px);
}

body.home-page .top-card img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  transition: transform 0.2s ease;
}

body.home-page .top-card img:hover {
  transform: scale(1.03);
}

body.home-page .home-community {
  max-height: 300px;
  overflow: auto;
}

body.home-page .home-community .community-row {
  display: grid;
  grid-template-columns: 30px 30px 1fr auto;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

body.home-page .home-community .community-row.gold {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.22), rgba(255, 255, 255, 0.06));
}

/* ================= VIDEO ================= */

.video-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: block;
}

.video-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 0 auto;
}

.video-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ================= MOBILE / TABLET ================= */

@media (max-width: 1200px) {
  .nav-row {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .header-user-box {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .header-user-email {
    max-width: 360px;
    white-space: normal;
    word-break: break-word;
  }

  body.home-page .top-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header-wrap {
    padding: 18px 0 14px;
  }

  .site-header-inner {
    padding: 0 14px;
  }

  .site-footer-wrap {
    padding: 22px 0 24px;
  }

  .footer-box {
    padding: 0 14px;
  }

  .logo {
    width: 220px;
    max-height: 220px;
  }

  .nav-row {
    flex-wrap: wrap;
  }

  .nav-btn {
    width: 100%;
    max-width: 360px;
    min-width: 0;
  }

  .youtube-link {
    width: 100%;
    max-width: 360px;
  }

  .header-user-box {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-user-email {
    width: 100%;
    max-width: 360px;
    justify-content: center;
  }

  .nav-btn-google,
  .nav-btn-logout {
    width: 100%;
    max-width: 360px;
  }
}