/* Global Reset & Typography */
:root {
    /* Core Palette */
    --bg-color: #f7f0ff;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --accent-color: #7b52ab;
    --accent-hover: #6a4696;
    --accent-text: #ffffff;
    
    /* Functional Colors */
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --info-color: #2196f3;
    
    /* UI Elements */
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-medium: 0 4px 15px rgba(100, 80, 150, 0.1);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- TYPOGRAPHY UTILITIES --- */
h1, h2, h3, h4, h5, h6 { margin-bottom: 0.5em; line-height: 1.2; color: var(--text-main); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
small { font-size: 0.8rem; color: var(--text-muted); }
strong { font-weight: 600; }
em { font-style: italic; }

/* --- BUTTON VARIANTS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    gap: 8px;
    background-color: var(--accent-color);
    color: var(--accent-text);
    box-shadow: 0 4px 10px rgba(123, 82, 171, 0.3);
    border: 2px solid white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(123, 82, 171, 0.4);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--text-main);
    border-color: var(--text-main);
}

.btn-success { background-color: var(--success-color); color: white; }
.btn-danger { background-color: var(--error-color); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--accent-color); color: var(--accent-color); }

/* --- FORM ELEMENTS --- */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    color: var(--text-main);
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-main);
}

/* --- ALERTS & NOTICES --- */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-info { background-color: #e3f2fd; color: #0d47a1; border-color: #bbdefb; }
.alert-success { background-color: #e8f5e9; color: #1b5e20; border-color: #c8e6c9; }
.alert-warning { background-color: #fff3e0; color: #e65100; border-color: #ffe0b2; }
.alert-error { background-color: #ffebee; color: #b71c1c; border-color: #ffcdd2; }

/* --- LAYOUT UTILITIES --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.main-header {
    background-color: var(--card-bg);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light);
    width: 100%;
    z-index: 10;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-img {
    height: 105px; /* Adjust as needed to fit the header */
    width: auto;
    object-fit: contain;
    margin-top: 1px;
    margin-bottom: -5px;
}

/* Layout Containers */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    flex: 1; /* Pushes footer down */
}

/* --- LANDING PAGE STYLES (index-22a37fee.html) --- */

.game-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-card {
    display: block;
    height: 250px;
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-medium);
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(100, 80, 150, 0.2);
}

/* Placeholder for game thumbnail */
.card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e6e6e6 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    background:url(../images/bg_dim-2104419c.png) 0 0 no-repeat;
    background-size:cover;
    content:''; 
}

.card-image-placeholder svg {
    color: #ccc;
    width: 48px;
    height: 48px;
}

/* Overlay Image */
.dim-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6; /* Default opacity when not hovered */
    transition: opacity 0.3s ease-in-out; /* Smooth transition */
}

.game-card:hover .dim-overlay {
    opacity: 0; /* Fade out on hover */
}

/* --- STATS PAGE STYLES (stats.html) --- */

.stats-page-title {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 30px;
}

.stats-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
}

.stats-section-title {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 20px;
}

/* Chart Area */
.chart-container {
    position: relative;
    padding: 0; /* No vertical padding needed now */
}

.chart-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    padding: 0 15px;
}

.current-users,
.peak-users {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.current-users {
    background: linear-gradient(135deg, rgba(123, 82, 171, 0.08) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-color: rgba(123, 82, 171, 0.15);
}

.huge-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.1;
    width: 100%;
}

.big-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    line-height: 1.1;
    width: 100%;
}

.label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    line-height: 1.3;
    word-spacing: 100vw;
    width: 100%;
}

/* Stats Table & Tabs */
.stats-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.stats-tabs {
    display: flex;
    gap: 5px;
    background-color: #f0f0f0;
    padding: 4px;
    border-radius: 8px;
}

.stats-tab {
    border: none;
    background: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
}

.stats-tab:hover {
    color: var(--text-main);
    background-color: rgba(255,255,255,0.5);
}

.stats-tab.active {
    background-color: white;
    color: var(--accent-color);
    box-shadow: var(--shadow-light);
}

.table-responsive {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.stats-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #f0f0f0;
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
}

.stats-table td {
    padding: 12px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover {
    background-color: #fcfcfc;
}

.rank-col { width: 60px; text-align: center; color: #888; }
.game-col { width: 40%; }
.current-col { width: 25%; font-weight: bold; color: var(--text-main); }
.peak-col { width: 25%; color: #666; }

.highlight {
    color: var(--success-color) !important; /* Green for active numbers */
}

.game-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-icon-small {
    width: 32px;
    height: 32px;
    background-color: #ddd;
    border-radius: 4px;
}

.game-cell a {
    font-weight: 600;
    color: var(--text-main);
}

.game-cell a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.table-footer-link {
    margin-top: 15px;
    text-align: right;
    font-size: 0.9rem;
}

.table-footer-link a {
    color: var(--accent-color);
}

.table-footer-link a:hover {
    text-decoration: underline;
}

.chart-tooltip {
    position: absolute;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--accent-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.loading-text::after {
    content: '.';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* --- ACHIEVEMENTS PAGE STYLES (achievements.html) --- */

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.achievement-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-light);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid transparent;
    transition: transform 0.2s;
}

.achievement-card.unlocked {
    border: 1px solid var(--success-color);
    background-color: #f9fff9;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.achievement-icon {
    font-size: 2rem;
    color: #ccc;
    background-color: #f5f5f5;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-card.unlocked .achievement-icon {
    color: white;
    background-color: var(--success-color);
}

.achievement-content {
    flex: 1;
}

.achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.achievement-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.achievement-date {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

.achievement-title {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
}

.achievement-status {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #eee;
    color: #888;
}

.achievement-card.unlocked .achievement-status {
    background-color: var(--success-color);
    color: white;
}

.achievement-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.achievement-reward {
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    border-left: 3px solid #ccc;
}

.achievement-card.unlocked .achievement-reward {
    background-color: #e8f5e9;
    border-left: 3px solid var(--success-color);
}

.achievement-reward.locked {
    opacity: 0.7;
}

.reward-label {
    font-weight: bold;
    color: #555;
    margin-right: 5px;
}

.reward-text {
    color: var(--text-main);
}

.reward-link {
    display: inline-block;
    margin-left: 10px;
    color: var(--info-color);
    font-weight: 600;
}

.progress-container {
    margin-top: 10px;
}

.progress-bar {
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 4px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.achievement-card.unlocked .progress-bar {
    background-color: var(--success-color);
}

.progress-container .progress-bar {
    background-color: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.progress-container .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--width, 0%); /* Fallback */
    background-color: var(--accent-color); /* Default progress color */
}
/* Fix for inline style width usage in HTML */
.progress-bar[style*="width"] {
    /* Resetting background to be the filled part effectively for simple div usage */
    background-color: var(--accent-color); 
    position: relative;
}
/* Better approach: Container is gray, inner div is colored. 
   Refactoring HTML structure slightly implicitly or handling it with wrapping.
   The current HTML has <div class="progress-container"><div class="progress-bar" style="width:..."></div>...
   So .progress-container needs the background, .progress-bar needs the color.
*/
.progress-container {
    background-color: #eee;
    border-radius: 4px;
    height: 8px;
    width: 100%;
    position: relative;
    margin-bottom: 5px;
}
.progress-container .progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
    margin: 0; /* Reset margin */
}
.achievement-card.unlocked .progress-bar {
    background-color: var(--success-color);
}

.progress-text {
    font-size: 0.75rem;
    color: #888;
    text-align: right;
    display: block;
    margin-top: 2px;
}


/* --- TEXT PAGE STYLES (text.html) --- */

.text-page-container {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.text-content {
    color: var(--text-main);
    line-height: 1.8;
}

.text-content h2 {
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.text-content p {
    margin-bottom: 15px;
}

.text-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.text-content li {
    margin-bottom: 10px;
}

/* Gradient overlay for text readability */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    z-index: 2; /* Ensuring it's above dim-overlay */
}

.card-title {
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Card Stats (Top Right) */
.card-stats {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.stat-pill {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-pill i {
    color: white; /* Changed from #ffd700 to white */
    font-size: 0.9rem;
}

/* Heart Animation (X-style) */
.control-btn#heart-btn {
    transition: color 0.2s ease;
    position: relative;
}

.control-btn#heart-btn.is-active {
    color: #e0245e !important;
}

.heart-pop {
    animation: heart-pop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.heart-splash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    box-shadow: 
        0 -15px 0 #e0245e, 11px -11px 0 #e0245e, 15px 0 0 #e0245e, 11px 11px 0 #e0245e, 
        0 15px 0 #e0245e, -11px 11px 0 #e0245e, -15px 0 0 #e0245e, -11px -11px 0 #e0245e;
    animation: heart-splash 0.45s ease-out forwards;
    opacity: 0;
}

@keyframes heart-splash {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

/* Info Banner (Bottom of Landing) */
.info-banner {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    margin-top: 30px;
    text-align: center;
    color: #555;
    font-size: 1.1rem;
    box-shadow: var(--shadow-light);
}

/* Social Links Row */
.social-links-row {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px; /* Space between social links and game list */
    padding-bottom: 20px;
}

.social-pill-link {
    background-color: white;
    color: #555;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(100, 80, 150, 0.1);
    transition: all 0.2s ease;
}

.social-pill-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 80, 150, 0.15);
    color: var(--accent-color); /* Accent color on hover */
}

.social-pill-link i {
    font-size: 1.2rem;
    color: #777; /* Default icon color */
}

.social-pill-link:hover i {
    color: var(--accent-color); /* Accent color on hover */
}

/* --- GAME PAGE STYLES (game-cc741aae.html) --- */

.game-stage-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Main Game Window */
.game-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e8e4f0; /* Placeholder color */
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.game-viewport.fullscreen-active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    aspect-ratio: unset; /* Remove aspect ratio constraint */
    z-index: 9999;
    border-radius: 0;
    background-color: black; /* or keep theme color */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Only apply full height when actually in browser fullscreen mode */
:root:fullscreen .game-viewport.fullscreen-active,
:root:-webkit-full-screen .game-viewport.fullscreen-active,
:root:-moz-full-screen .game-viewport.fullscreen-active,
:root:-ms-fullscreen .game-viewport.fullscreen-active {
    height: 100dvh !important; /* Dynamic viewport height - recalculates when viewport changes */
    bottom: 0 !important; /* Override inline bottom style from fullscreen bar */
}

.game-viewport iframe {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
}

/* Control Bar */
.control-bar {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-light);
}

/* Game Stats Row */
.game-stats-row {
    display: flex;
    justify-content: center; /* Center the pills horizontally */
    gap: 15px; /* Space between the pills */
    margin-top: 10px; /* Space above the spotlight banner */
    padding-bottom: 5px; /* Space below this row */
}

.control-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-icon {
    width: 40px;
    height: 40px;
    background-color: #eee;
    border-radius: 6px;
    overflow: hidden;
}

.control-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.control-text h2 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.control-text span {
    font-size: 0.8rem;
    color: #888;
}

.control-right {
    display: flex;
    gap: 15px;
    color: var(--accent-color); /* Changed from white to a darker purple for visibility */
}

.control-btn {
    cursor: pointer;
    font-size: 1.2rem;
}

/* Banner Area */
.spotlight-banner {
    width: 100%;
    height: 180px;
    background-color: #dcd0f0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Clickable */
    background-size: cover;
    background-position: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.spotlight-text {
    position: absolute;
    bottom: 15px;
    text-align: center;
    width: 100%;
    color: var(--accent-color);
    font-weight: bold;
    background: rgba(255,255,255,0.9); /* Slightly more opaque */
    padding: 10px;
    backdrop-filter: blur(2px);
}

/* Details Section */
.game-details {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    margin-top: 5px;
    box-shadow: var(--shadow-light);
}

.breadcrumbs {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.breadcrumbs a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.details-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.details-section {
    margin-bottom: 25px;
}

.details-label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.details-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* --- 404 PAGE STYLES (404.html) --- */

.error-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
}

.error-content {
    max-width: 500px;
}

.error-image {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.8;
}

.error-title {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.error-text {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

/* --- NEWS PAGE STYLES (news.html) --- */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    box-shadow: var(--shadow-light);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-image-col {
    width: 200px;
    flex-shrink: 0;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .chart-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .chart-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 15px;
    }

    .huge-number {
        font-size: 1.6rem;
    }

    .big-number {
        font-size: 1.5rem;
    }

    .current-users,
    .peak-users {
        padding: 16px 10px;
    }
}

@media (max-width: 600px) {
    /* Stats page mobile improvements */
    .chart-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .current-users,
    .peak-users {
        padding: 14px 8px;
        gap: 8px;
    }

    .huge-number {
        font-size: 1.4rem;
    }

    .big-number {
        font-size: 1.3rem;
    }

    .label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .stats-section {
        padding: 20px 15px;
    }

    .stats-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-tabs {
        width: 100%;
        overflow-x: auto;
    }
}

    /* News cards */
    .news-card {
        flex-direction: column;
    }
    .news-image-col {
        width: 100%;
        height: 150px;
    }
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8e4f0;
    color: #a080c0;
    font-size: 3rem;
}

.news-content-col {
    padding: 25px;
    flex: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.news-date {
    color: #888;
}

.news-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.related-games-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    justify-content: center;
}

.related-games-tags .news-tag {
    border-radius: 999px;
    padding: 8px 12px;
    text-transform: none;
    font-size: 0.85rem;
    font-weight: 700;
    background-color: #f0e9ff;
    color: #5b3aac;
}

.related-games-tags .news-tag:hover {
    background-color: #e1d6ff;
    color: #3f2780;
}

.tag-event { background-color: #e3f2fd; color: #2196f3; }
.tag-update { background-color: #e8f5e9; color: var(--success-color); }
.tag-merch { background-color: #fff3e0; color: #ff9800; }

.news-title {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

.news-excerpt {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.news-link {
    color: var(--accent-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-link:hover {
    text-decoration: underline;
}
.news-card:hover .news-link {
    text-decoration: underline;
}

.news-compact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(0 0 0 / 2%);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    gap: 12px;
}
.news-compact-row:nth-child(even) {
    background: rgb(0 0 0 / 4%);
}
.news-compact-row:hover {
    background: rgb(0 0 0 / 6%);
}
.news-compact-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-compact-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}


/* --- NEWS ITEM PAGE (news_item.html) --- */

.article-container {
    max-width: 700px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.back-link:hover {
    text-decoration: underline;
}

.full-article {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    margin-bottom: 40px;
}

.article-hero {
    height: 300px;
    background-color: #eee;
}

.article-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #ccc;
    background-color: #e8e4f0;
}

.article-header {
    padding: 30px 30px 10px 30px;
}

.article-title {
    font-size: 2rem;
    color: var(--text-main);
    line-height: 1.2;
    margin-top: 10px;
}

.article-body {
    padding: 20px 30px 40px 30px;
    color: #444;
    font-size: 1.05rem;
    line-height: 1.7;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-top: 30px;
    margin-bottom: 15px;
}

.lead-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-main);
}

.article-image-insert {
    margin: 30px 0;
}

.insert-placeholder {
    width: 100%;
    /* Keep fixed height for consistency, or remove to fit image ratio. 
       User wants image to clip to shape and center. */
    height: 250px; 
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 8px;
    overflow: hidden; /* Key for clipping */
    position: relative;
}

.insert-placeholder img {
    /* Use object-fit: cover to fill the area while preserving aspect ratio. */
    width: 100%;
    height: 100%;
    min-width: 100%; /* Ensure it always stretches to fill */
    min-height: 100%; /* Ensure it always stretches to fill */
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.insert-placeholder img:hover {
    transform: scale(1.03); /* Subtle zoom effect */
}

.caption {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}

.related-news {
    margin-top: 24px;
    padding: 14px 10px 10px 10px;
    background: #faf7ff;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.04);
    text-align: center;
}
.related-news h3 {
    font-size: 1.1rem;
    margin: 0 0 12px;
    color: #555;
}

.related-card {
    display: block;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.related-card:hover {
    border-color: #dcd0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(100, 80, 150, 0.05);
}

.related-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.related-title {
    font-weight: bold;
    color: var(--text-main);
    font-size: 1.1rem;
}


/* --- LEADERBOARD PAGE STYLES (stats_top_100.html) --- */

.trend-col {
    width: 10%;
    text-align: center;
}

.up { color: var(--success-color); }
.down { color: var(--error-color); }
.steady { color: #999; }

.rank-1 { font-size: 1.2rem; font-weight: bold; color: #ffc107; }
.rank-2 { font-size: 1.1rem; font-weight: bold; color: #9e9e9e; }
.rank-3 { font-size: 1.05rem; font-weight: bold; color: #cd7f32; }


/* --- PASSWORD GATE STYLES (password_gate.html) --- */

.password-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.password-icon {
    font-size: 3rem;
    color: var(--accent-color);
    background-color: #f3e5f5;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.password-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.password-desc {
    color: #666;
    margin-bottom: 30px;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.password-input {
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    text-align: center;
}

.password-input:focus {
    border-color: var(--accent-color);
}

.password-btn {
    width: 100%;
    border: none;
    cursor: pointer;
}

.back-link-center {
    font-size: 0.9rem;
    color: #888;
}

.back-link-center:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- LANGUAGE PAGE STYLES (choose_language.html) --- */

.language-page-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.language-card {
    background-color: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    transition: all 0.2s;
    box-shadow: var(--shadow-light);
    position: relative;
}

.language-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #dcd0f0;
}

.language-card.active {
    border-color: var(--accent-color);
    background-color: #fcfaff;
}

.lang-flag {
    font-size: 2rem;
}

.lang-info {
    display: flex;
    flex-direction: column;
}

.lang-name {
    font-weight: bold;
    color: var(--text-main);
    font-size: 1rem;
}

.lang-native {
    color: #888;
    font-size: 0.85rem;
}

.check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* --- SETTINGS PAGE STYLES (site_settings.html) --- */

.settings-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 600px; /* Ensure enough height for footer push */
}

.settings-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
}

.settings-section-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-info {
    flex: 1;
    padding-right: 20px;
}

.setting-label {
    display: block;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 4px;
}

.setting-desc {
    display: block;
    font-size: 0.85rem;
    color: #888;
}

.settings-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    font-size: 0.9rem;
    color: var(--text-main);
    outline: none;
}

.settings-select:focus {
    border-color: var(--accent-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Volume Slider */
.volume-slider-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    transition: background 0.2s;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.volume-value {
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
    min-width: 40px;
    text-align: right;
}

.settings-save-area {
    text-align: right;
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.save-status {
    color: var(--success-color);
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #fff0f0;
}

/* --- FOOTER STYLES --- */

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.75rem;
    color: #a080c0;
    margin-top: auto;
    border-top: 1px solid rgba(160, 128, 192, 0.1);
}

.footer-links {
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--accent-color);
    margin: 0 8px;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer-links a:hover {
    color: #553285;
    text-decoration: underline;
}

.footer-links a.active-link {
    color: var(--text-main);
    cursor: default;
    text-decoration: none;
}

/* Version Information */
.version-info {
    text-align: center;
    font-size: 0.65rem; /* Smaller font size */
    color: rgba(160, 128, 192, 0.6); /* Lighter than footer */
    padding-bottom: 10px; /* Some padding at the bottom */
    margin-top: -15px; /* Adjust margin to bring it closer to the footer */
}

/* SVG Utilities */
.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Tags Index Page */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tag-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tag-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tag-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0;
}

.tag-card-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .tags-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .tag-card {
        padding: 20px 15px;
    }

    .tag-card-title {
        font-size: 1.1rem;
    }
}

/* Age Gate Overlay */
.age-gate-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.7));
    backdrop-filter: blur(6px);
    z-index: 10;
    padding: 20px;
}

.age-gate-card {
    background: #ffffff;
    color: #0d1018;
    border-radius: 14px;
    padding: 18px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.age-gate-card h2 {
    margin: 0 0 8px;
}

.age-gate-card p {
    color: #333a4a;
    margin: 0 0 16px;
}

.age-gate-actions {
    display: grid;
    gap: 10px;
}

.btn-age-primary {
    background: #f3f5f9;
    color: #1f2633;
    border: 1px solid #d5dce6;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.btn-age-secondary {
    background: #f3f5f9;
    color: #1f2633;
    border: 1px solid #d5dce6;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

/* Fullscreen Bottom Bar */
.fullscreen-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid rgba(160, 128, 192, 0.2);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 0 20px;
    font-size: 0.9rem;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.fullscreen-bar-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fullscreen-bar-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    object-fit: cover;
}

.fullscreen-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fullscreen-bar-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-color);
}

.fullscreen-bar-developer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fullscreen-bar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-bar-center svg {
    height: 32px;
    width: auto;
}

.fullscreen-bar-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.fullscreen-bar-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.fullscreen-bar-btn:hover {
    background-color: rgba(160, 128, 192, 0.1);
    color: var(--accent-hover);
}

/* Fullscreen Bar - Portrait/Mobile Optimization */
@media (max-width: 768px), (orientation: portrait) {
    .fullscreen-bar-info {
        display: none; /* Hide game title and developer text */
    }

    .fullscreen-bar-left {
        flex: 0; /* Don't stretch, just fit icon */
    }

    .fullscreen-bar-center {
        flex: 1; /* Keep logo centered */
    }

    .fullscreen-bar-right {
        flex: 0;
        justify-content: flex-end;
    }

    .fullscreen-bar {
        padding: 0 10px; /* Reduce padding on mobile */
    }

    .fullscreen-bar-btn {
        width: 45px; /* Slightly smaller buttons on mobile */
        height: 45px;
        font-size: 1.3rem;
    }
}
