/* ========================================================
   MOD PROFILES - General Styles
======================================================== */
.mod-profiles-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 100px 20px 40px 20px;
    font-family: sans-serif;
}

.mod-profiles-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.mod-profiles-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #ff0000;
}

/* ========================================================
   MOD PROFILES - List Page (Grid)
======================================================== */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.profile-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-card-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.profile-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-card:hover .profile-card-img {
    transform: scale(1.05);
}

.profile-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-card-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 15px;
    margin-bottom: 12px;
}

.title-label {
    font-size: 13px;
    font-weight: normal;
    color: #777;
    display: block;
    margin-bottom: 4px;
}

.profile-card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: #222;
    line-height: 1.4;
    width: 100%;
    text-align: center;
    /* Force grid view to wrap version below title */
}

.profile-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin: 0;
    max-width: 100%;
}

.profile-card-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-meta i {
    color: #ff0000;
    margin-right: 4px;
}

.profile-card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    text-align: left;
}

.profile-card-code {
    font-size: 13px;
    color: #007bff;
    background: #f0f8ff;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px dashed #007bff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
    width: fit-content;
    margin: 0;
}

.profile-card-code:hover {
    background: #007bff;
    color: #fff;
}

/* View Toggle Buttons */
.view-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.view-btn.active {
    color: #ff0000;
}

.view-btn:hover:not(.active) {
    color: #666;
}

/* ========================================================
   MOD PROFILES - List View Layout
======================================================== */
.profiles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profiles-list .profile-card {
    flex-direction: row;
    height: auto;
    align-items: stretch;
}

.profiles-list .profile-card-img-wrapper {
    width: 160px;
    /* 蜊雁・縺ｮ繧ｵ繧､繧ｺ縺ｫ邵ｮ蟆・*/
    height: auto;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

.profiles-list .profile-card-body {
    padding: 10px 15px;
    /* 鬮倥＆縺ｫ蜷医ｏ縺帙※菴咏區繧ょｰ上＆縺・*/
    justify-content: center;
}

.profiles-list .profile-card-title {
    width: auto;
    /* Reset width for list view to keep version on same line */
}

@media (max-width: 600px) {
    .profiles-list .profile-card {
        flex-direction: column;
        height: auto;
    }

    .profiles-list .profile-card-img-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ========================================================
   MOD PROFILES - Detail Page
======================================================== */
.profile-detail-header {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stream-info-container {
    width: 100%;
    max-width: 336px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-right: 1px solid #eee;
}

.stream-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    display: block;
}

.stream-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.stream-thumbnail-wrapper:hover .stream-thumbnail {
    opacity: 1;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    padding-left: 5px;
    /* 蜈牙ｭｦ隱ｿ謨ｴ */
    transition: transform 0.3s ease, background 0.3s;
}

.stream-thumbnail-wrapper:hover .play-icon-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ff0000;
}

.stream-details {
    padding: 15px;
}

.stream-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: left;
}

.stream-date {
    font-size: 13px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: left;
}

.profile-info-section {
    padding: 25px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-detail-title {
    font-size: 26px;
    margin: 0 0 10px 0;
    color: #222;
    text-align: center;
}

.profile-detail-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 100%;
}

.profile-detail-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-mod-code {
    background: #f0f8ff;
    border: 1px dashed #007bff;
    color: #007bff;
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-block;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.2s, color 0.2s;
}

.detail-mod-code:hover {
    background: #007bff;
    color: #fff;
}

.profile-detail-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: left;
}

/* --- Mods List --- */
.mods-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #ff0000;
}

.mods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.mod-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    border-left: 4px solid transparent;
}

.mod-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left-color: #ff0000;
}

.mod-icon {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f4f4f4;
}

.mod-info {
    flex: 1;
    overflow: hidden;
}

.mod-name {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-cat {
    font-size: 12px;
    color: #888;
}

/* --- Accordion (Notes) --- */
.accordion {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.accordion-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #fafafa;
    font-weight: bold;
    color: #333;
    user-select: none;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #f0f0f0;
}

.accordion-icon {
    transition: transform 0.3s;
}

.accordion.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #fff;
}

.accordion.open .accordion-body {
    padding: 20px;
    max-height: 1000px;
    /* 蜊∝・縺ｪ鬮倥＆ */
}

.accordion-content {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

/* Back Button */
.back-btn-wrapper {
    text-align: center;
    margin: 40px 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    /* Slightly smaller default */
    background: #fff;
    color: #333 !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.back-btn:hover {
    background: #f1f1f1;
    border-color: #bbb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .mod-profiles-title {
        font-size: 20px;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .mods-list {
        grid-template-columns: 1fr;
    }

    .profile-detail-title {
        font-size: 22px;
    }

    .profile-detail-header {
        flex-direction: column;
    }

    .stream-info-container {
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* ========================================================
   MOD Alert Notice
======================================================== */
.mod-alert-notice {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: left;
}

.mod-alert-notice h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: bold;
}

.mod-alert-notice h4 i {
    margin-right: 5px;
}

.mod-alert-notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================================
   MOD Guide Banner (Shared)
======================================================== */
.mod-guide-banner {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mod-guide-banner a {
    display: inline-block;
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.mod-guide-banner a:hover {
    background: #0056b3;
    transform: translateY(-2px);
    color: white;
}

.profile-card-header-row {
    position: relative;
}

/* --- いいねボタン --- */
.like-btn {
    position: absolute;
    top: -15px;
    right: -10px;
    background: transparent;
    border: none;
    padding: 5px 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: none;
}

.like-btn:hover {
    color: #ff6b81;
}

.like-btn.liked {
    background: transparent;
    color: #ff6b81;
}

/* Tooltip for Like button */
.like-btn::before {
    content: "これ好き";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: #fff;
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.like-btn::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    border-width: 4px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.like-btn:hover::before,
.like-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

.like-btn:hover::after {
    transform: translateX(-50%) translateY(0px);
}

/* ========================================================
   MOD Code Tabs (Host / Client)
======================================================== */
.code-tabs-wrapper {
    margin-bottom: 15px;
    width: 100%;
}

.code-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: -1px;
}

.code-tab-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: background 0.2s, color 0.2s;
    font-weight: bold;
}

.code-tab-btn.active {
    background: #e8f4fd;
    border-color: #007bff;
    border-bottom-color: #e8f4fd;
    color: #007bff;
    z-index: 2;
    position: relative;
}

.code-tab-btn:hover:not(.active) {
    background: #eee;
}

.code-tab-content-wrapper {
    border: 1px solid #007bff;
    border-radius: 0 6px 6px 6px;
    background: #e8f4fd;
    padding: 10px;
    position: relative;
}

.code-tab-content {
    display: none;
}

.code-tab-content.active {
    display: block;
}

.code-tab-content .profile-card-code {
    margin: 0;
    border: none;
    background: transparent;
    padding: 0;
}

.code-tab-content .profile-card-code:hover {
    color: #0056b3;
}

/* For Detail Page (Vertical layout) */
.detail-code-item {
    margin-bottom: 15px;
}

.detail-code-item-label {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    display: block;
}