/* css/detail_styles.css (Updated) */

/* Container Layout */
.detail_container {
    /*padding: 20px;*/
    box-sizing: border-box;
    height: 90vh;
}

/* Desktop and Mobile Views */
.desktop-view {
    display: contents;
}

.mobile-view {
    height: 90vh;
    position: sticky;
    top: 5vh;
    bottom: 5vh;
    display: none;
}

/* Desktop-Specific Styles */
@media screen and (min-width: 721px) {
    .desktop-view {
        display: block;
    }
    .mobile-view {
        display: none;
    }
    .desktop-title {
        display: block;
        height: 5%;
    }
    .mobile-title {
        display: none;
    }
    #detail_user_content {
        display: flex;
    }
    #detail_user_content_mobile {
        display: none;
    }
    .detail_container {
        display: flex;
        flex-direction: column;
        /*gap: 20px;
        overflow-y: auto;*/
        top: 5vh;
        bottom: 5vh;
        background-image: url(/media/canvasGreyBrown.PNG);
    }

    .desktop-view {
        width: 100%;
    }

    .game_detail_content {
        display: flex;
        flex-direction: row;
        gap: 20px;
        height: 50%;
    }

    #detail_game_content {
        margin-top: 20px;
    }
}

/* Swipe Container (Mobile Only) */
.swipe-container {
    width: 100%;
    height: calc(100% - 5%); /* Leave space for viewIndicator */
    position: relative;
    overflow: hidden;
    background-image: url(/media/canvasGreyBrown.png);
}

.swipe-section {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    display: none;
}

/* Show the active section */
.swipe-section.active {
    display: block;
}

/* View Indicator (Mobile Only) */
.viewIndicator {
    height: 5%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: absolute;
    bottom: 0;
    background: #f0f0f0;
    border-top: 1px solid #ccc;
}

body.dark-mode .viewIndicator {
    background: #1a1a1a;
    border-top: 1px solid #00cc00;
}

.viewIndicator-button {
    flex: 1;
    padding: 5px;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
    background: #ddd;
    color: #333;
    text-align: center;
}

body.dark-mode .viewIndicator-button {
    background: #333;
    color: #fff;
}

.viewIndicator-button.active {
    background: #007bff;
    color: white;
}

body.dark-mode .viewIndicator-button.active {
    background: #00cc00;
    color: #1a1a1a;
}
  .error-message {
            color: red;
            font-size: 0.9em;
            margin-top: 5px;
        }
        .default_content_container {
            max-height: 300px;
            overflow-y: auto;
            padding: 10px;
            background: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        body.dark-mode .default_content_container {
            background: #2a2a2a;
            border-color: #00cc00;
            color: #fff;
        }
        .guide-title {
            font-size: 1.2em;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .guide-content p {
            margin: 5px 0;
        }
        .event-item, .news-item {
            cursor: pointer;
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            transition: background-color 0.2s;
        }
        .event-item:hover, .news-item:hover {
            background-color: #f0f0f0;
        }
        body.dark-mode .event-item, body.dark-mode .news-item {
            border-color: #00cc00;
        }
        body.dark-mode .event-item:hover, body.dark-mode .news-item:hover {
            background-color: #444;
        }
/* userView Styles (Mobile) */
.game_view_mobile {
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: space-around;
}
.game_view_mobile_left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark-mode .game_view_mobile {
    background: #1a1a1a;
    border: 1px solid #00cc00;
}

.game_view_mobile .game_logo {
    margin-bottom: 10px;
}

.game_view_mobile .game_logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.game_view_mobile .resource_icons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.game_view_mobile .resource_icons .icon-row.top-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
    flex-direction: column
}

.game_view_mobile .resource_icons .resource-icon {
    width: 33px !important;
    height: 33px !important;
    object-fit: contain;
    padding: 6px;
}

.game_view_mobile .timer-info {
    text-align: center;
    font-size: 0.9em;
}

.detail_user_content_mobile {
    height: 50%;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow-y: auto;
}

body.dark-mode .detail_user_content_mobile {
    background-color: #2a2a2a;
    border: 1px solid #00cc00;
}

#load_more_chat {
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#load_more_chat:hover {
    background-color: #0056b3;
}

/* socialView Styles (Mobile) 
#socialView {
    display: flex;
    flex-direction: column;
}*/

.social-content {
    flex: 1;
    overflow-y: auto;
}

.social-content .chat_content,
.social-content .server_content {
    height: 100%;
}

.social-selector {
    height: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 5px 0;
    border-top: 1px solid #ccc;
}

body.dark-mode .social-selector {
    border-top: 1px solid #00cc00;
}

.social-selector-button {
    flex: 1;
    padding: 5px;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
    background: #ddd;
    color: #333;
}

body.dark-mode .social-selector-button {
    background: #333;
    color: #fff;
}

.social-selector-button.active {
    background: #007bff;
    color: white;
}

body.dark-mode .social-selector-button.active {
    background: #00cc00;
    color: #1a1a1a;
}

/* infoView Styles (Mobile) */
#infoView {
    overflow-y: auto;
}

/* Responsive Design */
@media screen and (max-width: 720px) {
    .desktop-view {
        display: none;
    }

    .mobile-view {
        display: block;
    }

    .detail_container {
        display: contents;
        padding: 10px;
        height: calc(100vh - 120px);
        position: fixed;
        top: 60px;
        bottom: 60px;
        left: 0;
        right: 0;
        overflow: hidden;
    }
}

@media (max-width: 720px) {
    .desktop-view {
        display: none;
    }
    .mobile-view {
        display: block;
    }
    .desktop-title {
        display: none;
    }
    .mobile-title {
        display: block;
    }
    #detail_user_content_mobile .detail_user_content {
        padding: 10px;
    }
    #detail_user_content_mobile .user-character-section {
        margin-bottom: 2px;
        height: auto;
    }
    #detail_user_content_mobile .activity2timeDropdown {
        max-width: 150px;
        width: 100%;
        margin-bottom: 2px;
    }
}