@charset "UTF-8";

/* ==========================================================================
   Member Detail Page Styles (2025 Modern Rich Design)
   ========================================================================== */

:root {
    --dpfp-blue: #043e80;
    --dpfp-yellow: #eeb902;
    --dpfp-text: #333;
    --dpfp-bg: #f9fafb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-sharp: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--dpfp-bg);
    color: var(--dpfp-text);
    font-family: "Noto Sans JP", sans-serif;
}

/* Hero Section */
.member-detail-hero {
    position: relative;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #fff 0%, #f3f4f6 100%);
    overflow: hidden;
}

.member-detail-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(238, 185, 2, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.member-profile-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 70px;
}

.member-title-badge {
    display: inline-block;
    background: var(--dpfp-yellow);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(238, 185, 2, 0.3);
}

.member-name-large {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--dpfp-blue);
    margin: 0 0 5px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.member-name-en {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    color: var(--dpfp-blue);
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 0;
    display: block;
    transform: translateX(0.15em);
    /* Optical centering */
}

.member-catchphrase {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dpfp-text);
    margin-bottom: 0;
    background: linear-gradient(90deg, var(--dpfp-blue) 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gallery Section */
.gallery-section {
    padding-bottom: 40px;
}

.gallery-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
}

/* Main Swiper */
.swiper-main {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sharp);
}

.swiper-main .swiper-slide {
    width: 100%;
    height: 100%;
}

.swiper-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background-color: #f0f2f5;
}

/* Thumb Swiper */
.swiper-thumbs {
    width: 100%;
    height: auto;
    padding: 10px 0;
}

.swiper-thumbs .swiper-slide {
    width: 25%;
    height: auto;
    aspect-ratio: 3 / 2;
    opacity: 0.4;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* GLightbox Override (Nuclear Fix) */
.glightbox-container .gslide-media {
    box-sizing: border-box !important;
    height: auto !important;
    width: auto !important;
    max-height: 90vh !important;
    max-width: 90vw !important;
    margin: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.glightbox-container .gslide-image {
    height: auto !important;
    width: auto !important;
    max-height: 90vh !important;
    max-width: 90vw !important;
}

.glightbox-container .gslide-image img,
.glightbox-container .gslide-media img {
    max-height: 90vh !important;
    max-width: 90vw !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: auto !important;
    display: block !important;
    cursor: default !important;
    /* Disable zoom cursor */
}

.swiper-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--dpfp-blue);
}

.swiper-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Content (Bento Grid) */
.profile-content-bento {
    max-width: 1000px;
    margin: 0 auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    padding: 0 20px;
}

.bento-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.bento-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dpfp-blue);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bio Card (Large) */
.bio-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.bio-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: auto;
}

.social-links-bento {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-official-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: var(--dpfp-blue);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-official-site:hover {
    background: var(--dpfp-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Roles & Social Card (Large) */
.roles-main-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.roles-section {
    flex: 1;
}

.roles-list-large {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-item-large {
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
}

.role-item-large.major {
    background: rgba(238, 185, 2, 0.1);
    color: #b48d00;
    border-color: rgba(238, 185, 2, 0.2);
    font-size: 1.1rem;
}

.role-item-large.minor {
    background: rgba(4, 62, 128, 0.05);
    color: var(--dpfp-blue);
    border-color: rgba(4, 62, 128, 0.1);
}

.large-links {
    margin-top: 40px;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.large-links .social-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s ease, color 0.2s ease;
    color: #333;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    /* Default fallback */
}

.btn-x {
    color: #000;
}

.btn-fb {
    color: #1877f2;
}

.btn-yt {
    color: #ff0000;
}

.btn-ig {
    color: #e4405f;
}

.btn-web {
    color: #333;
}

.btn-mixi2 {
    color: #d1ad59;
    /* Gold-ish for mixi2? Or Orange? mixi is orange. */
}

.large-links .social-btn:hover {
    transform: scale(1.1);
}

/* Stats Card */
.stats-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dpfp-text);
}

.age-badge {
    display: inline-block;
    background: #eee;
    color: #555;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Personal Card (Motto + MBTI) */
.personal-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
    gap: 20px;
}

.card-label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.motto-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dpfp-blue);
    font-family: "Noto Serif JP", serif;
    margin: 0;
    line-height: 1.4;
}

.mbti-value-large {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--dpfp-blue), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.05em;
    line-height: 1;
}

.card-divider {
    width: 40px;
    height: 2px;
    background: #ddd;
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 900px) {
    .profile-content-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .roles-main-card,
    .stats-card,
    .personal-card {
        grid-column: span 1;
        grid-row: auto;
    }

    .large-links .social-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .member-detail-hero {
        padding-top: 100px;
    }

    .member-name-large {
        font-size: 2.5rem;
    }

    .gallery-container {
        padding: 20px;
        border-radius: 20px;
    }

    .swiper-main {
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .swiper-thumbs {
        height: auto;
    }
}

/* Back to List Button */
.member-footer-nav {
    text-align: center;
    margin-top: 60px;
}

.btn-back-list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border: 2px solid var(--dpfp-blue);
    color: var(--dpfp-blue);
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #fff;
}

.btn-back-list:hover {
    background: var(--dpfp-blue);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(4, 62, 128, 0.2);
}

/* Glossary Card */
.glossary-card {
    grid-column: span 4;
}

.glossary-list-member {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.glossary-item-member {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50px;
    text-decoration: none;
    color: var(--dpfp-text);
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    position: relative;
    /* For tooltip */
}

.glossary-item-member:hover {
    background: var(--dpfp-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(4, 62, 128, 0.2);
    border-color: var(--dpfp-blue);
}

.glossary-item-member i {
    font-size: 0.8em;
    opacity: 0.5;
}

.glossary-item-member:hover i {
    opacity: 1;
}

/* Tooltip Styles */
.glossary-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    width: 250px;
    text-align: left;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.glossary-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.glossary-item-member:hover .glossary-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-15px);
}

@media (max-width: 900px) {
    .glossary-card {
        grid-column: span 1;
    }
}

/* Diet Session Card */
/* Diet Session Card */
.diet-session-card {
    grid-column: 1 / -1 !important;
    /* Force full width */
    /* margin-top removed to use grid gap */
}

@media (max-width: 900px) {
    .diet-session-card {
        grid-column: span 1 !important;
    }
}
/* Diet Modal Styles */
.diet-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker backdrop */
    z-index: 100000; /* Very high z-index */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px); /* Blur effect */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.diet-modal.active {
    display: flex;
    opacity: 1;
}

.diet-modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 30px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.diet-modal.active .diet-modal-content {
    transform: scale(1);
}

.diet-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f0f2f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.diet-modal-close:hover {
    background: #e5e7eb;
    color: #333;
}

.diet-modal-title {
    margin: 0 0 20px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dpfp-blue);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.diet-archive-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.diet-archive-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.diet-archive-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.diet-link-archive {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    padding: 4px 10px;
    background: #f9fafb;
    border-radius: 6px;
    transition: all 0.2s;
}

.diet-link-archive:hover {
    background: #f3f4f6;
    color: var(--dpfp-blue);
}
