/* phopen layout styles - g2db prefix */
:root {
  --g2db-wheat: #F5DEB3;
  --g2db-bg: #1A1A2E;
  --g2db-sky: #87CEFA;
  --g2db-navy: #191970;
  --g2db-steel: #4682B4;
  --g2db-primary: #4682B4;
  --g2db-text: #F5DEB3;
  --g2db-muted: #c9b896;
  --g2db-card: #22223a;
  --g2db-border: rgba(135, 206, 250, 0.22);
  --g2db-accent: #87CEFA;
  --g2db-danger: #ff6b6b;
  --g2db-success: #4ecdc4;
  --g2db-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  --g2db-radius: 0.8rem;
  --g2db-header-h: 5.6rem;
  --g2db-bottom-h: 6.2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--g2db-bg);
  color: var(--g2db-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--g2db-sky);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #b6e4ff;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.g2db-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: linear-gradient(180deg, #141428 0%, var(--g2db-bg) 40%, #151530 100%);
}

.g2db-container {
  width: 100%;
  padding: 0 1.2rem;
}

/* Header */
.g2db-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--g2db-header-h);
  z-index: 1000;
  background: linear-gradient(135deg, #191970 0%, #1A1A2E 60%, #16213e 100%);
  border-bottom: 1px solid var(--g2db-border);
  box-shadow: var(--g2db-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.g2db-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.g2db-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  object-fit: cover;
}

.g2db-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--g2db-wheat);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.g2db-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.g2db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 4.4rem;
  min-width: 4.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 2.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.g2db-btn:active {
  transform: scale(0.96);
}

.g2db-btn-register {
  background: linear-gradient(135deg, #4682B4, #87CEFA);
  color: #0d1b2a;
  box-shadow: 0 2px 10px rgba(70, 130, 180, 0.45);
}

.g2db-btn-login {
  background: transparent;
  color: var(--g2db-wheat);
  border: 1.5px solid var(--g2db-sky);
}

.g2db-btn-primary {
  background: linear-gradient(135deg, #191970, #4682B4);
  color: var(--g2db-wheat);
  width: 100%;
  margin: 0.8rem 0;
}

.g2db-btn-promo {
  background: linear-gradient(90deg, #4682B4, #191970);
  color: #fff;
  border-radius: 0.8rem;
  font-weight: 700;
}

.g2db-menu-toggle {
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g2db-sky);
  font-size: 2.2rem;
}

/* Mobile menu */
.g2db-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.g2db-overlay-show {
  opacity: 1;
  visibility: visible;
}

.g2db-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(82vw, 320px);
  height: 100vh;
  background: linear-gradient(180deg, #191970 0%, #1A1A2E 100%);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  padding: 2rem 1.4rem;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

.g2db-menu-open {
  transform: translateX(0);
}

.g2db-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.g2db-menu-header h3 {
  font-size: 1.6rem;
  color: var(--g2db-wheat);
}

.g2db-menu-close {
  width: 4.4rem;
  height: 4.4rem;
  color: var(--g2db-sky);
  font-size: 2.4rem;
}

.g2db-menu-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0.8rem;
  border-bottom: 1px solid var(--g2db-border);
  color: var(--g2db-text);
  font-size: 1.4rem;
  min-height: 4.8rem;
}

.g2db-menu-list a:hover {
  color: var(--g2db-sky);
  background: rgba(135, 206, 250, 0.08);
}

/* Main */
.g2db-main {
  padding-top: calc(var(--g2db-header-h) + 1rem);
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  .g2db-main {
    padding-bottom: 8.5rem;
  }
}

/* Carousel */
.g2db-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--g2db-radius);
  overflow: hidden;
  margin-bottom: 1.6rem;
  aspect-ratio: 16 / 9;
  background: var(--g2db-navy);
  box-shadow: var(--g2db-shadow);
}

.g2db-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  cursor: pointer;
}

.g2db-slide-active {
  opacity: 1;
  z-index: 1;
}

.g2db-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g2db-carousel-ctrl {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: rgba(26, 26, 46, 0.65);
  color: var(--g2db-wheat);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.g2db-carousel-prev { left: 0.8rem; }
.g2db-carousel-next { right: 0.8rem; }

.g2db-dots {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.6rem;
}

.g2db-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(245, 222, 179, 0.4);
}

.g2db-dot-active {
  background: var(--g2db-sky);
  transform: scale(1.2);
}

/* Sections */
.g2db-section {
  margin-bottom: 2rem;
}

.g2db-section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--g2db-wheat);
  margin-bottom: 1.2rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--g2db-sky);
  line-height: 1.4;
}

.g2db-h1 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--g2db-wheat);
  line-height: 1.35;
  margin: 1.2rem 0 1rem;
  text-align: center;
}

.g2db-text {
  font-size: 1.35rem;
  line-height: 1.65;
  color: var(--g2db-muted);
  margin-bottom: 1rem;
}

.g2db-text strong,
.g2db-link-bold {
  color: var(--g2db-sky);
  font-weight: 700;
  cursor: pointer;
}

.g2db-card {
  background: var(--g2db-card);
  border: 1px solid var(--g2db-border);
  border-radius: var(--g2db-radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--g2db-shadow);
}

.g2db-card h3 {
  font-size: 1.45rem;
  color: var(--g2db-sky);
  margin-bottom: 0.8rem;
}

/* Game grid */
.g2db-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.g2db-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  min-width: 0;
}

.g2db-game-item:active {
  transform: scale(0.94);
}

.g2db-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.8rem;
  object-fit: cover;
  border: 1px solid var(--g2db-border);
  background: var(--g2db-navy);
}

.g2db-game-item span {
  font-size: 1rem;
  color: var(--g2db-text);
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.g2db-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--g2db-sky);
  margin: 0.4rem 0 1rem;
  text-transform: capitalize;
}

/* Features / stats */
.g2db-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.g2db-feature-item {
  background: var(--g2db-card);
  border-radius: var(--g2db-radius);
  padding: 1.2rem;
  border: 1px solid var(--g2db-border);
  text-align: center;
}

.g2db-feature-item i,
.g2db-feature-item .material-icons,
.g2db-feature-item .bi {
  font-size: 2.4rem;
  color: var(--g2db-sky);
  margin-bottom: 0.6rem;
}

.g2db-feature-item h4 {
  font-size: 1.25rem;
  color: var(--g2db-wheat);
  margin-bottom: 0.4rem;
}

.g2db-feature-item p {
  font-size: 1.15rem;
  color: var(--g2db-muted);
  line-height: 1.4;
}

.g2db-rtp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--g2db-border);
  font-size: 1.25rem;
}

.g2db-rtp-val {
  color: var(--g2db-success);
  font-weight: 700;
}

.g2db-testimonial {
  background: linear-gradient(135deg, rgba(25, 25, 112, 0.5), rgba(70, 130, 180, 0.15));
  border-left: 3px solid var(--g2db-sky);
  padding: 1.2rem;
  border-radius: 0 0.8rem 0.8rem 0;
  margin-bottom: 1rem;
}

.g2db-testimonial p {
  font-size: 1.25rem;
  color: var(--g2db-muted);
  font-style: italic;
  margin-bottom: 0.6rem;
}

.g2db-testimonial cite {
  font-size: 1.15rem;
  color: var(--g2db-sky);
  font-style: normal;
  font-weight: 600;
}

.g2db-pay-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.g2db-pay-item {
  background: var(--g2db-card);
  border: 1px solid var(--g2db-border);
  border-radius: 0.6rem;
  padding: 0.8rem 1.2rem;
  font-size: 1.2rem;
  color: var(--g2db-wheat);
  font-weight: 600;
}

.g2db-winner-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.g2db-winner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--g2db-card);
  padding: 0.9rem 1.1rem;
  border-radius: 0.6rem;
  font-size: 1.2rem;
  border: 1px solid var(--g2db-border);
}

.g2db-winner-amt {
  color: #ffd700;
  font-weight: 700;
}

.g2db-cta-box {
  background: linear-gradient(135deg, #191970, #4682B4 70%, #87CEFA);
  border-radius: var(--g2db-radius);
  padding: 2rem 1.4rem;
  text-align: center;
  margin: 1.6rem 0;
  box-shadow: var(--g2db-shadow);
}

.g2db-cta-box h2 {
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 0.8rem;
}

.g2db-cta-box p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.2rem;
}

.g2db-cta-box .g2db-btn {
  background: #fff;
  color: #191970;
  min-width: 16rem;
}

/* FAQ */
.g2db-faq-item {
  background: var(--g2db-card);
  border-radius: var(--g2db-radius);
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--g2db-border);
}

.g2db-faq-item h3 {
  font-size: 1.35rem;
  color: var(--g2db-wheat);
  margin-bottom: 0.6rem;
}

.g2db-faq-item p {
  font-size: 1.25rem;
  color: var(--g2db-muted);
  line-height: 1.55;
}

/* Footer */
.g2db-footer {
  background: linear-gradient(180deg, #151528, #0f0f1e);
  border-top: 1px solid var(--g2db-border);
  padding: 2rem 1.2rem 1.5rem;
  margin-top: 1rem;
}

.g2db-footer-brand {
  font-size: 1.3rem;
  color: var(--g2db-muted);
  line-height: 1.55;
  margin-bottom: 1.4rem;
  text-align: center;
}

.g2db-footer-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.g2db-footer-btns .g2db-btn {
  min-height: 4rem;
  padding: 0.6rem 1.1rem;
  font-size: 1.15rem;
}

.g2db-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.g2db-footer-links a {
  font-size: 1.2rem;
  color: var(--g2db-sky);
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
}

.g2db-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: var(--g2db-muted);
  opacity: 0.75;
  padding-bottom: 0.5rem;
}

/* Bottom nav - unique steel-blue glass style */
.g2db-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--g2db-bottom-h);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(25, 25, 112, 0.97), rgba(26, 26, 46, 0.99));
  border-top: 2px solid rgba(135, 206, 250, 0.35);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.3rem 0.4rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.g2db-bottom-nav a,
.g2db-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 6rem;
  gap: 0.25rem;
  color: var(--g2db-muted);
  font-size: 1rem;
  border-radius: 1rem;
  transition: transform 0.15s ease, color 0.2s ease, background 0.2s ease;
  padding: 0.4rem;
}

.g2db-bottom-nav a i,
.g2db-bottom-nav a .material-icons,
.g2db-bottom-nav a .bi,
.g2db-bottom-nav button i,
.g2db-bottom-nav button .material-icons,
.g2db-bottom-nav button .bi {
  font-size: 2.2rem;
  line-height: 1;
}

.g2db-bottom-nav a:active,
.g2db-bottom-nav button:active {
  transform: scale(0.9);
  color: var(--g2db-sky);
}

.g2db-nav-active {
  color: var(--g2db-sky) !important;
  background: rgba(135, 206, 250, 0.12);
}

.g2db-bottom-nav .g2db-nav-promo {
  color: #ffd700;
}

.g2db-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin: 1rem 0;
}

.g2db-seo-links a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--g2db-sky);
  text-decoration: underline;
}

@media (min-width: 769px) {
  .g2db-bottom-nav {
    display: none;
  }
  .g2db-wrapper {
    max-width: 430px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
  .g2db-main {
    padding-bottom: 2rem;
  }
}

@media (max-width: 360px) {
  .g2db-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .g2db-btn-register,
  .g2db-btn-login {
    padding: 0.6rem 0.9rem;
    font-size: 1.1rem;
  }
}
