:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --card-bg: #FFFFFF;
    --background-color: #F5F7FA;
    --text-main-color: #333333;
    --border-color: #E0E0E0;
}

.page-fishing-games {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color);
    background: var(--background-color);
}

.page-fishing-games__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-fishing-games__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-fishing-games__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-fishing-games__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px 60px;
    text-align: center;
    background: var(--background-color);
    padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-fishing-games__hero-content {
    max-width: 900px;
    margin-bottom: 30px;
}

.page-fishing-games__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em);
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 800;
}

.page-fishing-games__hero-description {
    font-size: 1.2em;
    color: #444444;
    margin-bottom: 30px;
}

.page-fishing-games__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-fishing-games__btn-primary,
.page-fishing-games__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-fishing-games__btn-primary {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

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

.page-fishing-games__btn-secondary {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.page-fishing-games__hero-image-wrapper {
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.page-fishing-games__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-fishing-games__dark-section {
    background: var(--primary-color);
    color: #ffffff;
    padding: 60px 0;
}

.page-fishing-games__dark-section .page-fishing-games__section-title {
    color: #ffffff;
}

.page-fishing-games__dark-section .page-fishing-games__section-description {
    color: #f0f0f0;
}

.page-fishing-games__light-bg {
    background: var(--background-color);
    color: var(--text-main-color);
    padding: 60px 0;
}

.page-fishing-games__game-trial-section {
    padding: 40px 0;
}

.page-fishing-games__game-trial-shell {
    position: relative;
    border: 1px solid rgba(212, 175, 55, .45);
    border-radius: 10px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-fishing-games__game-trial-topbar {
    background-color: #222;
    color: #fff;
    padding: 10px 15px;
    font-size: 1.1em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-fishing-games__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768; /* Fixed aspect ratio for trial game */
    background-color: #000;
    overflow: hidden;
}

.page-fishing-games__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    min-height: 200px;
}

.page-fishing-games__game-trial-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.page-fishing-games__game-trial-overlay.is-hidden {
    opacity: 0;
    display: none !important;
    pointer-events: none !important;
}

.page-fishing-games__game-trial-start {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: none;
    padding: 18px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    z-index: 6;
    pointer-events: auto;
    touch-action: manipulation;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-fishing-games__game-trial-start:hover {
    transform: translateY(-3px);
    opacity: 0.95;
}

.page-fishing-games__game-trial-bottombar {
    background-color: #222;
    padding: 15px;
    text-align: center;
}

.page-fishing-games__game-trial-register-btn {
    font-size: 1em;
    padding: 12px 25px;
    border-radius: 6px;
}

.page-fishing-games__features-grid,
.page-fishing-games__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-fishing-games__card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    border: 1px solid var(--border-color);
    color: var(--text-main-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-fishing-games__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-fishing-games__feature-image,
.page-fishing-games__game-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
}

.page-fishing-games__feature-title,
.page-fishing-games__game-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-fishing-games__feature-text,
.page-fishing-games__game-description {
    font-size: 1em;
    color: #555555;
    padding: 0 15px;
}

.page-fishing-games__game-card .page-fishing-games__btn-primary {
    margin-top: 20px;
    padding: 10px 25px;
    font-size: 1em;
}

.page-fishing-games__advantage-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-fishing-games__advantage-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-fishing-games__advantage-heading {
    font-size: 1.6em;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-fishing-games__advantage-item p {
    color: #f0f0f0;
    font-size: 1em;
}

/* FAQ Section */
details.page-fishing-games__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
details.page-fishing-games__faq-item summary.page-fishing-games__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, color 0.3s ease;
}
details.page-fishing-games__faq-item summary.page-fishing-games__faq-question::-webkit-details-marker {
  display: none;
}
details.page-fishing-games__faq-item summary.page-fishing-games__faq-question:hover {
  background: #f5f5f5;
  color: var(--primary-color);
}
.page-fishing-games__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main-color);
}
details.page-fishing-games__faq-item[open] .page-fishing-games__faq-qtext {
    color: var(--primary-color);
}
.page-fishing-games__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  line-height: 1;
}
details.page-fishing-games__faq-item .page-fishing-games__faq-answer {
  padding: 0 25px 20px;
  background: #f9f9f9;
  border-radius: 0 0 10px 10px;
  color: #555555;
}

.page-fishing-games__cta-section {
    padding: 80px 0;
    text-align: center;
}

/* Reward Modal */
.page-fishing-games__reward-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-fishing-games__reward-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.page-fishing-games__reward-modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    color: var(--text-main-color);
}

.page-fishing-games__reward-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.page-fishing-games__reward-modal-close:hover {
    color: var(--primary-color);
}

.page-fishing-games__reward-modal-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-fishing-games__reward-modal-text {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.page-fishing-games__reward-modal .page-fishing-games__btn-primary {
    padding: 12px 25px;
    font-size: 1em;
}

/* --- GLOBAL IMAGE & BUTTON RESPONSIVE STYLES (REQUIRED) --- */
.page-fishing-games img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-fishing-games__section,
.page-fishing-games__card,
.page-fishing-games__container,
.page-fishing-games__hero-cta-buttons,
.page-fishing-games__cta-buttons {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- HOMEPAGE TRIAL LAYOUT CSS (AS INSTRUCTED, EVEN FOR NON-HOMEPAGE) --- */
@media (max-width: 1023px) {
  .page-fishing-games__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-fishing-games__hero-brand,
  .page-fishing-games__hero-jackpot {
    display: none !important;
  }
  .page-fishing-games__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-fishing-games__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-fishing-games__game-trial-topbar,
  .page-fishing-games__game-trial-bottombar {
    display: none !important;
  }
  .page-fishing-games__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-fishing-games__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-fishing-games__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-fishing-games__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-fishing-games__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; /* Adjust padding-top here as body handles main offset */
    box-sizing: border-box;
  }
  .page-fishing-games__hero-brand,
  .page-fishing-games__hero-jackpot,
  .page-fishing-games__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-fishing-games__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-fishing-games__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-fishing-games__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-fishing-games__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-fishing-games__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  /* Placeholder for other homepage modules if they were to exist */
  .page-fishing-games__promo-strip { /* Example */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1280px;
    margin: 16px auto 0;
    padding: 0 20px;
  }
  .page-fishing-games__hot-games-grid { /* Example */
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 0 20px;
  }
  .page-fishing-games__hot-games-name,
  .page-fishing-games__hot-games-rtp,
  .page-fishing-games__hot-games-desc {
    display: block;
  }
  .page-fishing-games__hero-brand h1 { /* Example for left column H1 */
      font-size: 2.5em;
  }
}

/* --- MOBILE RESPONSIVE STYLES (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-fishing-games__container {
        padding: 15px;
    }

    .page-fishing-games__section-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-fishing-games__section-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-fishing-games__hero-section {
        padding: 10px 15px 40px;
    }

    .page-fishing-games__main-title {
        font-size: 2em;
    }

    .page-fishing-games__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-fishing-games__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding for buttons container */
    }

    .page-fishing-games__btn-primary,
    .page-fishing-games__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-fishing-games__hero-image-wrapper {
        border-radius: 8px;
    }

    .page-fishing-games__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Trial Section */
    .page-fishing-games__game-trial-shell {
        border-radius: 8px;
    }
    .page-fishing-games__game-trial-topbar {
        font-size: 1em;
        padding: 8px 10px;
    }
    .page-fishing-games__game-trial-start {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    .page-fishing-games__game-trial-bottombar {
        padding: 10px;
    }
    .page-fishing-games__game-trial-register-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .page-fishing-games__features-grid,
    .page-fishing-games__game-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px; /* Add padding for grids */
    }

    .page-fishing-games__card {
        border-radius: 10px;
        padding-bottom: 15px;
    }

    .page-fishing-games__feature-image,
    .page-fishing-games__game-image {
        height: 200px;
        margin-bottom: 15px;
    }

    .page-fishing-games__feature-title,
    .page-fishing-games__game-title {
        font-size: 1.3em;
    }

    .page-fishing-games__advantage-list {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px; /* Add padding for list */
    }

    .page-fishing-games__advantage-item {
        padding: 25px;
    }

    .page-fishing-games__advantage-heading {
        font-size: 1.4em;
    }

    /* FAQ Section */
    details.page-fishing-games__faq-item summary.page-fishing-games__faq-question {
        padding: 15px 20px;
    }
    .page-fishing-games__faq-qtext {
        font-size: 1em;
    }
    .page-fishing-games__faq-toggle {
        font-size: 24px;
        width: 25px;
    }
    details.page-fishing-games__faq-item .page-fishing-games__faq-answer {
        padding: 0 20px 15px;
    }

    .page-fishing-games__cta-section {
        padding: 50px 0;
    }

    .page-fishing-games__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding for CTA buttons */
    }

    /* Reward Modal */
    .page-fishing-games__reward-modal-content {
        padding: 30px;
        border-radius: 10px;
    }
    .page-fishing-games__reward-modal-close {
        font-size: 2em;
        top: 10px;
        right: 15px;
    }
    .page-fishing-games__reward-modal-title {
        font-size: 1.5em;
    }
    .page-fishing-games__reward-modal-text {
        font-size: 1em;
    }
    .page-fishing-games__reward-modal .page-fishing-games__btn-primary {
        padding: 10px 20px;
    }

    /* Ensure all content sections have proper width and padding */
    .page-fishing-games__hero-section,
    .page-fishing-games__game-trial-section,
    .page-fishing-games__features-section,
    .page-fishing-games__popular-games-section,
    .page-fishing-games__advantages-section,
    .page-fishing-games__faq-section,
    .page-fishing-games__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }

    /* General image and button overrides for mobile */
    .page-fishing-games img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-fishing-games a[class*="button"],
    .page-fishing-games a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}