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

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: "M PLUS 1", sans-serif;
    font-style: normal;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.gallery-item,
.social-link,
.commission-box {
    opacity: 0;
    transform: translateY(20px);
}

.gallery-item.show,
.social-link.show,
.commission-box.show {
    opacity: 1;
}


.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(135deg,#9c67d1 0%, #98efed  100%);
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    font-family: "BBH Bartle", sans-serif;
    font-style: normal;
    will-change: transform;
}

.sidebar.hidden {
    transform: translateX(100%);
    box-shadow: none;
    visibility: hidden;
}

.sidebar header {
    padding: 30px 20px;
    text-align: center;
}

.sidebar .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #333;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar .logo {
    color: white;
    font-size: 1rem;
}

.sidebar nav {
    flex: 1;
    padding-top: 30px;
}

.sidebar nav a {
    display: block;
    padding: 20px 30px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.sidebar nav a.active::before {
    left: 0;
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

@media (hover: hover) and (pointer: fine) {
    .sidebar nav a:hover::before {
        left: 0;
    }
    
    .sidebar nav a:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(-5px);
    }
}

.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.3s ease;
}

.hamburger.visible {
    opacity: 1;
    transform: translateY(0);
}

.hamburger-btn {
    background: linear-gradient(135deg, #9c67d1 0%, #98efed 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .hamburger-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
}

.hamburger-btn span {
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3.2px, -3.2px);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(156, 103, 209, 0.9) 0%, rgba(152, 239, 237, 0.9) 100%);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .overlay-close:hover {
        transform: rotate(90deg);
        opacity: 0.8;
    }
}

.overlay nav a {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 2rem;
    margin: 20px 0;
    padding: 10px 30px;
    border: 2px solid transparent;
    border-radius: 50px;
    transition: all 0.3s ease;
    transform: translateY(50px);
    opacity: 0;
    font-family: "BBH Bartle", sans-serif;
    font-style: normal;   
}

.overlay.active nav a {
    transform: translateY(0);
    opacity: 1;
}

.overlay nav a:nth-child(1) { transition-delay: 0.1s; }
.overlay nav a:nth-child(2) { transition-delay: 0.2s; }
.overlay nav a:nth-child(3) { transition-delay: 0.3s; }
.overlay nav a:nth-child(4) { transition-delay: 0.4s; }
.overlay nav a:nth-child(5) { transition-delay: 0.5s; }

@media (hover: hover) and (pointer: fine) {
    .overlay nav a:hover {
        border-color: white;
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.05);
    }
}

main {
    margin-right: 250px;
    transition: margin-right 0.3s ease;
    overflow-y: scroll;
    height: 100vh;
}

main.full {
    margin-right: 0;
}

main.overlay-active {
    overflow: hidden;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section > * {
    max-width: 1000px;
    width: 100%;
}

section h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    color: #333;
    font-family: "BBH Bartle", sans-serif;
    font-weight: 400;
    font-style: normal;   
}

#top {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    background-image:url(top_backimage/back1.png) ;
    animation: bgiLoop 20s linear infinite;
    color: white;
    padding: 0;
}

@keyframes bgiLoop {
    0% { background-position: 0 0;}
  100% { background-position: -1000px 1000px;}
}

#top .hero-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3%;
    border: 5px solid #ffffff;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#top .hero-img-sp {
    display: none;
}

#top .hero-img.fade {
    opacity: 0;
    transform: translateY(-20px);
}

#top .logo-sp {
    display: none;
}

#about {
    background-color: #98efed;
}

.about-tittle h2 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}
    

.profile {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    flex-shrink: 0;
    background-image: url(icon/saramawaru.gif);
    background-size: cover;
}

.profile-text h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    font-family: "M PLUS 1", sans-serif;
    font-style: normal;
}

.profile-text p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-family: "M PLUS 1", sans-serif;
    font-style: normal;
}

.social {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.social-link {
    width: 80px;
    height: 80px;
    background: rgba(116, 219, 214, 0.9);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.social-link img {
    width: 70px;
    height: 70px;
    transition: all 0.3s ease;
}

.social-link span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    font-size: 0.7rem;
    font-weight: bold;
    color: #ffffff;
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .social-link:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        border-color: #667eea;
    }
    
    .social-link:hover img {
        opacity: 0;
        transform: scale(0.8);
    }
    
    .social-link:hover span {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

#illust {
    background-color:#ffffff;
    background-image:url(top_backimage/back2.png) ;
    animation: bgiLoop 20s linear infinite;
}


.illust-tittle h2 {
    color: #2accbb;
    text-shadow:2px 2px 0 #FFF, -2px -2px 0 #FFF,
                -2px 2px 0 #FFF, 2px -2px 0 #FFF,
                0px 2px 0 #FFF,  0-2px 0 #FFF,
                -2px 0 0 #FFF, 2px 0 0 #FFF;
}

#illust > * {
    max-width: 1200px;
}

.illust-tittle h2 {
color: #2accbb;
}

.gallery {
    column-count: 3;
    column-gap: 15px;
    width: 100%;
    margin-bottom: 40px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #666;
    position: relative;
}

.gallery-item[data-src] {
    background-size: cover;
    background-position: center;
    aspect-ratio: var(--aspect-ratio, 1);
}

.gallery-item[data-src] span {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 1);
    color: #333;
}

#comic {
    background-color: #f5f5f5;
    background-image: url(top_backimage/back3.png);
    animation: bgiLoop 20s linear infinite;
}

.comic-tittle h2 {
    color: #ffffff;
}

#comic > * {
    max-width: 1200px;
}

.comic-gallery {
    column-count: 3;
    column-gap: 15px;
    width: 100%;
    margin-bottom: 40px;
}

.comic-item {
    break-inside: avoid;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #666;
    position: relative;
}

.comic-item[data-cover] {
    background-size: cover;
    background-position: center;
    aspect-ratio: var(--aspect-ratio, 0.7);
}

.comic-item[data-cover] span {
    display: none;
}

.comic-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 1);
    color: #333;
}

/* 漫画ビュワー用のモーダル */
.comic-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.comic-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.comic-modal img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.comic-page-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1001;
}

.comic-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.comic-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

/* コミッククリック領域 */
.comic-click-area {
    position: fixed;
    top: 0;
    height: 100%;
    width: 50%;
    cursor: pointer;
    z-index: 999;
}

.comic-click-left {
    left: 0;
}

.comic-click-right {
    right: 0;
}

#commission {
    background: linear-gradient(135deg, #fbca1b 0%, #fbca1b 100%);
}

.commission-tittle h2 {
    color: #333;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.commission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.commission-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.commission-box h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #707070;
    font-family: "M PLUS 1", sans-serif;
    font-style: normal;
    font-weight: 900;
}

.commission-box p {
    margin-bottom: 15px;
    line-height: 1.7;
    font-family: "M PLUS 1", sans-serif;
    font-style: normal;
}

.commission-box ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.commission-box li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    font-family: "M PLUS 1", sans-serif;
    font-style: normal;
}

.commission-box li::before {
    content: '•';
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.more-btn {
    background: linear-gradient(135deg, #9c67d1 0%, #98efed 100%);
    text-decoration: none;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: block;
    margin: 0 auto;
    font-family: "BBH Bartle", sans-serif;
    font-style: normal;
    font-weight: bold;
    text-align: center
}

.more-btn::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;
}

@media (hover: hover) and (pointer: fine) {
    .more-btn:hover::before {
        left: 100%;
    }
    
    .more-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal img {
    max-width: 70%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close,
.modal-prev,
.modal-next {
    position: fixed;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.modal-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
}

.modal-prev,
.modal-next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
}

.modal-prev {
    left: calc((100% - 70%) / 2 - 80px);
}

.modal-next {
    right: calc((100% - 70%) / 2 - 80px);
}

@media (hover: hover) and (pointer: fine) {
    .modal-close:hover,
    .modal-prev:hover,
    .modal-next:hover {
        background: white;
        transform: translateY(-50%) scale(1.1);
    }
    
    .modal-close:hover {
        transform: scale(1.1);
    }
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9c67d1 0%, #98efed 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
    .scroll-top:hover {
        transform: translateY(-5px) scale(1.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .sidebar { display: none !important; }
    main { 
        margin-right: 0 !important;
        width: 100vw;
        max-width: 100vw;
    }
    
    section {
        padding: 60px 20px;
        max-width: 100vw;
    }
    
    .profile { 
        flex-direction: column; 
        align-items: center;
        text-align: center; 
        gap: 20px; 
    }

    .social { 
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .social-link {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    .social-link img {
        width: 55%;
        height: 55%;
    }
    .social-link span {
        font-size: 0.6rem;
    }

    .gallery { 
        column-count: unset;
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding: 0 10vw 0 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .gallery::-webkit-scrollbar {
        display: none;
    }
    
    .gallery-item {
        flex-shrink: 0;
        width: 70vw;
        aspect-ratio: 0.7 !important;
        opacity: 1;
        transform: translateY(0);
        box-shadow: none;
    }

    section h2 {
        font-size: 2rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .commission-tittle h2 {
        font-size: 1.3rem;
    }
    
    .commission-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .content-wrapper h1 {
        font-size: 1.8rem;
        word-break: break-word;
    }
    
    .platform-header h2 {
        font-size: 1.5rem;
    }
    
    .info-section,
    .notice-section,
    .contact-section {
        padding: 25px;
    }

    .hamburger { 
        opacity: 1 !important;
        transform: translateY(0) !important;
        right: 15px;
    }

    .overlay nav a {
        font-size: 1.5rem;
    }

    #top .hero-img-pc {
        display: none;
    }
    
    #top .hero-img-sp {
        display: block;
    }

    #top .logo-sp {
        display: block;
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        width: 60%;
        max-width: 300px;
    }
    
    #top .logo-sp img {
        width: 100%;
        height: auto;
    }

    .comic-gallery {
        column-count: unset;
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding: 0 10vw 0 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .comic-gallery::-webkit-scrollbar {
        display: none;
    }
    
    .comic-item {
        flex-shrink: 0;
        width: 70vw;
        aspect-ratio: 0.7;
        opacity: 1;
        transform: translateY(0);
        box-shadow: none;
    }

    .gallery { column-count: 1; }
    .modal-prev, .modal-next { width: 40px; height: 40px; font-size: 20px; }
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
    .modal-close { top: 20px; right: 20px; width: 35px; height: 35px; font-size: 20px; }
}