* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "source-han-sans-japanese", "montserrat", sans-serif;
    background: #fafafa;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

.header {
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.greeting-text {
    font-size: 2rem;
    color: #000000;
    font-weight: 500;
    animation: fadeIn 1s ease-in-out;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 0;
    display: inline-block;
    line-height: 0;
}

.greeting-text img {
    height: 12rem;
    width: auto;
    display: block;
}

.greeting-text:hover {
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 2rem 2rem 2rem;
    overflow: visible;
}

.tabs-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    max-width: 100%;
    width: 100%;
    padding: 0;
    overflow: visible;
    will-change: transform;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 600px;
    flex-shrink: 0;
    cursor: grab;
    transition: transform 0.3s ease;
    margin-left: -200px;
    position: relative;
    z-index: 1;
    gap: 0;
    opacity: 1;
    transform-origin: left center;
}

.tab-item:active {
    cursor: grabbing;
}

.tab-item:first-child {
    margin-left: 0;
    z-index: 10;
}

.tab-item:nth-child(2) {
    z-index: 9;
}

.tab-item:nth-child(3) {
    z-index: 8;
}

.tab-item:nth-child(4) {
    z-index: 7;
}

.tab-item:nth-child(5) {
    z-index: 6;
}

.tab-item:nth-child(6) {
    z-index: 5;
}

.tab-item:nth-child(7) {
    z-index: 4;
}

.tab-item:nth-child(8) {
    z-index: 3;
}

.tab-item:nth-child(9) {
    z-index: 2;
}

.tab-item:nth-child(10) {
    z-index: 1;
}

.tab-item:hover {
    opacity: 1;
    z-index: 10;
    transform: scale(1.05) translateY(-10px);
}

.tab-item.selected {
    z-index: 100;
    margin-left: 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1980 / 1080;
    overflow: hidden;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
    border: 1px solid #000000;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    align-self: flex-start;
    pointer-events: none;
    z-index: 10;
}

.work-title {
    position: relative;
    font-size: 0.75rem;
    color: #000000;
    background: #ffffff;
    border: 1px solid #000000;
    border-bottom: none;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0;
    opacity: 1;
    transform: none;
    transition: none;
    white-space: nowrap;
    pointer-events: none;
    width: fit-content;
}

.work-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0;
    margin-bottom: 0;
    margin-left: 0;
    pointer-events: none;
    align-items: stretch;
    height: 100%;
}

.work-tag {
    display: inline-block;
    font-size: 0.6rem;
    color: #000000;
    background: #ffffff;
    border: 1px solid #000000;
    border-bottom: none;
    padding: 0.3rem 0.4rem;
    white-space: nowrap;
    line-height: 1.2;
    height: 100%;
    box-sizing: border-box;
}

/* 作品詳細ページのスタイル */
.work-detail-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.work-detail-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.work-detail-title {
    font-size: 2.5rem;
    color: #000000;
    margin-bottom: 1rem;
}

.work-detail-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1980 / 1080;
    overflow: hidden;
    background: #e0e0e0;
    border: 1px solid #000000;
    border-radius: 2px;
}

.work-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-detail-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #000000;
    max-width: 800px;
}

.work-detail-description p {
    margin-bottom: 1rem;
}

.work-detail-back {
    margin-top: 2rem;
}

.back-link {
    color: #000000;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.6;
}

/* 作品リストのスタイル */
.works-list-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #e0e0e0;
}

.works-list-title {
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 2rem;
}

.works-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.works-list-item {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
}

.works-list-item .work-title {
    margin-bottom: 0;
}

.works-list-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.works-list-item:hover .works-list-link {
    transform: translateY(-5px);
}

.works-list-thumbnail {
    width: 100%;
    aspect-ratio: 1980 / 1080;
    overflow: hidden;
    background: #e0e0e0;
    border: 1px solid #000000;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.works-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.works-list-item-title {
    font-size: 0.9rem;
    color: #000000;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .works-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .works-list-grid {
        grid-template-columns: 1fr;
    }
}

/* 画像モーダルのスタイル */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.image-modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    width: 90%;
    animation: zoom 0.3s;
}

.image-modal-content {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid #000000;
}

.image-modal-container .work-title {
    margin-bottom: 0;
    align-self: flex-start;
}

@keyframes zoom {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
}

/* スライドショーナビゲーションボタン */
.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.3s ease;
    display: none;
}

.slideshow-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slideshow-prev {
    left: 2rem;
}

.slideshow-next {
    right: 2rem;
}

/* 自己紹介セクション */
.about-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 4rem;
    align-items: flex-start;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
}

.about-title {
    font-size: 1.5rem;
    color: #000000;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #000000;
    max-width: 800px;
}

/* ソートセクション */
.sort-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    min-width: 300px;
}

.sort-title {
    font-size: 1.2rem;
    color: #000000;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tag-sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sort-button {
    display: inline-block;
    font-size: 0.75rem;
    color: #000000;
    background: #ffffff;
    border: 1px solid #000000;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sort-button:hover {
    background: #f0f0f0;
}

.sort-button.active {
    background: #000000;
    color: #ffffff;
}

/* スマートフォン対応 */
@media (max-width: 768px) {
    .header {
        padding: 0.5rem 1rem;
    }
    
    .greeting-text img {
        height: 6rem;
    }
    
    .main-content {
        padding: 0 1rem 1rem 1rem;
    }
    
    .tabs-container {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        padding: 0;
        overflow: visible;
        transform: none !important;
    }
    
    .tab-item {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-bottom: 2rem;
        cursor: pointer;
    }
    
    .tab-item:first-child {
        margin-top: 0.5rem;
    }
    
    .tab-item:last-child {
        margin-bottom: 2rem;
    }
    
    .tab-item:hover {
        transform: none;
    }
    
    .work-header {
        width: 100%;
    }
    
    .work-title {
        font-size: 0.7rem;
    }
    
    .thumbnail {
        width: 100%;
    }
    
    .about-section {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .sort-section {
        min-width: 100%;
    }
    
    .sort-title {
        font-size: 1.2rem;
    }
    
    .tag-sort-buttons {
        flex-wrap: wrap;
    }
    
    .sort-button {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.75rem;
    }
    
    .greeting-text img {
        height: 4rem;
    }
    
    .main-content {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }
    
    .tab-item {
        margin-bottom: 1.5rem;
    }
    
    .work-title {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
    }
    
    .about-section {
        padding: 1.5rem 0.75rem;
    }
    
    .about-title {
        font-size: 1.2rem;
    }
    
    .about-text {
        font-size: 0.9rem;
    }
    
    .sort-title {
        font-size: 1rem;
    }
    
    .sort-button {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}
