:root {
    --prevost-primary: #E63956;
    --prevost-secondary: #8C1D3A;
    --prevost-accent: #FFB86B;
    --prevost-bg: #0D0D12;
    --prevost-surface: #1A1A24;
    --prevost-text: #FAF1F3;
    --prevost-text-muted: #C6B4BA;
    --prevost-font-head: 'Courier Prime', monospace;
    --prevost-font-body: 'Roboto Mono', monospace;
    --prevost-border: #8C1D3A;
}

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

body.prevost_body {
    margin: 0;
    font-family: var(--prevost-font-body);
    background-color: var(--prevost-bg);
    color: var(--prevost-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--prevost-font-head);
    font-weight: 700;
    margin-top: 0;
}

a {
    color: var(--prevost-accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--prevost-text);
}

.prevost_sr_only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.prevost_container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.prevost_btn {
    display: inline-block;
    font-family: var(--prevost-font-head);
    background: var(--prevost-secondary);
    color: var(--prevost-text);
    border: 2px solid var(--prevost-border);
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: transform 0.1s, background 0.2s;
}

.prevost_btn:active {
    transform: translateY(2px);
}

.prevost_btn_primary {
    background: var(--prevost-primary);
    border-color: var(--prevost-accent);
}

.prevost_btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Age Strip */
.prevost_age_strip {
    background: var(--prevost-primary);
    color: var(--prevost-text);
    text-align: center;
    padding: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Header */
.prevost_header {
    background: var(--prevost-surface);
    border-bottom: 2px solid var(--prevost-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.prevost_header_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prevost_logo_img {
    height: 40px;
    width: auto;
}

.prevost_nav_list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.prevost_nav_list a {
    color: var(--prevost-text);
    font-family: var(--prevost-font-head);
    text-transform: uppercase;
}

.prevost_nav_list a[aria-current="page"] {
    color: var(--prevost-accent);
}

.prevost_nav_toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--prevost-text);
    font-size: 24px;
    cursor: pointer;
}

.prevost_header_actions {
    display: flex;
    gap: 10px;
}

.prevost_auth_btn {
    background: transparent;
    border: 1px solid var(--prevost-accent);
    color: var(--prevost-accent);
    padding: 8px 15px;
    cursor: pointer;
    font-family: var(--prevost-font-head);
    transition: background 0.2s;
}

.prevost_auth_btn:hover {
    background: var(--prevost-surface);
}

/* Hero */
.prevost_hero {
    position: relative;
    background-image: url("images/foundry-hero-bg.webp");
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--prevost-primary);
}

.prevost_hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(13,13,18,0.9) 0%, rgba(13,13,18,0.4) 100%);
    z-index: 1;
}

.prevost_hero_side_rail {
    display: flex;
    flex-wrap: wrap;
    min-height: 60vh;
}

.prevost_hero_content {
    position: relative;
    z-index: 2;
    flex: 1 1 60%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.prevost_hero_title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--prevost-accent);
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px #000;
}

.prevost_hero_subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.prevost_hero_legal_strip {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--prevost-text-muted);
    margin-bottom: 30px;
    border-left: 3px solid var(--prevost-primary);
    padding-left: 10px;
}

.prevost_hero_rail {
    position: relative;
    z-index: 2;
    flex: 1 1 300px;
    background: rgba(26,26,36,0.85);
    border-left: 2px solid var(--prevost-border);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.prevost_ticker_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prevost_ticker_list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--prevost-border);
    font-size: 0.9rem;
}

/* Sections */
.prevost_section {
    padding: 60px 0;
}

.prevost_section_title {
    color: var(--prevost-primary);
    font-size: 2rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--prevost-border);
    padding-bottom: 10px;
}

/* Grids */
.prevost_grid_3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.prevost_grid_2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.prevost_info_card {
    background: var(--prevost-surface);
    border: 1px solid var(--prevost-border);
    padding: 20px;
}

.prevost_info_card h3 {
    color: var(--prevost-accent);
}

/* Games Zone */
.prevost_social_games_zone {
    display: grid;
    grid-template-columns: 1fr;
    max-width: clamp(820px, 72vw, 900px);
    width: 100%;
    margin-inline: auto;
    gap: clamp(20px, 3vw, 28px);
    padding-inline: clamp(14px, 3vw, 24px);
}

.prevost_game_card {
    background: var(--prevost-surface);
    border: 2px solid var(--prevost-border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

.prevost_game_header {
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.prevost_game_header h3 {
    margin: 0;
    color: var(--prevost-accent);
}

.prevost_game_tag {
    font-size: 0.8rem;
    color: var(--prevost-text-muted);
    text-transform: uppercase;
}

/* Slot CSS Invariants */
.prevost_slot_stage {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16/9;
    min-height: clamp(240px, 18vw, 320px);
    margin: 0 auto 20px;
    background: #000;
    overflow: hidden;
}

.prevost_slot_frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

.prevost_slot_reel_window {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    overflow: hidden;
}

.prevost_slot_reel {
    background: rgba(20,20,20,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.prevost_slot_reel img {
    display: block;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* Wheel CSS Invariants */
.prevost_wheel_stage {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1/1;
    margin: 0 auto 20px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    place-items: center;
}

.prevost_wheel_img {
    grid-area: 1/1;
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
    border-radius: 50%;
}

.prevost_wheel_pointer {
    grid-area: 1/1;
    place-self: start center;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid var(--prevost-primary);
    z-index: 20;
    transform: translateY(-5px);
}

.prevost_game_controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.prevost_bet_selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prevost_select {
    background: var(--prevost-bg);
    color: var(--prevost-text);
    border: 1px solid var(--prevost-border);
    padding: 5px;
    font-family: var(--prevost-font-body);
}

.prevost_roulette_bets {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.prevost_bet_btn {
    background: var(--prevost-surface);
    border: 1px solid var(--prevost-border);
    color: var(--prevost-text);
    padding: 5px 10px;
    cursor: pointer;
}

.prevost_bet_btn.selected {
    background: var(--prevost-accent);
    color: var(--prevost-bg);
}

.prevost_game_status {
    color: var(--prevost-text-muted);
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.5em;
}

/* FAQ Accordion */
.prevost_accordion_item {
    margin-bottom: 10px;
    border: 1px solid var(--prevost-border);
}

.prevost_accordion_trigger {
    width: 100%;
    background: var(--prevost-surface);
    color: var(--prevost-accent);
    border: none;
    padding: 15px;
    text-align: left;
    font-family: var(--prevost-font-head);
    cursor: pointer;
    font-weight: bold;
}

.prevost_accordion_panel {
    padding: 15px;
    background: var(--prevost-bg);
}

/* Modal */
.prevost_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.prevost_modal[hidden] {
    display: none;
}

.prevost_modal_content {
    background: var(--prevost-surface);
    padding: 30px;
    border: 2px solid var(--prevost-primary);
    max-width: 400px;
    width: 90%;
    position: relative;
}

.prevost_modal_close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--prevost-text);
    font-size: 24px;
    cursor: pointer;
}

.prevost_form_group {
    margin-bottom: 15px;
}

.prevost_form_group label {
    display: block;
    margin-bottom: 5px;
    color: var(--prevost-accent);
}

.prevost_form_group input, .prevost_form_group select, .prevost_form_group textarea {
    width: 100%;
    padding: 8px;
    background: var(--prevost-bg);
    border: 1px solid var(--prevost-border);
    color: var(--prevost-text);
    font-family: var(--prevost-font-body);
}

/* Lobby Masonry */
.prevost_lobby_layout {
    padding: 40px 0;
}

.prevost_sidebar_layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.prevost_sidebar_terminal {
    flex: 0 0 300px;
    position: sticky;
    top: 80px;
    background: var(--prevost-surface);
    border: 2px solid var(--prevost-primary);
    padding: 20px;
}

.prevost_lobby_masonry {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

/* Footer */
.prevost_footer {
    background: var(--prevost-surface);
    border-top: 4px solid var(--prevost-border);
    margin-top: auto;
    padding: 40px 0 20px;
}

.prevost_footer_top {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    margin-bottom: 30px;
}

.prevost_footer_identity, .prevost_footer_links, .prevost_footer_partners {
    flex: 1 1 250px;
}

.prevost_footer_links ul {
    list-style: none;
    padding: 0;
}

.prevost_footer_links li {
    margin-bottom: 10px;
}

.prevost_partner_logos {
    display: flex;
    gap: 15px;
}

.prevost_partner_link img {
    height: 40px;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

.prevost_gamcare_bg img {
    background: #333;
}

.prevost_footer_bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--prevost-text-muted);
    border-top: 1px solid var(--prevost-border);
    padding-top: 20px;
}

/* Toasts */
.prevost_toast_container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prevost_toast {
    background: var(--prevost-secondary);
    color: var(--prevost-text);
    padding: 15px;
    border-left: 4px solid var(--prevost-accent);
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .prevost_nav_toggle {
        display: block;
    }
    
    .prevost_nav_list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--prevost-surface);
        flex-direction: column;
        padding: 20px;
        border-bottom: 2px solid var(--prevost-primary);
    }

    .prevost_nav_list.is-open {
        display: flex;
    }

    .prevost_nav_toggle_icon::before {
        content: '☰';
    }
    
    .prevost_nav_toggle[aria-expanded="true"] .prevost_nav_toggle_icon::before {
        content: '✕';
    }

    .prevost_hero_side_rail {
        flex-direction: column;
    }

    .prevost_hero_content {
        padding: 40px 20px;
    }

    .prevost_sidebar_layout {
        flex-direction: column;
    }

    .prevost_sidebar_terminal {
        width: 100%;
        position: static;
    }

    .prevost_lobby_masonry {
        grid-template-columns: 1fr;
    }
}

/* footer-logo-contrast-guard-v2 */
a[href*="begambleaware.org"],
a[href*="gambleaware"] {
  background: #ffffff !important;
  color: #111111 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 0.7rem !important;
  box-sizing: border-box !important;
}

a[href*="begambleaware.org"] img,
a[href*="begambleaware.org"] picture,
a[href*="begambleaware.org"] .partner-logo,
img[src*="gambleaware"],
img[alt*="BeGambleAware" i],
img[alt*="GambleAware" i] {
  background: #ffffff !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 0.7rem !important;
  box-sizing: border-box !important;
}

a[href*="gamcare.org"] {
  background: #111111 !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 0.7rem !important;
  box-sizing: border-box !important;
}

a[href*="gamcare.org"] img,
a[href*="gamcare.org"] picture,
a[href*="gamcare.org"] .partner-logo,
img[src*="gamcare"],
img[alt*="GamCare" i] {
  background: #111111 !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 0.7rem !important;
  box-sizing: border-box !important;
}

/* social-game-layering-guard-v4 */
[data-home-live-game],
[data-game-card],
[data-slot-game],
[data-slot-stage],
[data-wheel-game],
[data-wheel-stage],
[data-mechanic],
[class*="game_wrapper"],
[class*="game-wrapper"],
[class*="game_board"],
[class*="game-board"],
[class*="slot_board"],
[class*="slot-board"],
[class*="roulette_board"],
[class*="roulette-board"] {
  position: relative !important;
  isolation: isolate !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

[class*="slot"][class*="frame"],
[class*="slot"][class*="bg"],
[class*="slot"][class*="background"],
img[class*="slot_frame"],
img[class*="slot-frame"],
img[class*="frame_img"],
img[class*="frame-img"],
[data-game-mechanic="slot"] [class*="game_visual"] > img:first-child,
[data-game-mechanic="slot"] [class*="game-visual"] > img:first-child,
[data-game-mechanic="slot"] img[class*="game_bg"],
[data-game-mechanic="slot"] img[class*="game-bg"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

[class*="roulette"][class*="wheel"] img,
img[class*="roulette"][class*="wheel"],
[data-wheel-img] {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transform-origin: center !important;
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%) !important;
  pointer-events: none !important;
}

[data-wheel-stage],
[data-wheel-game] [class*="wheel_stage"],
[data-wheel-game] [class*="wheel-stage"],
[class*="wheel_board"],
[class*="wheel-board"],
[class*="roulette_board"],
[class*="roulette-board"] {
  aspect-ratio: 1 / 1 !important;
  position: relative !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
}

[data-game-mechanic="slot"] [class*="game_visual"],
[data-game-mechanic="slot"] [class*="game-visual"] {
  min-height: clamp(260px, 42vw, 560px) !important;
  aspect-ratio: 4 / 3 !important;
  position: relative !important;
  overflow: hidden !important;
}

[data-slot-stage],
[data-slot-game] [class*="slot_stage"],
[data-slot-game] [class*="slot-stage"],
[data-game-mechanic="slot"] [class*="slot_board"],
[data-game-mechanic="slot"] [class*="slot-board"] {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  aspect-ratio: 16 / 7 !important;
  display: grid !important;
  align-items: center !important;
}

[data-slot-reel-window],
[data-slot-game] [class*="slot_reel_window"],
[data-slot-game] [class*="slot-reel-window"],
[data-slot-game] [class*="reel_window"],
[data-slot-game] [class*="reel-window"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: clamp(170px, 22vw, 320px) !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: clamp(0.55rem, 1.5vw, 1.2rem) !important;
  overflow: hidden !important;
  position: relative !important;
}

[class*="slot_reels"],
[class*="slot-reels"],
[class*="reels"],
[data-home-live-game] [data-reel-index] {
  position: absolute !important;
  left: 10% !important;
  right: 10% !important;
  top: 35% !important;
  bottom: 35% !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: clamp(0.45rem, 1.4vw, 1.1rem) !important;
  z-index: 60 !important;
  pointer-events: none !important;
}

[data-slot-symbol],
[class*="slot_symbol"],
[class*="slot-symbol"],
[class*="reel"] img,
[data-home-live-game] [data-reel-index] img {
  position: relative !important;
  z-index: 70 !important;
  display: block !important;
  width: clamp(72px, 62%, 170px) !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 88% !important;
  object-fit: contain !important;
}

[class*="slot_reel"]:not([class*="window"]),
[class*="slot-reel"]:not([class*="window"]),
[data-slot-reel],
[data-home-live-game] [data-reel-index] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: clamp(72px, 10vw, 150px) !important;
  background: rgba(2, 8, 18, 0.88) !important;
  border: 2px solid rgba(255,255,255,0.78) !important;
  border-radius: 0.85rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16), 0 0.9rem 1.8rem rgba(0,0,0,0.35) !important;
}

[class*="roulette"][class*="pointer"],
[class*="wheel"][class*="pointer"],
[data-wheel-pointer],
[data-home-live-game] [data-roulette-bet],
[data-home-live-game] [class*="game_ui"],
[data-home-live-game] [class*="game-ui"],
[data-home-live-game] [class*="game_controls"],
[data-home-live-game] [class*="game-controls"],
[data-home-live-game] [class*="bet"],
[data-home-live-game] [class*="result"],
[data-home-live-game] [class*="status"],
[data-home-live-game] button,
[data-home-live-game] select,
[data-home-live-game] input {
  position: relative !important;
  z-index: 90 !important;
}
