/* =================================
   CANADIAN GAMES - UNIQUE STYLE
   Theme: Canadian Maple & Northern Lights
   Architecture: BEM Methodology
   ================================= */

/* =================================
   CSS VARIABLES - CANADIAN THEME
   ================================= */
:root {
    /* Primary Colors - Canadian Red & White */
    --cg-primary-red: #DC143C;
    --cg-primary-white: #FFFFFF;
    --cg-accent-blue: #000080;
    --cg-accent-gold: #FFD700;
    
    /* Neutral Colors */
    --cg-dark-bg: #0A0E27;
    --cg-light-bg: #1A1F3A;
    --cg-card-bg: #252A47;
    --cg-text-primary: #FFFFFF;
    --cg-text-secondary: #B0B8D3;
    --cg-border-color: #2A3B5A;
    
    /* Effects */
    --cg-glow-red: rgba(220, 20, 60, 0.4);
    --cg-glow-blue: rgba(0, 0, 128, 0.4);
    --cg-shadow-primary: 0 4px 20px rgba(220, 20, 60, 0.3);
    --cg-shadow-secondary: 0 8px 30px rgba(0, 0, 128, 0.3);
    
    /* Spacing */
    --cg-spacing-xs: 0.5rem;
    --cg-spacing-sm: 1rem;
    --cg-spacing-md: 1.5rem;
    --cg-spacing-lg: 2rem;
    --cg-spacing-xl: 3rem;
    --cg-spacing-xxl: 4rem;
    
    /* Typography */
    --cg-font-primary: 'Georgia', 'Times New Roman', serif;
    --cg-font-secondary: 'Arial', 'Helvetica', sans-serif;
    
    /* Border Radius */
    --cg-radius-sm: 4px;
    --cg-radius-md: 8px;
    --cg-radius-lg: 12px;
    --cg-radius-xl: 16px;
    
    /* Transitions */
    --cg-transition-fast: 0.2s ease;
    --cg-transition-normal: 0.3s ease;
    --cg-transition-slow: 0.5s ease;
}

/* =================================
   RESET & BASE STYLES
   ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--cg-font-secondary);
    color: var(--cg-text-primary);
    background: var(--cg-dark-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* =================================
   UTILITY CLASSES
   ================================= */
.cg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--cg-spacing-md);
}

.cg-section {
    padding: var(--cg-spacing-xxl) 0;
}

.cg-heading {
    font-family: var(--cg-font-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: var(--cg-spacing-lg);
    color: var(--cg-text-primary);
    font-weight: bold;
}

.cg-heading--centered {
    text-align: center;
}

/* =================================
   BUTTONS
   ================================= */
.cg-btn {
    display: inline-block;
    padding: var(--cg-spacing-sm) var(--cg-spacing-lg);
    border: none;
    border-radius: var(--cg-radius-md);
    font-family: var(--cg-font-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cg-transition-normal);
    text-align: center;
    white-space: nowrap;
}

.cg-btn--primary {
    background: linear-gradient(135deg, var(--cg-primary-red), #B81134);
    color: var(--cg-primary-white);
    box-shadow: var(--cg-shadow-primary);
}

.cg-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--cg-glow-red);
}

.cg-btn--play {
    background: linear-gradient(135deg, var(--cg-accent-gold), #FFC700);
    color: var(--cg-dark-bg);
    font-weight: 700;
    padding: var(--cg-spacing-md) var(--cg-spacing-lg);
    box-shadow: var(--cg-shadow-secondary);
}

.cg-btn--play:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

/* =================================
   HEADER & NAVIGATION
   ================================= */
.cg-header {
    background: linear-gradient(180deg, var(--cg-dark-bg), var(--cg-light-bg));
    border-bottom: 2px solid var(--cg-border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.cg-nav__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--cg-spacing-md) var(--cg-spacing-md);
}

.cg-logo {
    display: flex;
    align-items: center;
    gap: var(--cg-spacing-sm);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--cg-text-primary);
}

.cg-logo svg {
    width: 40px;
    height: 40px;
}

.cg-logo__text {
    background: linear-gradient(135deg, var(--cg-primary-red), var(--cg-accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cg-nav__menu {
    display: flex;
    gap: var(--cg-spacing-lg);
}

.cg-nav__link {
    padding: var(--cg-spacing-xs) var(--cg-spacing-sm);
    border-radius: var(--cg-radius-sm);
    transition: var(--cg-transition-fast);
    position: relative;
}

.cg-nav__link:hover {
    color: var(--cg-primary-red);
}

.cg-nav__link--active {
    color: var(--cg-primary-red);
}

.cg-nav__link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cg-primary-red);
}

/* =================================
   BURGER MENU
   ================================= */
.cg-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--cg-spacing-xs);
}

.cg-burger__line {
    width: 25px;
    height: 3px;
    background: var(--cg-text-primary);
    border-radius: 3px;
    transition: var(--cg-transition-fast);
}

.cg-burger--active .cg-burger__line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.cg-burger--active .cg-burger__line:nth-child(2) {
    opacity: 0;
}

.cg-burger--active .cg-burger__line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* =================================
   HERO SECTION
   ================================= */
.cg-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cg-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    filter: blur(2px);
}

.cg-hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--cg-spacing-xl);
    max-width: 800px;
}

.cg-hero__title {
    font-family: var(--cg-font-primary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--cg-spacing-md);
    background: linear-gradient(135deg, var(--cg-primary-red), var(--cg-accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cg-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--cg-text-secondary);
    margin-bottom: var(--cg-spacing-xl);
}

/* =================================
   POPULAR GAMES SECTION
   ================================= */
.cg-section--games {
    background: var(--cg-light-bg);
}

.cg-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--cg-spacing-lg);
    margin-top: var(--cg-spacing-xl);
}

.cg-game-card {
    background: var(--cg-card-bg);
    border-radius: var(--cg-radius-lg);
    overflow: hidden;
    transition: var(--cg-transition-normal);
    border: 1px solid var(--cg-border-color);
}

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

.cg-game-card__image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

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

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

.cg-game-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--cg-transition-normal);
}

.cg-game-card:hover .cg-game-card__overlay {
    opacity: 1;
}

.cg-game-card__content {
    padding: var(--cg-spacing-md);
}

.cg-game-card__title {
    font-family: var(--cg-font-primary);
    font-size: 1.3rem;
    margin-bottom: var(--cg-spacing-xs);
    color: var(--cg-primary-red);
}

.cg-game-card__theme {
    font-size: 0.9rem;
    color: var(--cg-accent-gold);
    margin-bottom: var(--cg-spacing-xs);
    font-style: italic;
}

.cg-game-card__description {
    color: var(--cg-text-secondary);
    line-height: 1.6;
}

/* =================================
   FEATURED SECTION
   ================================= */
.cg-section--featured {
    background: linear-gradient(135deg, var(--cg-dark-bg), var(--cg-light-bg));
}

.cg-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cg-spacing-xl);
    align-items: center;
    background: var(--cg-card-bg);
    padding: var(--cg-spacing-xl);
    border-radius: var(--cg-radius-xl);
    border: 2px solid var(--cg-border-color);
}

.cg-featured__image img {
    width: 100%;
    border-radius: var(--cg-radius-md);
}

.cg-featured__badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--cg-accent-gold), var(--cg-primary-red));
    color: var(--cg-dark-bg);
    padding: var(--cg-spacing-xs) var(--cg-spacing-md);
    border-radius: var(--cg-radius-sm);
    font-weight: 700;
    margin-bottom: var(--cg-spacing-md);
}

.cg-featured__description {
    color: var(--cg-text-secondary);
    margin-bottom: var(--cg-spacing-md);
}

/* =================================
   CHARACTERS SECTION
   ================================= */
.cg-section--characters {
    background: var(--cg-light-bg);
}

.cg-character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--cg-spacing-lg);
    margin-top: var(--cg-spacing-xl);
}

.cg-character-card {
    background: var(--cg-card-bg);
    border-radius: var(--cg-radius-lg);
    padding: var(--cg-spacing-md);
    text-align: center;
    transition: var(--cg-transition-normal);
    border: 1px solid var(--cg-border-color);
}

.cg-character-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cg-shadow-secondary);
    border-color: var(--cg-accent-blue);
}

.cg-character-card__image {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--cg-spacing-md);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--cg-primary-red);
}

.cg-character-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cg-character-card__title {
    font-family: var(--cg-font-primary);
    font-size: 1.2rem;
    color: var(--cg-primary-red);
    margin-bottom: var(--cg-spacing-xs);
}

.cg-character-card__game {
    font-size: 0.85rem;
    color: var(--cg-accent-gold);
    margin-bottom: var(--cg-spacing-sm);
    font-style: italic;
}

.cg-character-card__description {
    color: var(--cg-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =================================
   SURVEY SECTION
   ================================= */
.cg-section--survey {
    background: linear-gradient(135deg, var(--cg-dark-bg), #0F1629);
}

.cg-survey__subtitle {
    text-align: center;
    color: var(--cg-text-secondary);
    margin-bottom: var(--cg-spacing-xl);
    font-size: 1.1rem;
}

.cg-survey__content {
    max-width: 800px;
    margin: 0 auto;
}

.cg-survey-question {
    background: var(--cg-card-bg);
    padding: var(--cg-spacing-lg);
    border-radius: var(--cg-radius-lg);
    margin-bottom: var(--cg-spacing-md);
    border: 1px solid var(--cg-border-color);
}

.cg-survey-question__text {
    font-weight: 600;
    margin-bottom: var(--cg-spacing-md);
    color: var(--cg-text-primary);
    font-size: 1.1rem;
}

.cg-survey-answers {
    display: flex;
    flex-direction: column;
    gap: var(--cg-spacing-xs);
}

.cg-survey-answer {
    padding: var(--cg-spacing-sm);
    background: var(--cg-light-bg);
    border-radius: var(--cg-radius-sm);
    border: 1px solid var(--cg-border-color);
    transition: var(--cg-transition-fast);
    cursor: pointer;
}

.cg-survey-answer:hover {
    background: var(--cg-card-bg);
    border-color: var(--cg-primary-red);
}

.cg-survey-answer--correct {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.1), transparent);
    border-color: var(--cg-primary-red);
    font-weight: 600;
}

/* =================================
   REVIEWS SECTION
   ================================= */
.cg-section--reviews {
    background: var(--cg-light-bg);
}

.cg-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--cg-spacing-md);
    margin-top: var(--cg-spacing-xl);
}

.cg-review-card {
    background: var(--cg-card-bg);
    padding: var(--cg-spacing-lg);
    border-radius: var(--cg-radius-md);
    border-left: 4px solid var(--cg-accent-gold);
    transition: var(--cg-transition-normal);
}

.cg-review-card:hover {
    transform: translateX(5px);
    box-shadow: var(--cg-shadow-primary);
}

.cg-review-card__text {
    color: var(--cg-text-secondary);
    font-style: italic;
    line-height: 1.6;
}

/* =================================
   FOOTER
   ================================= */
.cg-footer {
    background: var(--cg-dark-bg);
    border-top: 2px solid var(--cg-border-color);
    padding: var(--cg-spacing-xl) 0;
    margin-top: var(--cg-spacing-xxl);
}

.cg-footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--cg-spacing-lg);
    margin-bottom: var(--cg-spacing-lg);
}

.cg-footer__title {
    font-family: var(--cg-font-primary);
    font-size: 1.5rem;
    color: var(--cg-primary-red);
    margin-bottom: var(--cg-spacing-sm);
}

.cg-footer__subtitle {
    font-size: 1.1rem;
    color: var(--cg-accent-gold);
    margin-bottom: var(--cg-spacing-sm);
}

.cg-footer__text {
    color: var(--cg-text-secondary);
    margin-bottom: var(--cg-spacing-xs);
    font-size: 0.9rem;
}

.cg-footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--cg-spacing-xs);
}

.cg-footer__links a {
    color: var(--cg-text-secondary);
    transition: var(--cg-transition-fast);
}

.cg-footer__links a:hover {
    color: var(--cg-primary-red);
    padding-left: 5px;
}

.cg-footer__compliance {
    display: flex;
    flex-direction: column;
    gap: var(--cg-spacing-sm);
}

.cg-footer__logo {
    height: 50px;
    background: var(--cg-primary-white);
    padding: var(--cg-spacing-sm);
    border-radius: var(--cg-radius-sm);
    transition: var(--cg-transition-normal);
}

.cg-footer__logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.cg-footer__bottom {
    border-top: 1px solid var(--cg-border-color);
    padding-top: var(--cg-spacing-lg);
    text-align: center;
}

.cg-footer__disclaimer {
    color: var(--cg-text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--cg-spacing-sm);
}

.cg-footer__copyright {
    color: var(--cg-accent-gold);
    font-weight: 600;
    margin-bottom: var(--cg-spacing-xs);
}

.cg-footer__info {
    color: var(--cg-text-secondary);
    font-size: 0.85rem;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 768px) {
    .cg-nav__menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--cg-dark-bg);
        flex-direction: column;
        align-items: center;
        padding-top: var(--cg-spacing-xl);
        transition: var(--cg-transition-normal);
        z-index: 999;
    }

    .cg-nav__menu.cg-nav__menu--active {
        left: 0;
    }

    .cg-burger {
        display: flex;
    }

    .cg-featured {
        grid-template-columns: 1fr;
        padding: var(--cg-spacing-md);
    }

    .cg-hero__title {
        font-size: 2rem;
    }

    .cg-game-grid {
        grid-template-columns: 1fr;
    }

    .cg-character-grid {
        grid-template-columns: 1fr;
    }

    .cg-review-grid {
        grid-template-columns: 1fr;
    }

    .cg-footer__content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cg-container {
        padding: 0 var(--cg-spacing-sm);
    }

    .cg-section {
        padding: var(--cg-spacing-lg) 0;
    }

    .cg-hero__content {
        padding: var(--cg-spacing-md);
    }

    .cg-btn {
        padding: var(--cg-spacing-sm) var(--cg-spacing-md);
        font-size: 0.9rem;
    }
}

/* =================================
   POPUP MODAL
   ================================= */
.cg-popup {
    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: 10000;
    backdrop-filter: blur(5px);
}

.cg-popup__content {
    background: var(--cg-card-bg);
    padding: var(--cg-spacing-xl);
    border-radius: var(--cg-radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 2px solid var(--cg-primary-red);
    box-shadow: var(--cg-shadow-primary);
    animation: cg-popup-fadein 0.3s ease;
}

.cg-popup__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--cg-primary-red), #B81134);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--cg-spacing-md);
    font-size: 3rem;
    color: var(--cg-primary-white);
    font-weight: bold;
    animation: cg-popup-scale 0.5s ease;
}

.cg-popup__title {
    font-family: var(--cg-font-primary);
    font-size: 2rem;
    color: var(--cg-primary-red);
    margin-bottom: var(--cg-spacing-sm);
}

.cg-popup__message {
    color: var(--cg-text-secondary);
    margin-bottom: var(--cg-spacing-lg);
    font-size: 1.1rem;
}

@keyframes cg-popup-fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cg-popup-scale {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* =================================
   PRINT STYLES
   ================================= */
@media print {
    .cg-header,
    .cg-footer,
    .cg-btn,
    .cg-burger {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

