/* css/style-phone.css */

/* Fonts */
@font-face {
    font-family: 'Harlow Solid';
    src: url('../media/harlow-solid.ttf') format('truetype');
}

body {
    font-family: Roboto, Arial, sans-serif; /* Body text font */
    background: #1a1a1a; /* Dark theme background */
    color: #fff; /* White text */
    margin: 0;
}

/* Dark Mode for All Elements */
body.dark-mode,
.frontpage_header,
.frontpage_footer,
.frontpage_top,
.frontpage_middle,
.frontpage_bottom,
.list_all_top,
.list_all_body,
.new_games_top,
.new_games_body,
.popular_games_top,
.popular_games_body,
.game_list,
.game_entry,
.game_entry_content,
.alphabet-nav,
.alphabet-button,
.pagination a,
.overlay-content,
.modal-content {
    background: #1a1a1a; /* Dark background */
    color: #fff; /* White text */
}

/* Header (Always Dark Mode) */
.frontpage_header {
    height: 5%;
    width: 100%;
    background: #1a1a1a; /* Dark background */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header_left,
.header_right {
    display: flex;
    align-items: center;
}

.header_title {
    font-family: 'Harlow Solid', serif; /* Gaming-inspired font */
    font-size: 0.8em;
    margin: 0 5px;
    text-decoration: none;
    cursor: pointer;
}

.header_title img {
    height: 25px;
    width: auto;
}

.header_title:hover {
    text-decoration: underline;
}

.search_container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 70%;
    margin-right: 5px;
}

.search_input {
    width: 100%;
    padding: 6px;
    font-size: 0.9em;
    margin-right: 5px;
    background: #333; /* Darker input background */
    color: #fff; /* White text */
    border: 1px solid #00cc00; /* Accent border */
}

.language_dropdown {
    height: 100%;
    background: #1a1a1a; /* Match header background */
    border: none;
}

.language_dropdown select {
    height: 100%;
    padding: 3px;
    font-size: 0.8em;
    background: #333; /* Darker dropdown background */
    color: #fff; /* White text */
    border: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 5px center;
    cursor: pointer;
}

.language_dropdown select option {
    background: #333;
    color: #fff;
}

.menu_button,
.account_button {
    padding: 5px;
    font-size: 0.8em;
    color: #fff;
    cursor: pointer;
}

/* Hover and Active States for Menu and Account Buttons */
.menu_button:hover,
.account_button:hover {
    background-color: #00cc00; /* Accent background */
    color: #1a1a1a; /* Dark text for contrast */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu_button:active,
.account_button:active {
    background-color: #009900; /* Darker accent for active state */
    color: #fff;
}

.account_button {
    flex: 0 0 auto;
    margin-left: 5px;
}

.menu_dropdown {
    display: none;
    position: absolute;
    background: #1a1a1a; /* Dark background */
    color: #fff;
    min-width: 100px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    top: 100%;
    left: 0;
    z-index: 2001;
}

.menu_dropdown a {
    color: #fff;
    padding: 8px;
    text-decoration: none;
    display: block;
    font-size: 0.8em;
}

.menu_dropdown a:hover {
    background: #00cc00; /* Accent color on hover */
}

.search_suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #1a1a1a; /* Dark background */
    border: 1px solid #00cc00; /* Accent border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 1500;
    max-height: 150px;
    overflow-y: auto;
}

.suggestion_item {
    padding: 8px;
    cursor: pointer;
    color: #fff; /* White text */
}

.suggestion_item:hover {
    background: #00cc00; /* Accent color on hover */
}

/* Account Popup */
.account_popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 450px;
    background: #1a1a1a; /* Dark background */
    border: 2px solid #00cc00; /* Accent border */
    border-radius: 15px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    color: #fff; /* White text */
}

.account_popup_left,
.account_popup_middle,
.account_popup_right {
    width: 300px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.account_popup_left {
    border-bottom: 2px solid #00cc00; /* Accent border */
}

.account_popup_middle {
    border-bottom: 2px solid #00cc00; /* Accent border */
}

.google_login,
.close_overlay,
.local_login,
.logout_option,
.profile_option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.google_login img,
.close_overlay img,
.local_login img,
.logout_option img,
.profile_option img {
    width: 75px;
    height: 75px;
}

#account_popup_logged_out_text {
    font-size: 12px;
    color: #fff; /* White text */
    padding: 15px;
    text-align: center;
    line-height: 1.5;
}

/* Request New Game Button */
#addGameHeaderText {
    color: #00cc00; /* Accent color */
    border: 1px solid #00cc00; /* Accent border */
    border-radius: 5px;
    padding: 3px 5px;
    cursor: pointer;
    margin-left: 5px;
    font-size: 0.8em;
}

/* Hover and Active States for #addGameHeaderText */
#addGameHeaderText:hover {
    background-color: #00cc00; /* Accent background */
    color: #1a1a1a; /* Dark text for contrast */
    transition: background-color 0.3s ease, color 0.3s ease;
}

#addGameHeaderText:active {
    background-color: #009900; /* Darker accent for active state */
    color: #fff;
}

/* Footer (Always Dark Mode) */
/* Footer (Always Dark Mode) */
.frontpage_footer {
    height: 5%;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 0 10px;
}

.footer_left,
.footer_right {
    display: flex;
    align-items: center;
}

.frontpage_footer a {
    color: #00cc00;
    text-decoration: none;
    font-size: 0.8em;
    margin: 0 5px;
}

.frontpage_footer a:hover {
    text-decoration: underline;
}

/* Frontpage Sections */
.frontpage_top {
    height: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a; /* Dark background */
}

.frontpage_top h1 {
    font-family: 'Harlow Solid', serif; /* Gaming-inspired font */
    font-size: 48px;
    text-align: center;
    padding: 0 10px;
}

.frontpage_middle,
.frontpage_bottom {
    height: 30%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px;
    background: #1a1a1a; /* Dark background */
}

.list_new_label,
.list_popular_label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.8em;
    font-family: 'Harlow Solid', serif; /* Gaming-inspired font */
}

.new_left,
.new_right,
.popular_left,
.popular_right {
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    color: #00cc00; /* Accent color */
}

.new_left:hover,
.new_right:hover,
.popular_left:hover,
.popular_right:hover {
    color: #009900; /* Darker accent on hover */
}

/* Game List for index.php */
.game_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    gap: 10px;
}

.game_list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff; /* White text */
    margin: 5px;
    width: 23%;
    max-width: 120px;
}

.game_list img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 1px solid #00cc00; /* Accent border */
}

.game_icon {
    width: 120px;
    height: 120px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #00cc00; /* Accent border */
}

span {
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
}

/* Game List for new_games.php and popular_games.php */
.new_games_body,
.popular_games_body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    padding: 10px;
    width: 100%;
}

.game_entry {
    display: flex;
    align-items: center;
    background-color: #2a2a2a; /* Slightly lighter dark for contrast */
    border-radius: 8px;
    padding: 10px;
}

.game_entry img,
.game_entry .game_icon {
    margin-right: 10px;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.game_entry_content h2 {
    font-family: 'Harlow Solid', serif; /* Gaming-inspired font */
    margin-bottom: 5px;
    font-size: 1em;
}

/* Overlay Styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.overlay-content {
    position: relative;
    background-color: #1a1a1a; /* Dark background */
    margin: 5% auto;
    width: 50%;
    height: 50%;
    border: 1px solid #00cc00; /* Accent border */
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#closeOverlay {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background: none;
    color: #fff;
}

.overlay-content input,
.overlay-content select,
.overlay-content button {
    width: 200px;
    margin-top: 5px;
    background: #333;
    color: #fff;
    border: 1px solid #00cc00;
}

.overlay-content .form-field {
    position: absolute;
    right: 20px;
}

.overlay-content .form-field.upper-right {
    top: 20px;
}

.overlay-content .form-field.middle-right {
    top: 50%;
    transform: translateY(-50%);
}

.overlay-content .form-field.lower-right {
    bottom: 20px;
}

#newCharButton {
    width: 100px;
    height: 100px;
    background-color: #333;
    border: 1.5px solid #00cc00;
    cursor: pointer;
}

#submitNewCharacterButton {
    padding: 10px 20px;
    cursor: pointer;
}

/* Ensure the button and text align on the left */
.overlay-content .button-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.overlay-content .button-container p {
    margin: 0;
    margin-right: 20px;
}

/* Media query for 720x1280 (mobile portrait) */
@media screen and (min-width: 720px) and (max-height: 1280px) {
    .account_popup {
        width: 300px;
        height: 450px;
    }

    .account_popup_left,
    .account_popup_middle,
    .account_popup_right {
        width: 300px;
        height: 150px;
    }

    .google_login img,
    .close_overlay img,
    .local_login img,
    .logout_option img,
    .profile_option img {
        width: 75px;
        height: 75px;
    }
}

/* Media query for 720x300 (if intentional) */
@media screen and (min-width: 720px) and (max-height: 300px) {
    .account_popup {
        width: 200px;
        height: 250px;
        transform: translate(-50%, -50%);
    }

    .account_popup_left,
    .account_popup_middle,
    .account_popup_right {
        width: 200px;
        height: 83px;
    }

    .google_login img,
    .close_overlay img,
    .local_login img,
    .logout_option img,
    .profile_option img {
        width: 50px;
        height: 50px;
    }

    .google_login span,
    .close_overlay span,
    .local_login span,
    .logout_option span,
    .profile_option span {
        font-size: 10px;
    }
}

/* Responsive Game Entries for Smaller Screens */
@media (max-width: 360px) {
    .game_entry {
        flex-direction: column;
        height: auto;
        text-align: center;
    }

    .game_entry img,
    .game_entry .game_icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .imprint_general_text_container {
        padding: 15px; /* Smaller padding for mobile */
    }
}