:root {
  --primary-color: #E53935; /* Red */
  --secondary-color: #FF5A4F; /* Orange-Red */
  --card-bg: #FFFFFF;
  --background: #F5F7FA;
  --text-main: #333333;
  --border: #E0E0E0;
  --primary-color-rgb: 229, 57, 53; /* For rgba usage */
}

/* General styles for page-contact */
.page-contact {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color */
  background-color: var(--background); /* Default page background */
  line-height: 1.6;
}

.page-contact__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-contact__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-contact__section-description {
  font-size: 18px;
  color: var(--text-main);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Color Contrast Classes */
.page-contact__light-bg {
  background-color: var(--background); /* #F5F7FA */
  color: var(--text-main); /* #333333 */
}

.page-contact__dark-bg {
  background-color: var(--primary-color); /* #E53935 */
  color: #ffffff;
}

.page-contact__dark-bg .page-contact__section-title {
  color: #ffffff;
}

.page-contact__dark-bg .page-contact__section-description {
  color: #f0f0f0;
}

/* Buttons */
.page-contact__btn-primary,
.page-contact__btn-secondary,
.page-contact__social-btn,
.page-contact__btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-contact__btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%); /* #FF5A4F to #E53935 */
  color: #ffffff;
  border: none;
}

.page-contact__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-contact__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-contact__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.page-contact__btn-link {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 15px;
  font-size: 16px;
  margin-top: 10px;
  margin-right: 10px;
}

.page-contact__btn-link:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Hero Section */
.page-contact__hero-section {
  display: flex;
  flex-direction: column; /* Default to column for mobile-first approach, then row for desktop */
  align-items: center;
  gap: 30px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--primary-color); /* #E53935 */
  color: #ffffff;
  text-align: center;
}

.page-contact__hero-content {
  max-width: 800px;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-contact__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #ffffff;
}

.page-contact__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #f0f0f0;
  line-height: 1.5;
}

.page-contact__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  width: 100%; /* Ensure container takes full width for flex-wrap */
  max-width: 400px; /* Limit max width for button group */
  margin: 0 auto;
}

.page-contact__hero-image-wrapper {
  width: 100%;
  max-width: 1000px; /* Max width for hero image */
  padding: 0 16px;
  box-sizing: border-box;
}

.page-contact__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Contact Methods Section */
.page-contact__contact-methods {
  padding: 80px 0;
}

.page-contact__methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-contact__method-card {
  background-color: var(--card-bg); /* #FFFFFF */
  border: 1px solid var(--border); /* #E0E0E0 */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-contact__method-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-contact__method-icon {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px; /* Ensure images are not small icons */
}

.page-contact__method-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-contact__method-text {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 25px;
  flex-grow: 1; /* Push button to bottom */
}

.page-contact__social-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

.page-contact__social-btn {
  background: var(--secondary-color);
  color: #ffffff;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
}

.page-contact__social-btn:hover {
  background: var(--primary-color);
}

/* Contact Form Section */
.page-contact__contact-form-section {
  padding: 80px 0;
}

.page-contact__form-wrapper {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 50px;
}

.page-contact__form {
  flex: 1;
  min-width: 300px; /* Minimum width for form */
  max-width: 600px;
  background-color: var(--card-bg); /* #FFFFFF */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.page-contact__form-group {
  margin-bottom: 20px;
}

.page-contact__form-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-main);
  background-color: #fcfcfc;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
  outline: none;
}

.page-contact__form-textarea {
  resize: vertical;
  min-height: 120px;
}

.page-contact__form-image {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-contact__form-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-contact__faq-section {
  padding: 80px 0;
}

.page-contact__faq-list {
  margin-top: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
details.page-contact__faq-item summary.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-contact__faq-item summary.page-contact__faq-question::-webkit-details-marker {
  display: none;
}
details.page-contact__faq-item summary.page-contact__faq-question:hover {
  background: #f5f5f5;
}
.page-contact__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}
.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
}
details.page-contact__faq-item .page-contact__faq-answer {
  padding: 0 25px 25px;
  background: #f9f9f9;
  border-radius: 0 0 10px 10px;
  color: var(--text-main);
}
.page-contact__faq-answer p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.6;
}
.page-contact__faq-answer p:last-child {
  margin-bottom: 0;
}
.page-contact__faq-answer .page-contact__btn-link {
  margin-top: 10px;
}

/* Commitment Section */
.page-contact__commitment-section {
  padding: 80px 0;
}

.page-contact__commitment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-contact__commitment-item {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-contact__commitment-item .page-contact__commitment-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-contact__commitment-item .page-contact__commitment-text {
  font-size: 16px;
  line-height: 1.6;
  color: #f0f0f0;
}

.page-contact__cta-bottom {
  text-align: center;
  margin-top: 60px;
}

/* --- Responsive Design --- */

/* Desktop layout for hero section */
@media (min-width: 1024px) {
  .page-contact__hero-section {
    flex-direction: row; /* Desktop: row layout */
    text-align: left;
    padding-bottom: 80px;
    gap: 60px;
  }

  .page-contact__hero-content {
    flex: 1;
    max-width: 50%; /* Adjust width for content */
    padding-left: 16px; /* Ensure content aligns with container */
    padding-right: 0;
  }

  .page-contact__main-title {
    text-align: left;
  }

  .page-contact__hero-description {
    text-align: left;
  }

  .page-contact__cta-buttons {
    justify-content: flex-start;
    max-width: none;
    margin: 0;
  }

  .page-contact__hero-image-wrapper {
    flex: 1;
    max-width: 50%; /* Adjust width for image */
    padding-right: 16px;
    padding-left: 0;
  }

  .page-contact__form-wrapper {
    flex-wrap: nowrap; /* No wrapping on desktop */
    justify-content: space-between;
  }

  .page-contact__form {
    padding: 50px;
  }
}

/* --- Mandatory Homepage-specific CSS blocks (as placeholders for inner pages) --- */
/* A. @media (max-width: 1023px) must be output exactly as provided */
@media (max-width: 1023px) {
  .page-contact__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-contact__hero-brand,
  .page-contact__hero-jackpot {
    display: none !important;
  }
  .page-contact__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-contact__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-contact__game-trial-topbar,
  .page-contact__game-trial-bottombar {
    display: none !important;
  }
  .page-contact__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-contact__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-contact__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-contact__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

/* B. @media (min-width: 1024px) must be output exactly as provided */
@media (min-width: 1024px) {
  .page-contact__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-contact__hero-brand,
  .page-contact__hero-jackpot,
  .page-contact__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-contact__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-contact__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-contact__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-contact__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-contact__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Placeholder for .page-contact__promo-strip, .page-contact__hot-games, .page-contact__brand-intro, .page-contact__winner-ticker */
/* These are homepage specific, but need to be included as per instructions. */
.page-contact__promo-strip,
.page-contact__hot-games,
.page-contact__brand-intro,
.page-contact__winner-ticker {
  /* No specific styles here as they are not used on this contact page, but placeholder for the media queries below */
}

/* --- Mobile-specific CSS for Contact Page elements (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-contact {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-contact__container {
    padding: 0 15px;
  }

  .page-contact__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-contact__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Hero Section Mobile */
  .page-contact__hero-section {
    padding-bottom: 40px;
    gap: 20px;
  }

  .page-contact__main-title {
    font-size: clamp(24px, 7vw, 36px);
    margin-bottom: 10px;
  }

  .page-contact__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-contact__cta-buttons {
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
  }

  /* Buttons mobile adaptation */
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact__social-btn,
  .page-contact__btn-link,
  .page-contact a[class*="button"],
  .page-contact a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 16px;
  }
  
  .page-contact__cta-buttons,
  .page-contact__button-group,
  .page-contact__btn-container,
  .page-contact__social-links {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* Images mobile adaptation */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-contact__hero-image-wrapper,
  .page-contact__form-image {
    padding: 0;
  }

  .page-contact__method-icon {
    width: 100px;
  }

  /* Contact Methods Mobile */
  .page-contact__contact-methods {
    padding: 40px 0;
  }

  .page-contact__methods-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-contact__method-card {
    padding: 25px;
  }

  .page-contact__method-title {
    font-size: 20px;
  }

  .page-contact__method-text {
    font-size: 15px;
  }

  /* Contact Form Mobile */
  .page-contact__contact-form-section {
    padding: 40px 0;
  }

  .page-contact__form-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-contact__form {
    padding: 30px;
  }

  .page-contact__form-label {
    font-size: 15px;
  }

  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 10px 12px;
    font-size: 15px;
  }

  /* FAQ Section Mobile */
  .page-contact__faq-section {
    padding: 40px 0;
  }

  details.page-contact__faq-item summary.page-contact__faq-question {
    padding: 15px 20px;
  }
  .page-contact__faq-qtext {
    font-size: 16px;
  }
  .page-contact__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
    width: 25px;
  }
  details.page-contact__faq-item .page-contact__faq-answer {
    padding: 0 20px 20px;
  }
  .page-contact__faq-answer p {
    font-size: 15px;
  }

  /* Commitment Section Mobile */
  .page-contact__commitment-section {
    padding: 40px 0;
  }

  .page-contact__commitment-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-contact__commitment-item {
    padding: 25px;
  }

  .page-contact__commitment-item .page-contact__commitment-title {
    font-size: 20px;
  }

  .page-contact__commitment-item .page-contact__commitment-text {
    font-size: 15px;
  }

  /* Placeholder for specific homepage modules (as per instructions) */
  /* 2.1. 优惠 `__promo-strip` */
  .page-contact__promo-strip-track {
    grid-template-columns: repeat(2, 1fr);
    overflow-x: hidden;
  }
  .page-contact__promo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .page-contact__promo-card img {
    width: 100%;
    height: auto;
  }
  .page-contact__promo-card-content {
    padding: 10px;
  }
  .page-contact__promo-card-content h3 {
    font-size: 16px;
  }
  .page-contact__promo-card-content p {
    font-size: 14px;
  }
  .page-contact__promo-card-button {
    width: 100%;
  }

  /* 2.2. 热门 `__hot-games` */
  .page-contact__hot-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-contact__hot-games-item img {
    width: 100%;
    height: auto;
  }
  .page-contact__hot-games-name,
  .page-contact__hot-games-rtp,
  .page-contact__hot-games-desc {
    display: none;
  }

  /* 2.3. 品牌 `__brand-intro` */
  .page-contact__brand-intro {
    display: block;
    padding: 20px 15px;
    text-align: center;
  }
  .page-contact__brand-intro h2 {
    font-size: 24px;
  }
  .page-contact__brand-intro p {
    font-size: 15px;
  }

  /* 2.4. 中奖条 `__winner-ticker` */
  .page-contact__winner-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 15px;
    box-sizing: border-box;
  }
  body {
    padding-bottom: 40px;
  }
  .page-contact {
    padding-bottom: 40px;
  }
}