body {
    background-color: #1a1a1a;
    background-image: url('../images/bg_pattern.png'); /* Placeholder for a scanline or subtle pattern */
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    color: #cccccc;
    margin: 0;
    padding: 0;
    text-align: center;
}

* {
    box-sizing: border-box;
}

a {
    color: #ff9900;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

#container {
    width: 960px;
    margin: 0 auto;
    background-color: #2b2b2b;
    border-left: 2px solid #444;
    border-right: 2px solid #444;
    text-align: left;
    box-shadow: 0 0 10px #000;
}

/* Header */
header {
    background: linear-gradient(to bottom, #4c4c4c, #1f1f1f);
    height: 100px;
    border-bottom: 3px solid #ff9900;
    position: relative;
    padding: 10px 20px;
}

h1.logo {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin: 0;
    padding-top: 15px;
    float: left;
}

.logo span {
    color: #ff9900;
}

/* Navigation */
nav {
    background-color: #333;
    height: 30px;
    border-bottom: 1px solid #000;
    line-height: 30px;
    padding-left: 10px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 15px;
    font-weight: bold;
}

nav ul li a {
    color: #ddd;
    font-size: 12px;
}

nav ul li a:hover {
    color: #fff;
}

/* Main Content */
#main {
    padding: 15px;
    min-height: 600px;
}

#content {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 15px 0; /* Simulates gap */
}

/* Sidebar */
#sidebar {
    display: table-cell;
    vertical-align: top;
    width: 200px;
    background-color: #222;
    border: 1px solid #444;
    padding: 10px;
}

.main-column {
    display: table-cell;
    vertical-align: top;
    width: 720px;
}

/* Game Grid */
.game-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.game-item {
    width: 140px;
    height: 180px;
    background-color: #333;
    border: 1px solid #555;
    padding: 5px;
    text-align: center;
}

.game-item:hover {
    border-color: #ff9900;
    background-color: #444;
    cursor: pointer;
}

.game-thumb {
    width: 100%;
    height: 100px;
    background-color: #000;
    margin: 0 auto 5px auto;
    border: 1px solid #000;
}

.game-title {
    font-weight: bold;
    font-size: 11px;
    color: #fff;
    margin-bottom: 5px;
    display: block;
}

/* Section Headers */
h2.section-header {
    background: url('../images/header_bg.png') repeat-x; /* Glossy bar */
    background-color: #000;
    color: #ff9900;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid #555;
    margin-top: 0;
}

/* Game Player */
#game-area {
    width: 100%;
    text-align: center;
    background: #000;
    padding: 10px;
    box-sizing: border-box;
    border: 5px solid #444;
    overflow: hidden; /* Prevent overflow */
}

/* Fullscreen body/html background fix */
html:-webkit-full-screen, body:-webkit-full-screen,
html:-moz-full-screen, body:-moz-full-screen,
html:-ms-fullscreen, body:-ms-fullscreen,
html:fullscreen, body:fullscreen,
html.is-fullscreen, body.is-fullscreen {
    background-color: #000 !important;
}

/* Fullscreen Rules - Split to prevent selector invalidation */
#game-area.is-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    background: #000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2147483647 !important;
}

/* Vendor specific fallbacks just in case JS fails or for native behavior */
#game-area:-webkit-full-screen {
    width: 100% !important; height: 100% !important; border: none !important; margin: 0 !important; padding: 0 !important;
}
#game-area:-moz-full-screen {
    width: 100% !important; height: 100% !important; border: none !important; margin: 0 !important; padding: 0 !important;
}
#game-area:-ms-fullscreen {
    width: 100% !important; height: 100% !important; border: none !important; margin: 0 !important; padding: 0 !important;
}
#game-area:fullscreen {
    width: 100% !important; height: 100% !important; border: none !important; margin: 0 !important; padding: 0 !important;
}


/* Inner Elements targeting .is-fullscreen */
#game-area.is-fullscreen #flash-content {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#game-area.is-fullscreen object, 
#game-area.is-fullscreen embed, 
#game-area.is-fullscreen ruffle-player {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    display: block !important;
}

/* Inner Elements targeting pseudo-classes (Split) */
#game-area:-webkit-full-screen #flash-content { width: 100% !important; height: 100% !important; max-width: none !important; position: absolute !important; top: 0 !important; left: 0 !important; }
#game-area:-moz-full-screen #flash-content { width: 100% !important; height: 100% !important; max-width: none !important; position: absolute !important; top: 0 !important; left: 0 !important; }
#game-area:-ms-fullscreen #flash-content { width: 100% !important; height: 100% !important; max-width: none !important; position: absolute !important; top: 0 !important; left: 0 !important; }
#game-area:fullscreen #flash-content { width: 100% !important; height: 100% !important; max-width: none !important; position: absolute !important; top: 0 !important; left: 0 !important; }

#flash-content {
    margin: 0 auto;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.center-wrapper {
    text-align: center;
    width: 100%;
    margin-top: 20px;
}

#bottom-description {
    display: inline-block;
    width: 900px; 
    background-color: #222;
    border: 1px solid #444;
    padding: 10px;
    text-align: left; /* Reset text align for content */
}

/* Footer */
footer {
    background-color: #111;
    border-top: 3px solid #ff9900;
    padding: 20px;
    text-align: center;
    font-size: 10px;
    color: #666;
    clear: both;
    width: 100%;
}

/* Rating Buttons */
.rating-btn.liked {
    background-color: #28a745 !important;
    border-color: #1e7e34 !important;
}

.rating-btn.disliked {
    background-color: #dc3545 !important;
    border-color: #bd2130 !important;
}

/* Game Listing Stats */
.game-stats {
    display: block;
    font-size: 9px;
    color: #888;
    margin-top: 3px;
}

.like-green { color: #28a745; }
.like-yellow { color: #ffc107; }
.like-red { color: #dc3545; }
