/* ===========================
   Creator Section Styles
   =========================== */

.creator {
    padding: 80px 0;
    background: #FFEB3B;
    position: relative;
    overflow: hidden;
}

.creator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 193, 7, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 152, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.creator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.creator-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #212121;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.creator-description {
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 4rem;
    font-weight: 800;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.creator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.creator-item {
    background: #ffffff;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.creator-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.creator-item:hover {
    transform: translateY(-8px);
    border-color: #FFC107;
    box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
}

.creator-item:hover::before {
    opacity: 1;
}

.creator-icon {
    aspect-ratio: 1;
    border-radius: 0;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 15px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.creator-item:hover .creator-icon {
    transform: scale(1.05);
}

.creator-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block !important;
    margin: 0 auto !important;
}

.creator-item:hover .creator-image {
    transform: scale(1.1);
}

.creator-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFC107, #FF9800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.creator-booth-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212121;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.creator-item:hover .creator-booth-name {
    color: #424242;
}


/* 非表示アイテム用スタイル */
.creator-item-hidden {
    display: none;
}

.creator-item-hidden.creator-item-show {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    transform: translateY(30px);
    animation: creatorItemFadeIn 0.6s ease forwards;
}

@keyframes creatorItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* グリッドレイアウトの動的調整 */
.creator-grid.expanded {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.creator-grid.expanded .creator-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 250px;
}

.creator-grid.expanded .creator-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.creator-grid.expanded .creator-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 表示/非表示切り替え時の確実なセンタリング */
.creator-item-hidden.creator-item-show .creator-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.creator-item-hidden.creator-item-show .creator-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
}

.creator-button-wrapper {
    text-align: center;
    margin-top: 40px;
}

.creator-all-link {
    display: inline-block;
    padding: 15px 40px;
    background: #212121;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid #212121;
    cursor: pointer;
    font-family: inherit;
}

.creator-all-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.creator-all-link:hover::before {
    left: 100%;
}

.creator-all-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(33, 33, 33, 0.3);
    background: #424242;
}

/* ===========================
   Creator Modal Styles
   =========================== */

.creator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.creator-modal.active {
    opacity: 1;
    visibility: visible;
}

.creator-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.creator-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #e0e0e0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.creator-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #424242;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.creator-modal-close:hover {
    background: #e0e0e0;
    color: #212121;
    transform: rotate(90deg);
}

.creator-modal-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.creator-modal-icon {
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
    border-radius: 0;
    overflow: hidden;
    border: none;
}

.creator-modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-modal-icon .creator-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFC107, #FF9800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
}

.creator-modal-booth-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212121;
    margin-bottom: 20px;
}

.creator-modal-description {
    font-size: 1.1rem;
    color: #424242;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 500px;
}

.creator-modal-url-wrapper {
    margin-top: 20px;
}

.creator-modal-url {
    display: inline-block;
    padding: 12px 30px;
    background: #212121;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.creator-modal-url:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(33, 33, 33, 0.3);
    background: #424242;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .creator {
        padding: 60px 0;
    }

    .creator-container {
        padding: 0 15px;
    }

    .creator-grid,
    .creator-grid.expanded {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 40px;
        max-width: 600px;
    }

    .creator-grid.expanded {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .creator-grid.expanded .creator-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 200px;
    }

    .creator-grid.expanded .creator-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .creator-grid.expanded .creator-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .creator-item {
        padding: 25px 15px;
    }

    .creator-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .creator-item-hidden.creator-item-show .creator-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .creator-item-hidden.creator-item-show .creator-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .creator-placeholder {
        font-size: 2rem;
    }

    .creator-booth-name {
        font-size: 1.1rem;
    }

    .creator-modal-body {
        padding: 30px 20px;
    }

    .creator-modal-icon {
        width: 150px;
        height: 150px;
        margin-bottom: 20px;
    }

    .creator-modal-icon .creator-placeholder {
        font-size: 3rem;
    }

    .creator-modal-booth-name {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .creator-modal-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .creator-grid,
    .creator-grid.expanded {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 300px;
    }

    .creator-grid.expanded {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .creator-grid.expanded .creator-item {
        flex: 0 0 100%;
        min-width: 250px;
    }

    .creator-grid.expanded .creator-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .creator-grid.expanded .creator-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .creator-item {
        padding: 15px;
    }

    .creator-icon {
        margin-bottom: 10px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .creator-item-hidden.creator-item-show .creator-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .creator-item-hidden.creator-item-show .creator-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .creator-booth-name {
        font-size: 0.8rem;
    }

    .creator-placeholder {
        font-size: 1.5rem;
    }

    .creator-modal-content {
        width: 95%;
        margin: 20px;
    }

    .creator-modal-body {
        padding: 25px 15px;
    }
}
