:root {
    /* NustarGame color palette */
    --vf91-primary: #8FBC8F;
    --vf91-secondary: #98FB98;
    --vf91-accent: #90EE90;
    --vf91-dark: #333333;
    --vf91-light: #f8f9fa;
    --vf91-white: #ffffff;
    --vf91-black: #000000;
    --vf91-gray: #6c757d;
    --vf91-gray-light: #dee2e6;
    --vf91-success: #28a745;
    --vf91-warning: #ffc107;
    --vf91-danger: #dc3545;

    /* Spacing variables */
    --vf91-spacing-xs: 0.25rem;
    --vf91-spacing-sm: 0.5rem;
    --vf91-spacing-md: 1rem;
    --vf91-spacing-lg: 1.5rem;
    --vf91-spacing-xl: 2rem;
    --vf91-spacing-xxl: 3rem;

    /* Typography variables */
    --vf91-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --vf91-font-size-base: 1.6rem;
    --vf91-font-size-sm: 1.4rem;
    --vf91-font-size-lg: 1.8rem;
    --vf91-font-size-xl: 2.2rem;
    --vf91-font-size-xxl: 2.8rem;
    --vf91-line-height: 1.5;

    /* Border radius */
    --vf91-border-radius: 0.5rem;
    --vf91-border-radius-sm: 0.25rem;
    --vf91-border-radius-lg: 1rem;

    /* Shadows */
    --vf91-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --vf91-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
    --vf91-shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --vf91-transition: all 0.3s ease;
    --vf91-transition-fast: all 0.15s ease;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* Base font size for easy rem calculations */
    scroll-behavior: smooth;
}

body {
    font-family: var(--vf91-font-family);
    font-size: var(--vf91-font-size-base);
    line-height: var(--vf91-line-height);
    color: var(--vf91-light);
    background-color: var(--vf91-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container and wrapper */
.vf91-container {
    max-width: 430px; /* Mobile-first design */
    margin: 0 auto;
    padding: 0 var(--vf91-spacing-md);
}

.vf91-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.vf91-main {
    flex: 1;
    padding-top: 6rem; /* Account for fixed header */
    padding-bottom: 8rem; /* Account for fixed bottom nav on mobile */
}

/* Grid system */
.vf91-grid {
    display: grid;
    gap: var(--vf91-spacing-md);
}

.vf91-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.vf91-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.vf91-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Header */
.vf91-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--vf91-primary), var(--vf91-secondary));
    box-shadow: var(--vf91-shadow-lg);
    z-index: 1000;
    padding: var(--vf91-spacing-sm) 0;
}

.vf91-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 var(--vf91-spacing-md);
}

.vf91-logo {
    display: flex;
    align-items: center;
    gap: var(--vf91-spacing-sm);
    text-decoration: none;
    color: var(--vf91-white);
    font-weight: bold;
    font-size: var(--vf91-font-size-lg);
}

.vf91-logo img {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--vf91-border-radius-sm);
}

.vf91-header-actions {
    display: flex;
    gap: var(--vf91-spacing-sm);
    align-items: center;
}

/* Buttons */
.vf91-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--vf91-spacing-sm) var(--vf91-spacing-md);
    border: none;
    border-radius: var(--vf91-border-radius);
    font-size: var(--vf91-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--vf91-transition);
    min-height: 4.4rem; /* Touch-friendly minimum size */
    min-width: 8rem;
}

.vf91-btn-primary {
    background: var(--vf91-accent);
    color: var(--vf91-dark);
}

.vf91-btn-primary:hover {
    background: var(--vf91-secondary);
    transform: translateY(-1px);
    box-shadow: var(--vf91-shadow);
}

.vf91-btn-outline {
    background: transparent;
    color: var(--vf91-white);
    border: 2px solid var(--vf91-white);
}

.vf91-btn-outline:hover {
    background: var(--vf91-white);
    color: var(--vf91-dark);
}

/* Navigation */
.vf91-nav {
    display: flex;
    align-items: center;
    gap: var(--vf91-spacing-sm);
}

.vf91-nav-item {
    padding: var(--vf91-spacing-sm);
    color: var(--vf91-white);
    text-decoration: none;
    border-radius: var(--vf91-border-radius-sm);
    transition: var(--vf91-transition-fast);
    min-height: 4.4rem;
    display: flex;
    align-items: center;
}

.vf91-nav-item:hover,
.vf91-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile menu */
.vf91-hamburger {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    cursor: pointer;
    padding: var(--vf91-spacing-sm);
    border-radius: var(--vf91-border-radius-sm);
    transition: var(--vf91-transition-fast);
}

.vf91-hamburger span {
    width: 2.4rem;
    height: 0.3rem;
    background: var(--vf91-white);
    transition: var(--vf91-transition);
    border-radius: 0.2rem;
}

.vf91-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.vf91-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.vf91-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

.vf91-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--vf91-dark);
    box-shadow: var(--vf91-shadow-xl);
    transition: var(--vf91-transition);
    z-index: 9999;
    overflow-y: auto;
}

.vf91-mobile-menu.active {
    right: 0;
}

.vf91-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--vf91-transition);
}

.vf91-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vf91-mobile-menu-header {
    background: linear-gradient(135deg, var(--vf91-primary), var(--vf91-secondary));
    padding: var(--vf91-spacing-lg);
    text-align: center;
    color: var(--vf91-white);
}

.vf91-mobile-menu-item {
    display: block;
    padding: var(--vf91-spacing-md);
    color: var(--vf91-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--vf91-transition-fast);
}

.vf91-mobile-menu-item:hover {
    background: rgba(143, 188, 143, 0.2);
    color: var(--vf91-accent);
}

/* Cards */
.vf91-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--vf91-border-radius-lg);
    padding: var(--vf91-spacing-lg);
    margin-bottom: var(--vf91-spacing-md);
    box-shadow: var(--vf91-shadow);
    transition: var(--vf91-transition);
    border: 1px solid rgba(143, 188, 143, 0.2);
}

.vf91-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--vf91-shadow-lg);
    border-color: var(--vf91-accent);
}

.vf91-card-title {
    font-size: var(--vf91-font-size-lg);
    font-weight: 600;
    color: var(--vf91-accent);
    margin-bottom: var(--vf91-spacing-sm);
}

.vf91-card-text {
    color: var(--vf91-light);
    line-height: var(--vf91-line-height);
}

/* Carousel */
.vf91-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--vf91-border-radius-lg);
    margin-bottom: var(--vf91-spacing-xl);
}

.vf91-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.vf91-carousel-slide {
    min-width: 100%;
    position: relative;
}

.vf91-carousel-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.vf91-carousel-indicators {
    position: absolute;
    bottom: var(--vf91-spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--vf91-spacing-xs);
}

.vf91-carousel-indicator {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--vf91-transition-fast);
}

.vf91-carousel-indicator.active {
    background: var(--vf91-accent);
}

/* Game grid */
.vf91-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--vf91-spacing-sm);
    margin-bottom: var(--vf91-spacing-xl);
}

.vf91-game-item {
    text-align: center;
    cursor: pointer;
    transition: var(--vf91-transition);
    padding: var(--vf91-spacing-sm);
    border-radius: var(--vf91-border-radius);
    background: rgba(255, 255, 255, 0.05);
}

.vf91-game-item:hover {
    transform: scale(1.05);
    background: rgba(143, 188, 143, 0.2);
}

.vf91-game-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: var(--vf91-border-radius-sm);
    margin-bottom: var(--vf91-spacing-xs);
}

.vf91-game-item-title {
    font-size: var(--vf91-font-size-sm);
    color: var(--vf91-light);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer */
.vf91-footer {
    background: linear-gradient(135deg, var(--vf91-dark), #1a1a1a);
    padding: var(--vf91-spacing-xl) 0 var(--vf91-spacing-xxl);
    margin-top: var(--vf91-spacing-xl);
    border-top: 1px solid var(--vf91-primary);
}

.vf91-footer-content {
    text-align: center;
}

.vf91-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--vf91-spacing-md);
    margin-bottom: var(--vf91-spacing-lg);
}

.vf91-footer-link {
    color: var(--vf91-light);
    text-decoration: none;
    transition: var(--vf91-transition-fast);
}

.vf91-footer-link:hover {
    color: var(--vf91-accent);
}

.vf91-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--vf91-spacing-md);
    margin: var(--vf91-spacing-lg) 0;
}

.vf91-partner {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    filter: grayscale(100%);
    transition: var(--vf91-transition);
}

.vf91-partner:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.vf91-copyright {
    color: var(--vf91-gray);
    font-size: var(--vf91-font-size-sm);
    margin-top: var(--vf91-spacing-lg);
}

/* Bottom navigation */
.vf91-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--vf91-primary), var(--vf91-secondary));
    box-shadow: var(--vf91-shadow-xl);
    z-index: 1000;
    padding: var(--vf91-spacing-sm) 0;
}

.vf91-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 var(--vf91-spacing-sm);
}

.vf91-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    min-height: 5.6rem;
    padding: var(--vf91-spacing-xs);
    color: var(--vf91-white);
    text-decoration: none;
    border-radius: var(--vf91-border-radius);
    transition: var(--vf91-transition);
    cursor: pointer;
    border: none;
    background: transparent;
}

.vf91-bottom-nav-item:hover,
.vf91-bottom-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.vf91-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: var(--vf91-spacing-xs);
    transition: var(--vf91-transition);
}

.vf91-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
}

/* Typography */
.vf91-h1 {
    font-size: var(--vf91-font-size-xxl);
    font-weight: 700;
    color: var(--vf91-accent);
    margin-bottom: var(--vf91-spacing-lg);
    text-align: center;
}

.vf91-h2 {
    font-size: var(--vf91-font-size-xl);
    font-weight: 600;
    color: var(--vf91-secondary);
    margin-bottom: var(--vf91-spacing-md);
}

.vf91-h3 {
    font-size: var(--vf91-font-size-lg);
    font-weight: 600;
    color: var(--vf91-primary);
    margin-bottom: var(--vf91-spacing-sm);
}

.vf91-text {
    color: var(--vf91-light);
    line-height: var(--vf91-line-height);
    margin-bottom: var(--vf91-spacing-md);
}

.vf91-text-center {
    text-align: center;
}

.vf91-text-accent {
    color: var(--vf91-accent);
}

/* Utility classes */
.vf91-mb-sm { margin-bottom: var(--vf91-spacing-sm); }
.vf91-mb-md { margin-bottom: var(--vf91-spacing-md); }
.vf91-mb-lg { margin-bottom: var(--vf91-spacing-lg); }
.vf91-mb-xl { margin-bottom: var(--vf91-spacing-xl); }

.vf91-mt-sm { margin-top: var(--vf91-spacing-sm); }
.vf91-mt-md { margin-top: var(--vf91-spacing-md); }
.vf91-mt-lg { margin-top: var(--vf91-spacing-lg); }

.vf91-p-sm { padding: var(--vf91-spacing-sm); }
.vf91-p-md { padding: var(--vf91-spacing-md); }
.vf91-p-lg { padding: var(--vf91-spacing-lg); }

.vf91-flex {
    display: flex;
}

.vf91-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vf91-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vf91-flex-column {
    flex-direction: column;
}

.vf91-flex-wrap {
    flex-wrap: wrap;
}

/* Responsive design */
@media (max-width: 768px) {
    .vf91-hamburger {
        display: flex;
    }

    .vf91-nav {
        display: none;
    }

    .vf91-main {
        padding-bottom: 8rem; /* Ensure content doesn't hide behind bottom nav */
    }

    .vf91-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .vf91-bottom-nav {
        display: block;
    }
}

@media (min-width: 769px) {
    .vf91-bottom-nav {
        display: none;
    }

    .vf91-main {
        padding-bottom: var(--vf91-spacing-xl);
    }
}

/* Loading animation */
@keyframes vf91-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vf91-fade-in {
    animation: vf91-fadeIn 0.5s ease-out;
}

/* Pulse animation for buttons */
@keyframes vf91-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.vf91-pulse:hover {
    animation: vf91-pulse 0.3s ease-in-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.vf91-btn:focus,
.vf91-nav-item:focus,
.vf91-bottom-nav-item:focus {
    outline: 2px solid var(--vf91-accent);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 0.8rem;
}

::-webkit-scrollbar-track {
    background: var(--vf91-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--vf91-primary);
    border-radius: var(--vf91-border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vf91-secondary);
}