
@font-face {
    font-family: '851Gochikakutto';
    src: url('https://mitek37.github.io/card_battle/fonts/851GKKTT.TTF') format('truetype');
}

body {
    margin: 0;
    background-image: url("https://mitek37.github.io/card_battle/image_sys/bg.png");
    background-size: cover;
    background-repeat: repeat;
    background-attachment: fixed;

    font-family: sans-serif;
}

header {
    width: 100%;
    height: 80px;
    text-align: center;
    font-family: '851Gochikakutto', sans-serif;
    background: #ec7b1f;
    color: white;
    justify-content: center;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

h1 {
    font-family: '851Gochikakutto', sans-serif;
    background-image: url("https://mitek37.github.io/card_battle/image_sys/h1tag.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 80%;
    height: 40px;
    padding-top: 10px;
}

h1,h2,h3 {
    padding-left: 20px;
    padding-right: 30px;
}

p {
    padding-left: 30px;
    padding-right: 30px;
}

#gotop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 140px;
    cursor: pointer;
    z-index: 9999;
}

.menu-container {
    position: absolute; 
    left: 2px;
    
}

.menu-button {
    width: 80px;
    height: 80px;
    background: #b3580e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px
}

.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    position: absolute;
    top: 80px;  
    left: 0;
    background: #3951d6;
    width: 200px;
    border-radius: 0 0 4px 4px;
}

.dropdown-menu li {
    border-bottom: 3px solid #162a9b;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    color: #fff;
    padding: 12px;
    font-size: 20px;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: #6c9aff;
}

.go-battle {
    background: #f34ac0;
}

.go-battle a:hover {
    background: #ff8adc;
}

.go-down {
    background: rgb(41, 185, 41);
}

.go-down a:hover {
    background: rgb(91, 235, 91);
}

.cg {
    background: #1db9be;
}

.cg a:hover {
    background: #4de9e9;
}

.title {
    padding-top: 25px;
    padding-left: 70px;
    font-size: 35px;
}

.cardsort {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

.charasort {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

.eventsort {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

.costsort {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

.coidsort {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

.cs-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.cs-btn:hover {
    background: #cccccc;
}

.cs-btn.active {
    background: #f39034;
    color: white;
}

.ch-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.ch-btn:hover {
    background: #cccccc;
}

.ch-btn.active {
    background: #f39034;
    color: white;
}

.ch-btn.sp-22.active {
    background: rgb(205,148,102);
    color: white;
}

.ch-btn.sp-37.active {
    background: rgb(148,239,241);
    color: black;
}

.ch-btn.sp-96.active {
    background: rgb(48,170,35);
    color: white;
}

.ch-btn.sp-600.active {
    background: rgb(16,17,233);
    color: white;
}

.ch-btn.sp-799.active {
    background: rgb(255,86,178);
    color: white;
}

.ch-btn.sp-4023.active {
    background: rgb(255,136,51);
    color: white;
}

.ch-btn.sp-5170.active {
    background: rgb(55,241,161);
    color: black;
}

.ch-btn.sp-8626.active {
    background: rgb(119,235,106);
    color: black;
}

.ch-btn.sp-10005.active {
    background: rgb(192,102,255);
    color: white;
}

.ch-btn.sp-rainbow.active {
    background-image: url("https://mitek37.github.io/card_battle/image_sys/rainbow.png");
    color: black;
}

.ch-btn.sp-attack.active {
    background: rgb(255,84,85);
    color: white;
}

.ch-btn.sp-guard.active {
    background: rgb(84,199,255);
    color: black;
}

.ch-btn.sp-support.active {
    background: rgb(80,243,80);
    color: black;
}

.ch-btn.sp-tricky.active {
    background: rgb(198,84,255);
    color: white;
}

.ev-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.ev-btn:hover {
    background: #cccccc;
}

.ev-btn.active {
    background: #f39034;
    color: white;
}

.ev-btn.sp-kougeki.active {
    background: rgb(255,105,106);
    color: white;
}

.ev-btn.sp-shien.active {
    background: rgb(255,238,101);
    color: black;
}

.ev-btn.sp-soubi.active {
    background-image: url("https://mitek37.github.io/card_battle/image_sys/soubi.png");
    color: black;
}

.ev-btn.sp-tokushu.active {
    background-image: url("https://mitek37.github.io/card_battle/image_sys/tokushu.png");
    color: white;
}

.ev-btn.sp-rainbow.active {
    background-image: url("https://mitek37.github.io/card_battle/image_sys/rainbow.png");
    color: black;
}

.co-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.co-btn:hover {
    background: #cccccc;
}

.co-btn.active {
    background: #f39034;
    color: white;
}

.co-btn.cost0.active {
    background: #72C51F;
    color: black;
}

.co-btn.cost1to3.active {
    background: #1FC51F;
    color: black;
}

.co-btn.cost4to6.active {
    background: #1FC572;
    color: black;
}

.co-btn.cost7to9.active {
    background: #1FC5C5;
    color: black;
}
.co-btn.cost10to11.active {
    background: #1F72C5;
    color: white;
}
.co-btn.cost12.active {
    background: #1F1FC5;
    color: white;
}

.ci-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.ci-btn:hover {
    background: #cccccc;
}

.ci-btn.active {
    background: #f39034;
    color: white;
}

.searchtext {
    margin: 10px 0;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

.searchsort {
    margin: 10px 0;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
}

#searchBox {
    width: 320px;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #aaa;
    border-radius: 6px;
}

#searchBtn {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #f39034;
    color: white;
}

#searchBtn:hover {
    background-color: #b3580e;
}

#sortselect {
    margin: 10px auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 6px;
    justify-content: center;
}
#sslabel {
    margin: 10px auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #ffe9c0;
    padding: 2px 12px;
    border-radius: 6px;
    width: fit-content;
}

.sort-label {
    font-size: 14px;
    font-weight: bold;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px;
}

#gallery img {
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7); 
    justify-content: center; 
    align-items: center;  
    z-index: 1000;  
    cursor: pointer;      
    display: flex;      
}

#overlayBox{
    display:flex;
    flex-direction:column;
    align-items:center;
}

#cardDetailBtn{
    align-self:flex-start;
    margin-top:10px;
    display:none;

    background:#f39034;
    color:white;
    padding:8px 16px;
    border-radius:6px;
    cursor:pointer;
    font-weight:bold;

    opacity:0.9;
}

#cardDetailBtn:hover{
    background:#b3580e;
    opacity:1;
}

#cardDetailBtn.disabled{
    pointer-events:none;
    opacity:0.5;
}

#cardDetailPanel{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);

    background:black;
    color: white;
    padding:25px;
    border-radius:10px;

    width:fit-content;
    max-width:500px;
    max-width:80vw;

    display:none;
}

#cardDetailBack{
    margin-top:15px;
    padding:8px 16px;
    background:#f39034;
    color:white;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

/* 拡大画像 */
#overlay-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px; 
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: default;
    transition: transform 0.3s ease; 
}


.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

@media (max-width: 600px) {

    #cardDetailPanel{
        width:90vw;
        min-width:0;
        max-width:90vw;
        padding:20px;
    }

    #cardDetailContent{
        font-size:15px;
        line-height:1.6;
    }

    #overlay-img{
        max-width:95vw;
        max-height:60vh;
    }

}


