:root {
    --background-color-dark: #000000;
    --text-color-dark: #ffffff;
    --background-color-light: #ffffff;
    --text-color-light: #000000;
    --accent-color: #00ff00;
    --secondary-accent: #ff4500;
    --header-color: purple;
}

body {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    font-family: Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color-dark);
    min-height: 100vh;
}

.light-mode {
    background: linear-gradient(135deg, #e6e6e6, #ffffff);
    color: var(--text-color-light);
}

.gif-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-image: url('/images/overlay.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
}

.header {
    text-align: center;
    color: var(--header-color);
    font-size: 60px;
    margin-top: 20px;
}

.subheader {
    text-align: center;
    color: var(--accent-color);
    font-size: 30px;
    margin-bottom: 20px;
}

.title {
    text-align: center;
    color: #ffffff;
    font-size: 36px;
    margin: 20px 0;
}

.light-mode .title {
    color: #000000;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.search-container input[type="text"] {
    width: 200px;
    padding: 8px;
    border: none;
    border-bottom: 2px solid var(--accent-color);
    outline: none;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 4px;
}

.light-mode .search-container input[type="text"] {
    background-color: rgba(255, 255, 255, 0.5);
    color: #000;
}

.search-button {
    padding: 8px 12px;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.user-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}

.username {
    margin-right: 15px;
    color: var(--accent-color);
    font-weight: bold;
}

.settings-button, .back-button, .logout-button {
    padding: 5px 10px;
    background-color: var(--accent-color);
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.settings-button:hover, .back-button:hover, .logout-button:hover {
    background-color: var(--secondary-accent);
}

/* Game Cards */
.game-card {
    width: 300px;
    margin: 15px;
    background-color: rgba(18, 18, 18, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.light-mode .game-card {
    background-color: rgba(230, 230, 230, 0.8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
}

.light-mode .game-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.game-info {
    padding: 15px;
    text-align: center;
}

.game-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ff0000;
}

.light-mode .game-name {
    color: #cc0000;
}

.info-button, .download-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.info-button:hover, .download-button:hover {
    background-color: var(--accent-color);
    color: #000;
}

/* Info Box */
.info-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 2000;
}

.light-mode .info-box {
    background-color: rgba(240, 240, 240, 0.95);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.info-header {
    position: relative;
    margin-bottom: 20px;
}

.info-header img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.light-mode .close-button {
    background-color: rgba(200, 200, 200, 0.7);
    color: #000;
}

.game-details {
    margin-top: 20px;
}

.game-details div {
    margin: 5px 0;
}

/* Safety Score Colors */
.safety-high {
    color: #00ff00;
}

.safety-medium {
    color: #ffcc00;
}

.safety-low {
    color: #ff4500;
}

.safety-very-low {
    color: #ff0000;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.page-button {
    padding: 8px 15px;
    margin: 0 5px;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.page-button:hover {
    background-color: var(--secondary-accent);
}

.page-button.active {
    background-color: var(--secondary-accent);
}

.page-ellipsis {
    padding: 8px 15px;
    margin: 0 5px;
}

/* Search Results */
#searchResults {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.light-mode #searchResults {
    background-color: rgba(240, 240, 240, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#searchResults li {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#searchResults li:hover {
    background-color: rgba(50, 50, 50, 0.95);
}

.light-mode #searchResults li:hover {
    background-color: rgba(220, 220, 220, 0.95);
}

.search-info, .no-results {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-box {
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    padding: 30px;
    width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.light-mode .auth-box {
    background-color: rgba(240, 240, 240, 0.95);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #222;
    color: #fff;
}

.light-mode .form-control {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #000;
}

.form-control.is-invalid {
    border-color: #ff0000;
}

.invalid-feedback {
    color: #ff0000;
    font-size: 14px;
    margin-top: 5px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-accent);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.error-message {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff6666;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Toggle Mode */
.toggle-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.toggle-checkbox {
    display: none;
}

.toggle-label {
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
}

.toggle-label::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #fff;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: var(--accent-color);
}

.toggle-checkbox:checked + .toggle-label::before {
    left: calc(100% - 24px);
}

/* Bottom Text */
.bottom-text {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.rainbow-background {
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 400% 100%;
    animation: rainbowBackground 10s infinite;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
}

@keyframes rainbowBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .game-card {
        width: 100%;
        margin: 10px 0;
    }
    
    .info-box {
        width: 95%;
    }
    
    .auth-box {
        width: 90%;
        padding: 20px;
    }
    
    .search-container {
        position: relative;
        top: auto;
        left: auto;
        margin: 20px auto;
        width: 100%;
        text-align: center;
    }
    
    .user-container {
        position: relative;
        top: auto;
        right: auto;
        margin: 20px auto;
        width: 100%;
        justify-content: center;
    }
    
    .header {
        font-size: 40px;
    }
    
    .subheader {
        font-size: 24px;
    }
}