/* Hero subtitle row: small flags left/right of subtitle (index only) */
.hero-subtitle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-subtitle-row .hero-subtitle {
    margin-bottom: 0;
}

/* Вузькі екрани: колонка, один прапорець, текст на повну ширину — акуратний перенос */
@media (max-width: 480px) {
    .hero-subtitle-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-subtitle-row .country-flag--hero-subtitle:last-of-type {
        display: none;
    }

    .hero-subtitle-row .hero-subtitle {
        text-align: center;
        font-size: 0.95rem;
        line-height: 1.4;
    }
}

.country-flag--hero-subtitle {
    width: 24px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.hero-cta {
    margin-top: 20px;
}

/* ============================================
   STARTUP VIDEO OVERLAY
   ============================================ */

.startup-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    pointer-events: auto;
}

.startup-video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.startup-video-overlay.hidden::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
}

.startup-video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

#startupVideo {
    width: 400px;
    height: 400px;
    object-fit: cover;
}

/* Video Progress Indicator */
.video-progress-container {
    width: 400px;
    display: flex;
    justify-content: center;
}

.video-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(139, 92, 246, 0.2);
}

.video-progress-bar {
    position: relative;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
            #8B5CF6 0%,
            #3B82F6 25%,
            #06B6D4 50%,
            #EC4899 75%,
            #8B5CF6 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.05s ease-out;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
    animation: gradientFlow 2s linear infinite;
    will-change: width;
}

.video-progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: #FFFFFF;
    filter: blur(3px);
    opacity: 0.7;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.8);
}

@keyframes gradientFlow {
    0% {
        background-position: 100% 0%;
    }

    100% {
        background-position: -100% 0%;
    }
}

/* Mobile optimization */
@media (max-width: 767px) {
    #startupVideo {
        width: 90vw;
        max-width: 400px;
        height: 90vw;
        max-height: 400px;
    }

    .video-progress-container {
        width: 90vw;
        max-width: 400px;
    }
}

/* ============================================
   COLLAPSIBLE ADVICE SECTIONS
   ============================================ */

.advice-section {
    padding: 1.75rem 0 0.5rem;
}

.advice-toggle {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.85);
    padding: 0.75rem 1rem 0.9rem;
}

.advice-toggle[open] {
    background: rgba(15, 23, 42, 0.95);
}

.advice-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.advice-summary::-webkit-details-marker {
    display: none;
}

.advice-summary-chevron {
    flex-shrink: 0;
    color: rgba(226, 232, 240, 0.7);
    transition: transform 0.2s ease;
}

.advice-toggle[open] .advice-summary-chevron {
    transform: rotate(180deg);
}

.advice-summary-hint {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.5);
    margin-top: 0.15rem;
    text-align: center;
}

.advice-summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.advice-summary-content .section-title {
    margin-bottom: 0;
    text-align: center;
}

.advice-summary-text {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.8);
    text-align: center;
}

.advice-body {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.advice-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.9);
}

.advice-section--slots {
    padding-top: 2.25rem;
}

.advice-subtitle {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.35rem;
}

.advice-collapse-btn {
    margin-top: 0.75rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: transparent;
    color: #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ============================================
   TOP CASINOS / TOP SLOTS GRIDS
   ============================================ */

.top-section {
    padding: 2rem 0 2.5rem;
}

.top-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.top-section-header-text {
    flex: 1;
    min-width: 0;
}

.top-section-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.top-section-header-text .section-title {
    text-align: left;
    margin-bottom: 0;
}

/* Вузькі екрани: менше вертикального простору, кнопка під текстом */
@media (max-width: 576px) {
    .top-section-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .top-section-header-text {
        flex: 1 1 100%;
        min-width: 0;
    }

    .top-section-header-text .section-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .top-section-subtitle {
        margin: 0.2rem 0 0;
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .top-section-header .link-as-button {
        flex-shrink: 0;
    }
}

.country-flag--inline {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0 0 0.35em;
}

.link-as-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.8);
    font-size: 0.85rem;
    text-decoration: none;
    background: radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.22), transparent 55%);
    color: #facc15;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
    animation: linkButtonPulse 2.4s ease-in-out infinite;
}

.link-as-button::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 180deg, rgba(250, 204, 21, 0.0), rgba(250, 204, 21, 0.55), rgba(250, 204, 21, 0.0));
    opacity: 0;
    transform: translateX(-40%);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    pointer-events: none;
}

.link-as-button:hover,
.link-as-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.7);
    border-color: rgba(250, 250, 210, 0.95);
}

.link-as-button:hover::before,
.link-as-button:focus-visible::before {
    opacity: 1;
    transform: translateX(40%);
}

@keyframes linkButtonPulse {
    0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.3); }
    60% { box-shadow: 0 0 18px 3px rgba(250, 204, 21, 0.55); }
    100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.0); }
}

.top-grid {
    display: grid;
    gap: 1.25rem;
}

.top-grid--casinos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.top-grid--slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .top-grid--casinos,
    .top-grid--slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .top-grid--casinos,
    .top-grid--slots {
        grid-template-columns: minmax(0, 1fr);
    }
}

.top-card {
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.top-card--casino {
    min-height: 230px;
}

.top-card--slot {
    min-height: 260px;
}

.top-card-logo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.top-card-logo img {
    display: block;
    width: 200px;
    height: 120px;
    object-fit: contain;
    object-position: center;
    border-radius: 0.7rem;
    vertical-align: top;
}

.top-card-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(30, 64, 175, 0.6);
    font-weight: 600;
}

.top-card-content {
    flex: 1;
}

.top-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.top-card--slot .top-card-title {
    text-align: center;
}

.top-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.top-card-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.15);
    font-weight: 600;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.top-card-rating--clickable {
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(34, 197, 94, 0.7);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.top-card-rating:hover,
.top-card-rating--clickable:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.top-card-rating-chevron {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.75rem;
    transition: transform 0.18s ease;
}

.top-card-rating-chevron svg {
    vertical-align: middle;
}

.top-card-rating--clickable.is-open .top-card-rating-chevron {
    transform: rotate(180deg);
}

.top-card-rating-panel {
    margin-top: 0.4rem;
    padding: 0.5rem 0.55rem 0.6rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.98);
    display: none;
}

.top-card-rating-panel.is-open {
    display: block;
}

.rating-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.rating-panel-score {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.rating-panel-score-star {
    color: #facc15;
    font-size: 0.9rem;
}

.rating-panel-score-value {
    font-size: 0.95rem;
}

.rating-panel-score-out-of {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.9);
}

.rating-panel-summary {
    margin-left: auto;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.95);
    white-space: nowrap;
}

.rating-distribution {
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rating-distribution-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.rating-distribution-label {
    width: 2.4rem;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.95);
}

.rating-bar {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(30, 64, 175, 0.35);
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #a3e635);
    transition: width 0.25s ease-out;
}

.rating-distribution-count {
    width: 2.4rem;
    text-align: right;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.95);
}

.user-rating-row {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.user-rating-label {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.95);
}

.user-rating-stars {
    display: inline-flex;
    gap: 0.15rem;
}

.user-rating-star {
    border: none;
    padding: 0;
    background: transparent;
    color: rgba(148, 163, 184, 0.9);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 0.12s ease, color 0.12s ease;
}

.user-rating-star.is-active {
    color: #facc15;
}

.user-rating-star:hover {
    transform: scale(1.1);
}

.top-card-highlight {
    font-size: 1rem;
    font-weight: 500;
    color: #a855f7;
    text-align: center;
    margin: 10px 0;
}

.top-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.4rem;
}

.top-card--slot .top-card-meta {
    justify-content: center;
    text-align: center;
}

.top-card-meta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
}

.top-card-meta-badge--provider {
    color: #e5e7eb;
}

.top-card-meta-badge--type {
    color: rgba(191, 219, 254, 0.95);
    border-color: rgba(59, 130, 246, 0.7);
    background: rgba(30, 64, 175, 0.4);
}

.top-card-meta-badge--demo {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.8);
    background: rgba(22, 163, 74, 0.35);
}

.top-card-text {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.9);
}

.top-card-pros-line {
    font-size: 0.9rem;
    color: #4ade80;
    text-align: center;
}

.top-card-cons-line {
    font-size: 0.85rem;
    color: rgba(248, 113, 113, 0.5);
    text-align: center;
    margin: 10px 0;
}

.top-card-desc {
    margin: 0.5rem 0 0;
}

.top-card-desc-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
}

.top-card--casino .top-card-desc-text {
    width: 100%;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.85);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-align: justify;
}

.top-card--casino .top-card-desc-text.is-expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

.top-card-footer {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-empty-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
}

.btn-outline-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.8);
    font-size: 0.85rem;
    text-decoration: none;
    position: relative;
    background: radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.22), transparent 55%);
    color: #facc15;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.btn-outline-sm::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 180deg, rgba(250, 204, 21, 0.0), rgba(250, 204, 21, 0.55), rgba(250, 204, 21, 0.0));
    opacity: 0;
    transform: translateX(-40%);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    pointer-events: none;
}

.btn-outline-sm:hover,
.btn-outline-sm:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.7);
    border-color: rgba(250, 250, 210, 0.95);
}

.btn-outline-sm:hover::before,
.btn-outline-sm:focus-visible::before {
    opacity: 1;
    transform: translateX(40%);
}

.top-card-demo-label {
    font-size: 0.85rem;
}

.top-card-demo-label--on {
    color: #4ade80;
}

.top-card-demo-label--off {
    color: rgba(248, 113, 113, 0.9);
}

.top-card-image img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.top-card-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    border-radius: 0.75rem;
    background: rgba(30, 64, 175, 0.4);
    padding: 0.5rem;
    text-align: center;
}

/* ============================================
   HOME SLOT DEMO OVERLAY
   ============================================ */

.home-slot-demo-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
}

.home-slot-demo-overlay.is-visible {
    display: flex;
}

.home-slot-demo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
}

.home-slot-demo-dialog {
    position: relative;
    width: min(1000px, 96vw);
    height: min(650px, 90vh);
    background: rgba(15, 23, 42, 1);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 0.75rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.8);
}

.home-slot-demo-close {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 1.4rem;
    cursor: pointer;
}

.home-slot-demo-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 2rem 0.35rem 0.25rem;
}

#homeSlotDemoIframe {
    flex: 1;
    border: none;
    border-radius: 0.75rem;
    width: 100%;
}

/* ============================================
   CHOOSE GAMES CAROUSEL INSIDE ADVICE
   ============================================ */

.choose-games-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem;
    scroll-snap-type: x mandatory;
}

.choose-games-card {
    scroll-snap-align: start;
    flex: 0 0 100%;
}

@media (min-width: 768px) {
    .choose-games-card {
        flex: 0 0 calc(50% - 0.6rem);
    }
}

.choose-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.choose-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.choose-carousel-dot.is-active {
    background: #facc15;
    transform: scale(1.15);
}

.choose-carousel-dot:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 2px;
}

