:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --icon-bg: rgba(0, 0, 0, 0.2);
    --divider: rgba(255, 255, 255, 0.05);
    --card-hover-overlay: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.light-theme {
    --bg-color: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #475569;
    
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    
    --icon-bg: rgba(255, 255, 255, 0.8);
    --divider: rgba(0, 0, 0, 0.1);
    --card-hover-overlay: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background animated shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-secondary), transparent);
    animation-delay: 0s;
}

.blob2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-primary), transparent);
    animation-delay: -5s;
}

.blob3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #0ea5e9, transparent);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Hub Layout */
.page-layout-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    padding: 100px 20px 40px;
    z-index: 1;
}

@media (max-width: 1024px) {
    .page-layout-wrapper {
        flex-direction: column;
        align-items: center;
    }
}

.hub-container {
    flex: 1;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Sidebar and Ad Banner */
.sidebar-container {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-banner {
    width: 300px;
    height: 600px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 4px;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.hub-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInDown 0.8s ease-out;
}

.hub-header h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    font-family: 'Outfit', sans-serif;
}

.hub-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Custom placement for the badge on the home page */
.home-badge {
    position: absolute;
    top: -15px;
    left: -20px;
    margin: 0;
    z-index: 20;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.game-card:nth-child(2) {
    animation-delay: 0.2s;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--card-hover-overlay);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

.card-icon {
    font-size: 4rem;
    background: var(--icon-bg);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.card-content h2 {
    font-size: 1.8rem;
    font-family: 'Rubik', sans-serif;
    margin-bottom: 12px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.card-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--divider);
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
}

.play-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.game-card:hover .play-badge {
    background: #3b82f6;
    color: white;
}

.soon-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.disabled-card {
    cursor: default;
    opacity: 0.8;
}

.disabled-card:hover {
    transform: translateY(-5px);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.top-right-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 54px;
    height: 54px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text-main);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.icon-sun {
    display: none;
}
.icon-moon {
    display: block;
}

:root.light-theme .icon-sun {
    display: block;
}

:root.light-theme .icon-moon {
    display: none;
}

.daily-countdown {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 1.275rem;
    color: var(--text-muted);
    box-shadow: var(--glass-shadow);
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.daily-countdown span {
    font-family: 'Rubik', sans-serif;
    color: var(--accent-primary);
    font-weight: 600;
    margin-left: 4px;
}

@media (max-width: 768px) {
    .home-badge {
        position: relative;
        top: 0;
        left: 0;
        margin: 0 auto 20px;
    }
    .hub-header h1 {
        font-size: 2.5rem;
    }
    .game-card {
        padding: 30px 20px;
    }
    .top-right-controls {
        top: 16px;
        right: 16px;
    }
    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .daily-countdown {
        font-size: 1.125rem;
        padding: 9px 15px;
    }
}
