:root {
    --bg-color: #f4f4f4;
    --text-color: #000;
    --card-bg: #fff;
    --nav-card-bg: #f9f9f9;
    --nav-card-hover: #f0f0f0;
    --accent-color: #3399ff;
    --accent-hover: #007bff;
    --sidebar-bg: #fff;
    --sidebar-border: #eaeaea;
    --search-bg: rgba(255, 255, 255, 0.8);
    --search-focus: rgba(255, 255, 255, 0.95);
    --category-tag: #e6f2ff;
    --footer-text: #666;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2a2a2a;
        --nav-card-bg: #333;
        --nav-card-hover: #3a3a3a;
        --accent-color: #3399ff;
        --accent-hover: #1a8cff;
        --sidebar-bg: #252525;
        --sidebar-border: #444;
        --search-bg: rgba(50, 50, 50, 0.8);
        --search-focus: rgba(60, 60, 60, 0.95);
        --category-tag: rgba(51, 153, 255, 0.2);
        --footer-text: #aaa;
    }
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    flex-grow: 1;
}

@media (max-width: 600px) {
    .container {
        max-width: 90vw;
        padding: 20px;
        margin: 20px;
    }
}

.game-page .game-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    overflow: hidden;
    flex-grow: 1;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 25px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

h1 {
    margin-top: 0;
    font-size: 2.2em;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.5em;
    margin-top: 30px;
}

p {
    margin-bottom: 20px;
}

ul {
    text-align: left;
    margin: 20px auto;
    display: inline-block;
    list-style-type: disc;
    padding-left: 20px;
}

ul li {
    margin-bottom: 8px;
}

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

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

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.social-icons img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

@media (prefers-color-scheme: dark) {
    .social-icons img {
        filter: invert(1);
    }
}

.social-icons img:hover, .social-icons img:focus {
    transform: scale(1.2);
    filter: brightness(0.8);
}

.navigation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.nav-card {
    background: var(--nav-card-bg);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 150px;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.nav-card h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: var(--text-color);
}

.nav-card p {
    font-size: 0.9em;
    color: var(--text-color);
    flex-grow: 1;
}

.nav-card a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-weight: bold;
}

.nav-card a:hover {
    background-color: var(--accent-hover);
    text-decoration: none;
}

.back-home {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 25px;
    background-color: #6c757d;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.back-home:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    text-decoration: none;
}

.main-nav {
    background: var(--card-bg);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.main-nav li a:hover {
    background-color: var(--accent-color);
    color: white;
}

@media (max-width: 600px) {
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

.footer {
    margin-top: auto;
    padding: 40px;
    text-align: center;
    font-size: 0.9em;
    color: var(--footer-text);
}

.cloud-page .file-listing {
    text-align: left;
    margin-top: 30px;
    padding: 0 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cloud-page .file-listing h2 {
    font-size: 1.6em;
    margin-bottom: 20px;
    text-align: center;
}

.cloud-page .file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: var(--bg-color);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-wrap: wrap;
}

.cloud-page .file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cloud-page .file-item a {
    flex-grow: 1;
    font-size: 1.1em;
    color: var(--text-color);
    text-decoration: none;
    word-break: break-all;
    margin-right: 15px;
}

.cloud-page .file-item a:hover {
    text-decoration: underline;
}

.cloud-page .file-details {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
    flex-shrink: 0;
}

.cloud-page .file-details span {
    margin-left: 15px;
}

.cloud-page .pagination {
    text-align: center;
    margin-top: 30px;
    padding: 10px 0;
}

.cloud-page .pagination a,
.cloud-page .pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cloud-page .pagination a:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

.cloud-page .pagination span.current-page {
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
    border-color: var(--accent-color);
}

.cloud-page .pagination span.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .cloud-page .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .cloud-page .file-item a {
        width: 100%;
        margin-bottom: 5px;
        margin-right: 0;
    }
    .cloud-page .file-details {
        width: 100%;
        justify-content: flex-start;
    }
    .cloud-page .file-details span {
        margin-left: 0;
        margin-right: 15px;
    }
}

.game-page .hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 101;
    display: none;
    transition: all 0.3s;
}

.game-page .hamburger:hover,
.game-page .hamburger:focus {
    background: var(--accent-hover);
    transform: scale(1.1);
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.game-page .close-sidebar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: none;
}

.game-page .sidebar.visible ~ .close-sidebar {
    display: block;
}

.game-page .sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    padding: 30px 20px;
    border-right: 1px solid var(--sidebar-border);
    transition: transform 0.3s ease;
}

.game-page .sidebar h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--accent-color);
    font-size: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.game-page .category-list {
    list-style: none;
}

.game-page .category-list li {
    margin-bottom: 10px;
}

.game-page .category-list a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-color);
    background: var(--nav-card-bg);
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 16px;
    text-align: left;
}

.game-page .category-list a:hover {
    background: var(--nav-card-hover);
    transform: translateX(5px);
}

.game-page .category-list a.active {
    background: var(--accent-color);
    color: white;
    font-weight: bold;
}

.game-page .navigation-grid {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.game-page .section-title h2 {
    font-size: 1.8em;
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.game-page .search-container {
    position: relative;
    margin: 0 auto 30px;
    max-width: 600px;
    width: 100%;
}

.game-page .search-box {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 50px;
    border: none;
    background: var(--search-bg);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.game-page .search-box:focus {
    outline: none;
    background: var(--search-focus);
    box-shadow: 0 0 0 3px rgba(51, 153, 255, 0.3);
}

.game-page .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: rgba(0,0,0,0.5);
}

.game-page .games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.game-page .game-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.game-page .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: rgba(0,0,0,0.03);
    border-radius: 15px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .game-page .game-container {
        flex-direction: column;
        padding-top: 80px;
    }

    .game-page .hamburger {
        display: block;
    }

    .game-page .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        border-right: 1px solid var(--sidebar-border);
        background: var(--sidebar-bg);
    }

    .game-page .sidebar.visible {
        transform: translateX(0);
    }
}

@media (max-width: 600px) {
    .game-page .games-container {
        grid-template-columns: 1fr;
    }

    .game-page .navigation-grid {
        padding: 20px 15px;
    }

    .game-page .section-title h2 {
        font-size: 1.5em;
    }
}
