:root {
    --violet-primary: #8b5cf6;
    --violet-600: #7C3AED;
    --white: #ffffff;
    --black: #000000;
}

.work-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

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

.work-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .7) 100%);
    opacity: 0;
    transition: opacity .3s;
}

.work-item:hover::after {
    opacity: 1;
}

.caption {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    color: var(--white);
    font-weight: 700;
    opacity: 0;
    transition: opacity .3s;
}

.work-item:hover .caption {
    opacity: 1;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.diagonal-sash {
    position: absolute;
    top: 0;
    left: -20%;
    width: 140%;
    height: 80px;
    background: rgba(255, 255, 255, .15);
    transform: rotate(-2deg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .1);
    z-index: 5
}

.sash-text {
    font-size: 4rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: .1em;
    text-shadow: 3px 3px 20px rgba(0, 0, 0, .3)
}

/* --- 1. 赤い箱 (外枠) --- */
/* 赤い箱自体は合っていたので、標準的な中央寄せに戻します */
.pentagon-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 60px auto; /* これで中央に来ます */
    
    /* ※もしこれで赤い箱がズレるようなら、前回の left:50% の方を使ってください */
    
    /* 念のため */
    box-sizing: border-box;
    z-index: 1; 
}

@media (min-width: 640px) {
    .pentagon-wrapper {
        width: 400px;
        height: 400px;
    }
}

/* --- 2. 中央タイトル --- */
.creative-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.4rem; 
    font-weight: 900;
    color: rgba(0, 0, 0, 0.8);
    z-index: 10;
    line-height: 1.1;
    pointer-events: none;
    margin: 0;
    width: 100%;
}
@media (min-width: 640px) {
    .creative-title { font-size: 2rem; }
}

/* --- 3. ボタン共通設定 (超重要) --- */
.service-item {
    position: absolute;
    
    /* ★ここがポイント */
    /* 全てのボタンの基準点を「赤い箱のど真ん中」に強制統一します */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 0.8rem;
    color: #7c3aed;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

@media (min-width: 640px) {
    .service-item { padding: 15px 35px; font-size: 1.1rem; }
}

.service-item:hover {
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 20;
    transform: translate(-50%, -50%) scale(1.1);
}

/* --- 4. ボタン配置 (左右対称・絶対指定版) --- */
/* 中心(0,0)からの距離で指定するため、計算ズレが起きません */

/* [上] MOVIE */
.movie {
    margin-top: -95px; /* 上に95px */
    margin-left: 0px;
}

/* [右中] DESIGN (旧Graphic) */
.graphic {
    margin-top: -25px;
    margin-left: 85px; /* 右に85px */
}

/* [左中] PHOTO */
/* 画像で被っていた原因を取り除きます */
.photo {
    margin-top: -25px;
    margin-left: -85px; /* 左に85px (右と同じ数値なので必ず対称になる) */
}

/* [右下] SNS (旧Event) */
.event {
    margin-top: 85px;
    margin-left: 55px; /* 右に55px */
}

/* [左下] EVENT (旧Design) */
.design {
    margin-top: 85px;
    margin-left: -55px; /* 左に55px */
}


/* --- PC用 --- */
@media (min-width: 640px) {
    .movie { margin-top: -170px; margin-left: 0px; }
    .graphic { margin-top: -40px; margin-left: 160px; }
    .photo { margin-top: -40px; margin-left: -160px; }
    .event { margin-top: 150px; margin-left: 100px; }
    .design { margin-top: 150px; margin-left: -100px; }
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width .3s;
}

.nav-link:hover::after {
    width: 100%;
}

.icon-animated {
    transition: .3s;
}

.icon-animated:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 10px 20px rgba(139, 92, 246, .3));
}

.icon-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 7rem;
    height: 7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
}

@media (min-width: 640px) {
    .icon-card {
        padding: 2rem;
        width: 9rem;
        height: 9rem;
    }
}

.icon-img {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--violet-primary);
}

@media (min-width: 640px) {
    .icon-img {
        width: 5rem;
        height: 5rem;
    }
}

.icon-label {
    text-align: center;
    font-weight: 700;
    color: var(--violet-600);
    font-size: .75rem;
}

.tiktok-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

@media (min-width: 768px) {
    .tiktok-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.tiktok-item {
    position: relative;
    overflow: hidden;
    border-radius: .5rem;
    transition: .3s;
}

.tiktok-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.like, .badge {
    position: absolute;
    bottom: .25rem;
    left: .25rem;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    font-size: .75rem;
    padding: .1rem .4rem;
    border-radius: .25rem;
}


.tiktok-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tiktok-embed {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    height: 100% !important;
}

.tiktok-embed > div {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
}

.tiktok-embed {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0.75rem;
}
