/* --- General Styles & Theming --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.light-mode {
    background-color: #f4f7f9;
    color: #333;
}

.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.dark-mode .review-card, .dark-mode .hot-game-card, .dark-mode .modal-content {
    background-color: #2c2c2c;
    border-color: #444;
}

.dark-mode input[type="text"] {
    background-color: #333;
    color: #f0f0f0;
    border-color: #555;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    margin: 0;
    font-weight: 700;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#theme-switcher, .language-switcher button, #refresh-button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px 10px;
    transition: background-color 0.2s, transform 0.2s;
}

#refresh-button {
    font-size: 1.5em; /* Make refresh icon bigger */
}

.language-switcher button {
    font-size: 1em;
    padding: 8px 12px;
}

.dark-mode #theme-switcher, .dark-mode .language-switcher button, .dark-mode #refresh-button {
    border-color: #555;
}

#theme-switcher:hover, .language-switcher button:hover, #refresh-button:hover {
    transform: scale(1.1);
    background-color: rgba(0,0,0,0.1);
}

.dark-mode #theme-switcher:hover, .dark-mode .language-switcher button:hover, .dark-mode #refresh-button:hover {
    background-color: rgba(255,255,255,0.1);
}

/* --- Search --- */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

input[type="text"] {
    width: 50%;
    max-width: 500px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 1em;
}

/* --- Sections --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.section-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.timer {
    font-size: 1.2em;
    font-weight: 500;
    color: #ff4500;
    background-color: rgba(255, 69, 0, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
}

.dark-mode .section-header {
    border-bottom-color: #333;
}

/* --- Hot Games Container (Carousel) --- */
.hot-games-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin; /* For Firefox */
}

.hot-games-container::-webkit-scrollbar {
    height: 8px;
}
.hot-games-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}
.dark-mode .hot-games-container::-webkit-scrollbar-thumb {
    background-color: #555;
}


.hot-game-card {
    flex: 0 0 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

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

.hot-game-card img {
    width: 100%;
    height: 94px;
    object-fit: cover;
}

.hot-game-card h3 {
    font-size: 1em;
    margin: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Game Reviews Grid --- */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.review-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.review-card img {
    width: 100%;
    height: 103px;
    object-fit: cover;
}

.review-card h3 {
    font-size: 1.1em;
    margin: 10px 15px;
}

/* --- Modal --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    animation: slideIn 0.3s;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #000;
}

.dark-mode .close-button:hover {
    color: #fff;
}

#modal-game-title {
    margin-top: 0;
    font-size: 2em;
}

.modal-tags-container .tag {
    display: inline-block;
    background-color: #e0e0e0;
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    margin: 5px 5px 15px 0;
    font-size: 0.9em;
}

.dark-mode .modal-tags-container .tag {
    background-color: #555;
    color: #f0f0f0;
}

.video-link-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff4500;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.video-link-button:hover {
    background-color: #e03e00;
}


/* --- Animations --- */
@keyframes fadeIn {
    from {opacity: 0;} to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px);} to {transform: translateY(0);}
}
