/* UGAME Frontend Styles - Netflix Premium (Light Mode) */
:root {
    --ugame-bg: #ffffff;
    --ugame-text: #141414;
    --ugame-text-light: #666;
    --ugame-primary: #e50914; /* Netflix Red-ish */
    --ugame-card-bg: #f3f3f3;
    --ugame-hover-scale: 1.05;
    --ugame-transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ugame-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

#ugame-app-container {
    width: calc(100vw - 15px);
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--ugame-bg);
    color: var(--ugame-text);
    min-height: 800px;
    position: relative;
    overflow-x: hidden;
}

/* --- Typography --- */
.ugame-title-hero {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.ugame-subtitle-hero {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--ugame-text-light);
    max-width: 600px;
    margin-bottom: 2rem;
}

.ugame-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 40px 40px 20px;
    color: #333;
}

/* --- Dashboard / Gallery --- */
.ugame-hero-banner {
    height: 60vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background-size: cover;
    background-position: center;
}

.ugame-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #ffffff 30%, rgba(255,255,255,0.8) 60%, rgba(255,255,255,0) 100%);
    z-index: 1;
}

.ugame-hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%; /* Full width allowed */
    width: 100%;
    padding-right: 40px;
    animation: slideUpFade 0.8s ease-out;
}

.ugame-btn-play {
    background: var(--ugame-text);
    color: white;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--ugame-transition);
}

.ugame-btn-play:hover {
    background: #333;
    transform: scale(1.02);
}

.ugame-scenario-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 columns on large screens */
    gap: 20px;
    padding: 0 40px 60px;
}

@media (max-width: 1400px) {
    .ugame-scenario-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .ugame-scenario-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ugame-scenario-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 40px;
    }
}

/* Netflix Card Style - Premium Vertical Layout */
.ugame-scenario-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 310px; /* Fixed height for consistency */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ugame-scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    z-index: 10;
}

.ugame-card-image {
    width: 100%;
    height: 120px; /* Fixed image height */
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.9);
}

.ugame-scenario-card:hover .ugame-card-image {
    filter: brightness(1);
    transform: scale(1.05);
}

.ugame-card-info {
    position: relative;
    flex: 1;
    padding: 15px;
    background: white;
    color: var(--ugame-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: none;
    opacity: 1;
}

.ugame-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a !important;
    text-shadow: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.ugame-card-meta {
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.ugame-card-meta i {
    margin-right: 5px;
}

/* --- Briefing Screen --- */
.ugame-briefing-container {
    display: flex;
    height: 100vh;
    max-height: 900px;
}

.ugame-briefing-left {
    flex: 1.6; /* Increased width for text (was 1) */
    background: #f5f5f5;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ugame-briefing-right {
    flex: 1; /* Decreased width for image (was 1.5) */
    background-size: cover;
    background-position: center;
    position: relative;
}

.ugame-briefing-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #111;
    max-width: 100%;
}

.ugame-briefing-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #444;
    margin: 30px 0;
    border-left: 4px solid var(--ugame-primary);
    padding-left: 20px;
    text-align: justify;
}

/* --- Game Interface (Premium Redesign) --- */
.ugame-game-layout {
    display: flex;
    flex-direction: column; /* Stack vertically */
    height: 800px;
    background: #f4f7f6;
}

.ugame-game-sidebar {
    width: 100%; /* Full width top bar */
    height: auto;
    background: white;
    border-right: none;
    border-bottom: 1px solid #eaeaea;
    padding: 15px 40px;
    display: flex;
    flex-direction: row; /* Horizontal items */
    justify-content: space-between; /* Left and Right */
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    z-index: 10;
}

.ugame-game-main {
    flex: 1;
    padding: 40px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.ugame-game-main::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(15px);
}

.ugame-question-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    animation: slideUpFade 0.6s ease-out;
}

.ugame-question-text {
    font-size: 1.5rem; /* Reduced from 2rem */
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 50px;
    text-align: center;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.ugame-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.ugame-option-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 2px solid transparent;
    font-size: 1.15rem;
    font-weight: 500;
    color: #333;
    display: flex; /* Flexbox used */
    justify-content: flex-start; /* Ensure left alignment of flex items */
    text-align: justify; /* Ensure text alignment inside is justified per user request */
    align-items: center; /* Vertically center */
    position: relative;
    overflow: hidden;
}

.ugame-option-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #e0e0e0;
    transition: background 0.3s;
}

.ugame-option-card:hover {
    border-color: var(--ugame-primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.ugame-option-card:hover::before {
    background: var(--ugame-primary);
}

.ugame-option-letter {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ccc;
    margin-right: 20px;
    min-width: 30px;
    transition: color 0.3s;
}

.ugame-option-card:hover .ugame-option-letter {
    color: var(--ugame-primary);
}

/* --- Animations --- */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Utilities --- */
.ugame-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #eee;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
}

.ugame-loading {
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
}

/* --- Mobile Responsiveness (Premium Compact) --- */
@media (max-width: 768px) {
    #ugame-app-container {
        min-height: auto;
        overflow-x: hidden;
        background-color: #f8f9fa; /* Slightly darker bg for contrast */
    }

    /* Hero Section - Compact */
    .ugame-hero-banner {
        height: auto;
        min-height: 350px;
        padding: 60px 20px 30px;
        flex-direction: column;
        justify-content: flex-end; /* Align bottom */
        text-align: left;
        align-items: flex-start;
    }

    .ugame-hero-overlay {
        background: linear-gradient(0deg, #ffffff 10%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.4) 100%);
    }

    .ugame-hero-content {
        padding-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .ugame-title-hero {
        font-size: 1.8rem; /* Smaller title */
        margin-bottom: 0.5rem;
    }

    .ugame-subtitle-hero {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ugame-btn-play {
        width: 100%; /* Full width button */
        justify-content: center;
        padding: 14px;
        font-size: 1rem;
    }

    /* Scenario Grid - 2 Columns Compact */
    .ugame-section-title {
        margin: 30px 20px 15px;
        font-size: 1.1rem;
    }

    .ugame-scenario-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Columns */
        padding: 0 15px 40px;
        gap: 10px; /* Tight gap */
    }

    .ugame-scenario-card {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .ugame-card-info {
        padding: 10px; /* Compact padding */
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    }

    .ugame-card-title {
        font-size: 0.85rem; /* Small text */
        line-height: 1.2;
        margin-bottom: 3px;
    }

    .ugame-card-meta {
        font-size: 0.7rem;
        gap: 5px;
    }

    /* Briefing Screen */
    .ugame-briefing-container {
        flex-direction: column;
        height: auto;
        max-height: none;
    }

    .ugame-briefing-right {
        height: 200px; /* Shorter image */
        order: 1;
    }

    .ugame-briefing-left {
        padding: 25px 20px;
        order: 2;
    }

    .ugame-briefing-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .ugame-briefing-text {
        font-size: 1rem;
        margin: 20px 0;
        padding-left: 15px;
    }

    /* Game Interface */
    .ugame-game-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .ugame-game-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 15px 20px;
        order: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }
    
    .ugame-progress-container {
        margin-bottom: 0;
        flex: 1;
    }
    
    .ugame-timer-container {
        margin-top: 0;
        font-weight: bold;
        color: var(--ugame-primary);
    }

    .ugame-game-main {
        padding: 20px;
        order: 2;
        align-items: flex-start; /* Align top */
    }

    .ugame-question-container {
        margin-top: 20px;
    }

    .ugame-question-text {
        font-size: 1.2rem; /* Readable but not huge */
        margin-bottom: 25px;
        text-align: left; /* Easier to read */
    }

    .ugame-options-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ugame-option-card {
        padding: 15px;
        font-size: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    /* Challenge Screen Overrides */
    .ugame-challenge-container {
        padding: 15px !important;
        align-items: flex-start !important; /* Top align */
        padding-top: 40px !important;
    }
    
    .ugame-challenge-card {
        padding: 30px 20px !important;
        box-shadow: none !important; /* Flat on mobile */
        background: transparent !important;
    }
    
    .ugame-challenge-icon {
        font-size: 3em !important;
    }
    
    .ugame-challenge-title {
        font-size: 1.8rem !important;
    }
    
    .ugame-challenge-score {
        font-size: 2.5em !important;
    }

    /* Result Screen Mobile */
    .ugame-result-card {
        padding: 30px 20px !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .ugame-result-title {
        font-size: 1.8rem !important;
    }

    .ugame-result-score {
        font-size: 4em !important;
    }

    .ugame-result-feedback {
        font-size: 1rem !important;
    }

    .ugame-result-actions {
        flex-direction: column;
        gap: 10px !important;
    }

    .ugame-result-actions button {
        width: 100%;
    }
}

/* Leaderboard Styles */
.ugame-leaderboard-container {
    margin-top: 30px;
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ugame-leaderboard-title {
    margin-bottom: 15px;
    color: #333;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ugame-leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ugame-leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.ugame-leaderboard-score {
    color: var(--ugame-primary);
    font-weight: bold;
}

/* Feedback Modal */
.ugame-feedback-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.ugame-feedback-modal {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUpFade 0.3s ease;
}

.ugame-feedback-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.ugame-feedback-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.ugame-feedback-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.ugame-feedback-btn {
    width: 100%;
    justify-content: center;
}

/* Result Screen Courses */
.ugame-result-courses-container {
    margin-top: 40px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.ugame-result-courses-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
}

.ugame-result-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.ugame-result-course-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.ugame-result-course-card:hover {
    transform: translateY(-5px);
}

.ugame-result-course-image {
    height: 120px;
    background-size: cover;
    background-position: center;
}

.ugame-result-course-info {
    padding: 15px;
}

.ugame-result-course-title {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
}

.ugame-result-course-price {
    color: var(--ugame-primary);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Game Screen Progress & Timer */
.ugame-progress-container {
    margin-bottom: 0;
    flex: 1;
    max-width: 400px; /* Limit width on top bar */
}

.ugame-progress-bar-bg {
    height: 8px;
    background: #f0f0f0;
    margin-top: 5px; /* Reduced margin */
    border-radius: 4px;
    overflow: hidden;
}

.ugame-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ugame-primary), #ff6b6b);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

.ugame-progress-text {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

.ugame-timer-container {
    margin-top: 0;
    font-size: 1.1rem; /* Slightly larger timer */
    font-weight: 700;
    color: var(--ugame-primary);
    background: #fff0f0;
    padding: 8px 15px;
    border-radius: 20px;
}



/* --- Stylish Cards --- */
.ugame-card-stylish {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

.ugame-card-stylish:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.ugame-card-content-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.8) 100%);
}

.ugame-card-badges {
    display: flex;
    gap: 8px;
}

.ugame-badge-domain {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ugame-card-info-stylish {
    color: white;
}

.ugame-card-title-stylish {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ugame-card-meta-stylish {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    opacity: 0.9;
}

.ugame-card-meta-stylish span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Responsiveness Fixes */
@media (max-width: 768px) {
    .ugame-hero-banner { height: auto; min-height: 300px; padding: 40px 20px; }
    .ugame-title-hero { font-size: 2rem; }
    .ugame-subtitle-hero { font-size: 1rem; }
    .ugame-section-title { margin: 30px 20px 15px; }
    .ugame-scenario-grid { grid-template-columns: 1fr; padding: 0 20px; }
    #ugame-app-container { min-height: auto; }
}

/* --- New Dashboard Layout (Sidebar + Header) --- */
.ugame-dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.ugame-sidebar-nav {
    width: 250px;
    background: white;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    flex-shrink: 0;
}

.ugame-logo-area {
    padding: 30px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ugame-primary);
    letter-spacing: -1px;
}

.ugame-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto; /* Enable vertical scrolling */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ccc transparent; /* Firefox */
}

.ugame-nav-list::-webkit-scrollbar {
    width: 6px;
}
.ugame-nav-list::-webkit-scrollbar-track {
    background: transparent;
}
.ugame-nav-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.ugame-nav-list li {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ugame-nav-list li:hover, .ugame-nav-list li.active {
    background: #f0f0f0;
    color: #111;
    border-right: 3px solid var(--ugame-primary);
}

.ugame-nav-list li i {
    width: 20px;
    text-align: center;
}

.ugame-main-scroll {
    flex: 1;
    overflow-y: auto;
    position: relative;
    height: 100vh; /* Ensure scroll is within this container */
}

.ugame-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
}

.ugame-search-wrapper {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
    transition: all 0.3s;
}

.ugame-search-wrapper:focus-within {
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 400px;
}

.ugame-search-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.ugame-user-profile {
    font-size: 2rem;
    color: #333;
    cursor: pointer;
}

/* Adjust Grid for Popular Section - Align with main grid for consistency */
.ugame-grid-popular {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Mobile Responsive Adjustments for New Layout */
@media (max-width: 768px) {
    .ugame-dashboard-layout {
        flex-direction: column;
    }
    .ugame-sidebar-nav {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .ugame-nav-list {
        display: flex;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .ugame-nav-list li {
        white-space: nowrap;
        border-right: none;
        border-bottom: 3px solid transparent;
    }
    .ugame-nav-list li:hover, .ugame-nav-list li.active {
        border-right: none;
        border-bottom: 3px solid var(--ugame-primary);
    }
    .ugame-header-bar {
        position: relative;
        background: white;
        padding: 15px;
    }
    .ugame-search-wrapper {
        width: 100%;
    }
    .ugame-search-wrapper:focus-within {
        width: 100%;
    }
    .ugame-main-scroll {
        height: auto;
        overflow-y: visible;
    }
}

/* Stylish Card Text Overrides */
.ugame-card-title-stylish {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.3;
}

.ugame-card-meta-stylish {
    font-size: 0.85rem;
    display: flex;
    gap: 15px;
    align-items: center;
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

.ugame-card-content-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
}

.ugame-card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.ugame-badge-domain {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* --- Welcome Panel (Side Drawer) --- */
.ugame-welcome-trigger {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--ugame-primary);
    color: white;
    padding: 20px 12px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    cursor: pointer;
    z-index: 9990;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.2);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.ugame-welcome-trigger span {
    display: inline-block;
    transform: rotate(180deg);
}

.ugame-welcome-trigger:hover {
    padding-right: 15px;
    background: #b20710;
}

.ugame-welcome-panel {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 33vw; /* 1/3 of screen */
    min-width: 400px;
    height: 100vh;
    background: white;
    z-index: 9999;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow-y: auto;
    padding: 50px 40px;
    box-sizing: border-box;
}

.ugame-welcome-panel.active {
    right: 0;
}

.ugame-welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9995;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.ugame-welcome-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ugame-welcome-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    transition: all 0.2s;
}

.ugame-welcome-close:hover {
    background: var(--ugame-primary);
    color: white;
    transform: rotate(90deg);
}

.ugame-welcome-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #111;
    border-bottom: 3px solid var(--ugame-primary);
    display: inline-block;
    padding-bottom: 10px;
}

.ugame-welcome-body {
    line-height: 1.8;
    color: #555;
    font-size: 1.1rem;
}

.ugame-welcome-body p {
    margin-bottom: 20px;
    text-align: justify;
}

@media (max-width: 768px) {
    .ugame-welcome-panel {
        width: 90vw;
        min-width: auto;
    }
    .ugame-welcome-trigger {
        padding: 15px 8px;
        font-size: 0.9rem;
    }
} 
 
 . u g a m e - w e l c o m e - o v e r l a y . a c t i v e   { 
 
         o p a c i t y :   1 ; 
 
         v i s i b i l i t y :   v i s i b l e ; 
 
 } 
 
 
 
 . u g a m e - w e l c o m e - c l o s e   { 
 
         p o s i t i o n :   a b s o l u t e ; 
 
         t o p :   2 5 p x ; 
 
         r i g h t :   2 5 p x ; 
 
         b a c k g r o u n d :   # f 0 f 0 f 0 ; 
 
         b o r d e r :   n o n e ; 
 
         w i d t h :   4 0 p x ; 
 
         h e i g h t :   4 0 p x ; 
 
         b o r d e r - r a d i u s :   5 0 % ; 
 
         d i s p l a y :   f l e x ; 
 
         a l i g n - i t e m s :   c e n t e r ; 
 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
         f o n t - s i z e :   1 . 2 r e m ; 
 
         c u r s o r :   p o i n t e r ; 
 
         c o l o r :   # 3 3 3 ; 
 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
 
 } 
 
 
 
 . u g a m e - w e l c o m e - c l o s e : h o v e r   { 
 
         b a c k g r o u n d :   v a r ( - - u g a m e - p r i m a r y ) ; 
 
         c o l o r :   w h i t e ; 
 
         t r a n s f o r m :   r o t a t e ( 9 0 d e g ) ; 
 
 } 
 
 
 
 . u g a m e - w e l c o m e - c o n t e n t   h 2   { 
 
         f o n t - s i z e :   2 r e m ; 
 
         m a r g i n - b o t t o m :   3 0 p x ; 
 
         c o l o r :   # 1 1 1 ; 
 
         b o r d e r - b o t t o m :   3 p x   s o l i d   v a r ( - - u g a m e - p r i m a r y ) ; 
 
         d i s p l a y :   i n l i n e - b l o c k ; 
 
         p a d d i n g - b o t t o m :   1 0 p x ; 
 
 } 
 
 
 
 . u g a m e - w e l c o m e - b o d y   { 
 
         l i n e - h e i g h t :   1 . 8 ; 
 
         c o l o r :   # 5 5 5 ; 
 
         f o n t - s i z e :   1 . 1 r e m ; 
 
 } 
 
 
 
 . u g a m e - w e l c o m e - b o d y   p   { 
 
         m a r g i n - b o t t o m :   2 0 p x ; 
 
         t e x t - a l i g n :   j u s t i f y ; 
 
 } 
 
 
 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
         . u g a m e - w e l c o m e - p a n e l   { 
 
                 w i d t h :   9 0 v w ; 
 
                 m i n - w i d t h :   a u t o ; 
 
         } 
 
         . u g a m e - w e l c o m e - t r i g g e r   { 
 
                 p a d d i n g :   1 5 p x   8 p x ; 
 
                 f o n t - s i z e :   0 . 9 r e m ; 
 
         } 
 
 } 
 
 