/* ============================================
   DoCaste — Social Casino
   Stylistic: #15 Геймификация
   Palette: Purple #6c5ce7, Yellow #ffd93d
   Fonts: Fredoka (headings), Quicksand (body)
   ============================================ */

/* 1. CSS Variables (:root) */
:root {
    /* Colors */
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --secondary: #ffd93d;
    --secondary-dark: #f0c929;
    --accent: #fd79a8;
    --accent-alt: #00cec9;
    --success: #00b894;
    --danger: #d63031;
    --warning: #fdcb6e;

    /* Backgrounds */
    --bg-dark: #1a1147;
    --bg-darker: #120d33;
    --bg-card: #241a5e;
    --bg-card-hover: #2d2170;
    --bg-section-alt: #1e1452;
    --bg-input: #2d2170;

    /* Text */
    --text-primary: #f0eeff;
    --text-secondary: #b8b0e0;
    --text-muted: #8a80b8;
    --text-on-primary: #ffffff;
    --text-on-secondary: #1a1147;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-round: 50%;

    /* Header */
    --header-height: 70px;

    /* Fonts */
    --font-body: 'Quicksand', sans-serif;
    --font-heading: 'Fredoka', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.15);
    --shadow-md: 0 4px 16px rgba(108, 92, 231, 0.2);
    --shadow-lg: 0 8px 32px rgba(108, 92, 231, 0.25);
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.4);
    --shadow-gold: 0 0 20px rgba(255, 217, 61, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 2. Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-weight: 500;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

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

input {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

strong {
    font-weight: 700;
    color: var(--text-primary);
}

em {
    font-style: italic;
}

/* 4. Container */
.m-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.m-container--narrow {
    max-width: 800px;
}

/* 5. Header */
.m-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(18, 13, 51, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    z-index: 1000;
    transition: background var(--transition-normal);
}

.m-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-shadow: 0 0 12px rgba(255, 217, 61, 0.4);
    letter-spacing: -0.5px;
    transition: text-shadow var(--transition-normal);
}

.logo:hover {
    text-shadow: 0 0 24px rgba(255, 217, 61, 0.6);
    color: var(--secondary);
}

.m-header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.m-header__link {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: var(--space-sm) 0;
    position: relative;
    transition: color var(--transition-fast);
}

.m-header__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.m-header__link:hover,
.m-header__link.is-active {
    color: var(--secondary);
}

.m-header__link.is-active::after,
.m-header__link:hover::after {
    width: 100%;
}

.m-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Burger */
.m-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.m-header__burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--transition-normal), opacity var(--transition-fast);
}

.m-header__burger.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.m-header__burger.is-open span:nth-child(2) {
    opacity: 0;
}

.m-header__burger.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* 6. Mobile Menu */
.m-header__mobile {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-darker);
    z-index: 999;
    padding: var(--space-xl);
    overflow-y: auto;
}

.m-header__mobile.is-open {
    display: block;
}

.m-header__mobile-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.m-header__mobile-link {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(108, 92, 231, 0.15);
    transition: color var(--transition-fast);
}

.m-header__mobile-link:hover,
.m-header__mobile-link.is-active {
    color: var(--secondary);
}

.m-header__mobile-btn {
    margin-top: var(--space-md);
    width: 100%;
}

/* 7. Buttons */
.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.m-btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.m-btn--primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.m-btn--secondary {
    background: transparent;
    color: var(--secondary);
    border-color: var(--secondary);
}

.m-btn--secondary:hover {
    background: var(--secondary);
    color: var(--text-on-secondary);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

/* 8. Main Content */
.m-main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* 9. Hero Section */
.m-hero {
    position: relative;
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #2d1b69 100%);
    overflow: hidden;
}

.m-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.m-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 217, 61, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.m-hero .m-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    z-index: 1;
}

.m-hero__content {
    max-width: 600px;
}

.m-hero__title {
    font-size: 3.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--secondary), #ffe680);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.m-hero__subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
}

.m-hero__text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.m-hero__cta {
    font-size: 1.15rem;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--text-on-secondary);
    border-color: var(--secondary);
    box-shadow: var(--shadow-gold);
}

.m-hero__cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(255, 217, 61, 0.5);
}

.m-hero__visual {
    position: relative;
    flex-shrink: 0;
}

.m-hero__badge {
    font-size: 6rem;
    animation: heroBadgePulse 3s ease-in-out infinite;
}

@keyframes heroBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.m-hero__xp-float {
    position: absolute;
    top: -10px;
    right: -20px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    background: var(--bg-card);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    border: 2px solid var(--secondary);
    animation: xpFloat 2.5s ease-in-out infinite;
    box-shadow: var(--shadow-gold);
}

@keyframes xpFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Hero Small */
.m-hero--small {
    padding: var(--space-2xl) 0;
}

.m-hero--small .m-hero__title {
    font-size: 2.25rem;
}

.m-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    position: relative;
    z-index: 1;
}

.m-hero__auth-buttons {
    display: flex;
    gap: var(--space-md);
}

/* Hero 404 */
.m-hero--404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.m-hero__container {
    position: relative;
    z-index: 1;
}

.m-hero__title--404 {
    font-size: 8rem;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

/* 10. Sections */
.m-section {
    padding: var(--space-3xl) 0;
}

.m-section--page-top {
    padding-top: var(--space-2xl);
}

.m-section__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.m-section__title--mt {
    margin-top: var(--space-3xl);
}

.m-section__subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.m-section__provider-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary-light);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    text-align: center;
}

.m-section__cta-wrap {
    text-align: center;
    margin-top: var(--space-2xl);
}

.m-section--benefits {
    background: var(--bg-section-alt);
}

.m-section--featured {
    background: var(--bg-dark);
}

.m-section--faq {
    background: var(--bg-section-alt);
}

.m-section--disclaimer {
    padding: var(--space-xl) 0;
}

.m-section--games {
    background: var(--bg-dark);
}

.m-section--unlock {
    padding: var(--space-lg) 0 0;
}

/* 11. Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.benefit-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    border: 1px solid rgba(108, 92, 231, 0.2);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.benefit-card:hover::before {
    opacity: 1;
}

.benefit-card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.benefit-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.benefit-card__text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* 12. Featured Providers / Games Grid Featured */
.games-grid--featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

/* 13. Games Grid */
.games-grid--full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* 14. Game Tile / Game Card */
.game-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid rgba(108, 92, 231, 0.15);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.game-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.game-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.game-card:hover .game-card__image img {
    transform: scale(1.05);
}

.game-card__play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 17, 71, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.game-card:hover .game-card__play-overlay {
    opacity: 1;
}

.game-card__play-btn {
    width: 56px;
    height: 56px;
    background: var(--secondary);
    color: var(--text-on-secondary);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-gold);
    transition: transform var(--transition-fast);
}

.game-card:hover .game-card__play-btn {
    transform: scale(1.1);
}

.game-card__info {
    padding: var(--space-sm) var(--space-md);
}

.game-card__title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card__provider {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* 15. Game Tile Locked */
.game-card--locked .game-card__image img {
    filter: blur(4px) grayscale(50%);
    opacity: 0.6;
}

.game-card__lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 13, 51, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    z-index: 2;
}

.game-card__lock-icon {
    font-size: 2rem;
}

.game-card__lock-text {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
}

/* 16. Provider Section */
.provider-section {
    margin-bottom: var(--space-2xl);
}

.provider-section__title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(108, 92, 231, 0.2);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.provider-section__count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

/* 17. Filter */
.provider-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    justify-content: center;
}

.provider-filter__btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.provider-filter__btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.provider-filter__btn.is-active {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* 18. Unlock Banner */
.unlock-banner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-card), #2d1b69);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    border: 2px solid var(--secondary);
    box-shadow: var(--shadow-gold);
}

.unlock-banner__icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.unlock-banner__text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.unlock-banner__text strong {
    color: var(--secondary);
}

.unlock-banner__btn {
    flex-shrink: 0;
}

/* 19. FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(108, 92, 231, 0.15);
    overflow: hidden;
    transition: border-color var(--transition-normal);
}

.faq-item.is-open {
    border-color: var(--primary);
}

.faq-item__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: color var(--transition-fast);
}

.faq-item__question:hover {
    color: var(--secondary);
}

.faq-item__icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-light);
    transition: transform var(--transition-normal);
    flex-shrink: 0;
    margin-left: var(--space-md);
}

.faq-item.is-open .faq-item__icon {
    transform: rotate(45deg);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition-normal);
}

.faq-item.is-open .faq-item__answer {
    max-height: 500px;
    padding: 0 var(--space-lg) var(--space-lg);
}

.faq-item__answer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

/* 20. Disclaimer */
.disclaimer-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border-left: 4px solid var(--warning);
}

.disclaimer-box__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

.disclaimer-box__text a {
    color: var(--secondary);
    text-decoration: underline;
}

.disclaimer-box__text a:hover {
    color: var(--primary-light);
}

/* 21. Footer */
.footer {
    background: var(--bg-darker);
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid rgba(108, 92, 231, 0.15);
}

.footer__content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-block;
    margin-bottom: var(--space-md);
}

.footer__description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer__heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer__column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__link {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
    padding: 2px 0;
}

.footer__link:hover {
    color: var(--secondary);
}

.footer__bottom {
    border-top: 1px solid rgba(108, 92, 231, 0.15);
    padding-top: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer__compliance {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer__compliance-logo {
    height: 32px;
    width: auto;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.footer__compliance-logo:hover {
    opacity: 1;
}

.footer__compliance-logo--light-bg {
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.footer__age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--danger);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--radius-round);
}

.footer__copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer__copyright p {
    margin-bottom: 0;
    color: var(--text-muted);
}

/* 22. Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal__overlay--game {
    padding: var(--space-md);
}

.modal__content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(108, 92, 231, 0.3);
    z-index: 1;
}

.modal__content--game {
    max-width: 960px;
    padding: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.modal__content--auth {
    max-width: 440px;
}

.modal__content--bonus {
    max-width: 400px;
    text-align: center;
}

.modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: var(--bg-darker);
    border-radius: var(--radius-round);
    z-index: 10;
    transition: all var(--transition-fast);
}

.modal__close:hover {
    color: var(--text-primary);
    background: var(--primary);
}

.modal__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: var(--space-md);
}

.modal__text {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.modal__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.modal__game-container {
    width: 100%;
    height: 100%;
}

.modal__game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 23. Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid rgba(108, 92, 231, 0.3);
    padding: var(--space-lg);
    z-index: 1500;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.cookie-consent__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.cookie-consent__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    flex: 1;
}

.cookie-consent__btn {
    flex-shrink: 0;
}

/* 24. Auth Forms */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.auth-tabs__btn {
    flex: 1;
    padding: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--bg-darker);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.auth-tabs__btn.is-active {
    background: var(--primary);
    color: var(--text-on-primary);
}

.auth-form__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.auth-form__group {
    margin-bottom: var(--space-md);
}

.auth-form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.auth-form__input {
    width: 100%;
    padding: 12px var(--space-md);
    background: var(--bg-input);
    color: var(--text-primary);
    border: 2px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.auth-form__input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.auth-form__input::placeholder {
    color: var(--text-muted);
}

.auth-form__error {
    background: rgba(214, 48, 49, 0.15);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.85rem;
    color: #ff7675;
}

.auth-form__submit {
    width: 100%;
    margin-top: var(--space-sm);
}

/* 25. Account Page */
.m-page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.m-page-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
}

.account-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.account-auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.account-auth-card__title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    text-align: center;
    color: var(--secondary);
}

.account-benefits {
    margin-top: var(--space-2xl);
}

.account-benefits__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.account-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.account-benefits__item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(108, 92, 231, 0.15);
}

.account-benefits__icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.account-benefits__item h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.account-benefits__item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* 26. Profile */
.account-profile {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.account-profile__header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.account-profile__level-badge {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.account-profile__name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.account-profile__email {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* 27. XP Progress */
.account-profile__xp-section {
    margin-bottom: var(--space-xl);
}

.account-profile__xp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.account-profile__xp-bar {
    height: 14px;
    background: var(--bg-darker);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.account-profile__xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 7px;
    transition: width 0.8s ease;
    position: relative;
}

.account-profile__xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: xpShine 2s ease-in-out infinite;
}

@keyframes xpShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 28. Stats */
.account-profile__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.account-profile__stat {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-darker);
    border-radius: var(--radius-md);
}

.account-profile__stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 2px;
}

.account-profile__stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.account-profile__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* Daily Bonus */
.daily-bonus__icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.daily-bonus__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: var(--space-sm);
}

.daily-bonus__text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.daily-bonus__amount {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 16px rgba(255, 217, 61, 0.5);
}

/* 29. Content Pages */
.m-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.m-breadcrumb__link {
    color: var(--primary-light);
    transition: color var(--transition-fast);
}

.m-breadcrumb__link:hover {
    color: var(--secondary);
}

.m-breadcrumb__sep {
    color: var(--text-muted);
}

.m-breadcrumb__current {
    color: var(--text-muted);
}

.m-content-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid rgba(108, 92, 231, 0.15);
}

.m-content-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--secondary);
}

.m-content-card h2:first-child {
    margin-top: 0;
}

.m-content-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--primary-light);
}

.m-content-card p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.m-content-card ul,
.m-content-card ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
}

.m-content-card ul {
    list-style: disc;
}

.m-content-card ol {
    list-style: decimal;
}

.m-content-card li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xs);
}

.m-content-card a {
    color: var(--primary-light);
    text-decoration: underline;
}

.m-content-card a:hover {
    color: var(--secondary);
}

.m-content-card__cta {
    margin-top: var(--space-2xl);
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.m-content-card__cta p {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.m-content-card__cta .m-btn {
    text-decoration: none;
}

.m-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.m-table th,
.m-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid rgba(108, 92, 231, 0.15);
}

.m-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--secondary);
    background: var(--bg-darker);
}

.m-table td {
    color: var(--text-secondary);
}

.m-table tr:hover td {
    background: rgba(108, 92, 231, 0.05);
}

/* Responsible Gaming */
.responsible-facts {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.responsible-fact {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-darker);
    border-radius: var(--radius-md);
}

.responsible-fact__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.responsible-fact p {
    margin-bottom: 0;
}

.responsible-age {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.responsible-age__badge {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: var(--radius-round);
    flex-shrink: 0;
}

.responsible-age p {
    margin-bottom: 0;
}

.responsible-help {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.responsible-help__item {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.responsible-help__item strong {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-light);
}

.responsible-help__item p {
    flex: 1;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.responsible-help__item .m-btn {
    text-decoration: none;
    margin-top: auto;
}

/* Review Hero */
.review-hero {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.review-hero__rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.review-hero__score {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.review-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.review-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.review-game-tile {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-align: center;
}

.review-game-tile img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.review-game-tile span {
    display: block;
    padding: var(--space-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 30. Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.article-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(108, 92, 231, 0.15);
    transition: all var(--transition-normal);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.article-card__content {
    padding: var(--space-xl);
}

.article-card__category {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary);
    background: rgba(255, 217, 61, 0.12);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.5px;
}

.article-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    line-height: 1.3;
}

.article-card__excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.article-card__read-more {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    transition: color var(--transition-fast);
}

.article-card:hover .article-card__read-more {
    color: var(--secondary);
}

.article-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* 31. Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.review-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(108, 92, 231, 0.15);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.review-card__header {
    margin-bottom: var(--space-md);
}

.review-card__title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.review-card__rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.stars {
    color: #ffc107;
}

.review-card__score {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary);
}

.review-card__description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
}

.review-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.review-card__stat {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-darker);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.review-card__btn {
    width: 100%;
    text-align: center;
    text-decoration: none;
}

/* 32. Utility Classes */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.hidden {
    display: none !important;
}

/* 33. Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .m-header__nav {
        display: none;
    }

    .m-header__burger {
        display: flex;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .account-benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer__links {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .responsible-help {
        grid-template-columns: 1fr;
    }

    .review-games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .m-hero .m-container {
        flex-direction: column;
        text-align: center;
    }

    .m-hero__title {
        font-size: 2.25rem;
    }

    .m-hero__title--404 {
        font-size: 5rem;
    }

    .m-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .m-hero__auth-buttons {
        justify-content: center;
    }

    .games-grid--full {
        grid-template-columns: repeat(2, 1fr);
    }

    .games-grid--featured {
        max-width: 100%;
        gap: 12px;
    }

    .account-auth-grid {
        grid-template-columns: 1fr;
    }

    .account-profile__stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .account-profile__actions {
        flex-direction: column;
    }

    .unlock-banner {
        flex-direction: column;
        text-align: center;
    }

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

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

    .footer__links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer__compliance {
        justify-content: center;
    }

    .cookie-consent__content {
        flex-direction: column;
        text-align: center;
    }

    .m-content-card {
        padding: var(--space-lg);
    }

    .account-profile {
        padding: var(--space-lg);
    }

    .review-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .provider-filter {
        gap: var(--space-xs);
    }

    .provider-filter__btn {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .modal__content {
        padding: var(--space-lg);
        margin: var(--space-md);
    }

    .modal__content--game {
        padding: 0;
        margin: var(--space-sm);
    }

    .m-page-title {
        font-size: 1.5rem;
    }

    .m-table {
        font-size: 0.8rem;
    }

    .m-table th,
    .m-table td {
        padding: var(--space-xs) var(--space-sm);
    }
}

@media (max-width: 480px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .account-benefits__grid {
        grid-template-columns: 1fr;
    }

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

    .account-profile__stats {
        grid-template-columns: 1fr;
    }

    .account-profile__header {
        flex-direction: column;
        text-align: center;
    }

    .m-hero__title {
        font-size: 1.75rem;
    }

    .review-hero__meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
}