.h-vh-100 {
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
}
#index-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.header-wrapper {
    flex: 1;
    overflow: hidden;
}
.create-card {
    position: relative;
}
.create-card-img {
    width: 100%;
}
.upgrade-card-img {
    width: 100%;
    filter: grayscale(1);
}
.create-card-container {
    background: url(/images/giftcode/giftcode.jpg) center/cover no-repeat fixed;
    color: #fff;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}
.create-card-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.create-card-center {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    width: 100%;
    z-index: 1;
    height: 100%;
    position: relative;
}
.card-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    flex: 1;
    gap: 10px;
}
.user-stats {
    flex: 0 0 auto;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 5px;
    width: 90%;
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 0 10px rgba(255,255,255,0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.6);
    outline: 1px solid rgba(255,255,255,0.8);
}
.info-card {
    display: flex;
    flex-direction: column;
    position: relative;
}
.statsIndexRank {
    position: absolute;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px;
}
.statsIndexRank span {
    display: flex;
    align-items: center;
}
.match-display{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:5px}
.match-item{position:relative;text-align:center}
.circle-svg{width:100%;height:auto}
.match-item small{position: absolute;bottom: 0px;left: 50%;transform: translateX(-50%);font-size: 10px;background: var(--swal2-deny-button-background-color);padding: 0px 8px;border-radius: 5px;}
.match-stats {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap: 5px;
    padding: 5px 0;
    font-size: 12px;
}
.view-match-history,
.battle-match {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    padding: 5px 0;
}
#statsCanvas {
    width: 100%;
    min-height: 150px;
}
.stats-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}
.stat-label {
    font-weight: bold;
    font-size: 14px;
    align-items: center;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}
.stat-index {
    grid-column: span 2;
}
.stat-lv { 
    font-size: 12px; 
    color: #aaa; 
}
.stat-star { 
    color: var(--orange);
    font-weight: bold; 
}
.progress-bar {
    position: relative;
    width: 100%;
    height: 7px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #cccccc5c;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f8f9fa, #ff8800);
    border-radius: 4px;
    transition: width 0.6s ease;
}
.card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 5px;
    width: 100%;
    flex: 0 0 auto;
    z-index: 1;
}
.card-info-frame {
    border-radius: 5px;
    height: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--swal2-backdrop);
    box-shadow: 0 4px 15px var(--swal2-backdrop), inset 0 0 10px var(--swal2-backdrop);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid var(--swal2-backdrop);
    outline: 1px solid var(--swal2-backdrop);
}
.card-info-frame-choose {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
}
.card-info-frame-choose::-webkit-scrollbar { 
    display: none; 
}
.frame-item {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    transform-origin: center;
}
.frame-item img {
    border-radius: 10px
}
.frame-item.locked::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1;
    pointer-events: none;
}

.frame-item.locked {
    opacity: 0.65;
    cursor: not-allowed;
}
.frame-choose {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}
.frame-choose.active {
    border: 1px solid var(--orange);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, var(--orange) 0px 8px 16px -8px;
}
.frame-item.active {
    transform: scale(1.1);
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, var(--orange) 0px 8px 16px -8px;
}
.frame-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    text-shadow: 0 0 8px #000;
    pointer-events: none;
    z-index: 2;
}
.frame-status.fa-lock-open { color: #ffffff; }
.frame-status.fa-lock { color: #ef4444; }
.frame-status.active-icon { color: var(--orange); }
.card-info-image {
    position: relative;
    border-radius: 10px;
    background: var(--swal2-backdrop);
    aspect-ratio: 3 / 4;
}
.image-frame,
.image-avatar {
    position: absolute;
    border-radius: 20px;
    width: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}
.image-avatar { padding: 10px; }
.edit-avatar {
    z-index: 1;
    position: absolute;
    top: 0;
    right: 0;
    background: var(--swal2-backdrop);
    font-size: 20px;
    padding: 10px;
    border-radius: 0 10px;
    color: var(--orange);
}
.card-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-stats span {
    position: absolute;
    text-shadow: 3px 2px 2px #000;
    font-size: x-large;
    font-weight: 700;
    font-family: 'Font Awesome 5 Free';
}
.card-stats span::after {
    content: attr(data-val);
}
.card-stats .hp::after,
.card-stats .atk::after,
.card-stats .def::after,
.card-stats .spd::after {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1;
}
.card-stats .atk,
.card-stats .spd {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.card-stats .atk {
    right: 0;
}
.card-stats .def {
    position: absolute;
    bottom: 0;
}
.card-stats .spd {
    left: 0;
}
.card-stats .hp::after {
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url('/images/arena/stats/hp.gif');
    box-shadow: var(--orange) 0px 5px 15px;
}
.card-stats .atk::after {
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url('/images/arena/stats/atk.gif');
    box-shadow: var(--danger) 0px 5px 15px;
}
.card-stats .def::after {
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url('/images/arena/stats/def.gif');
    box-shadow: var(--indigo) 0px 5px 15px;
}
.card-stats .spd::after {
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url('/images/arena/stats/spd.gif');
        box-shadow: var(--success) 0px 5px 15px;
}
.confirm-btn {
    position: absolute;
    top: -36px;
    right: 20px;
    width: 100%;
    display: flex;
    z-index: 1;
    justify-content: flex-end;
    align-items: center;
}
.confirm-btn img {
    width: 30%;
    box-shadow: var(--orange) 0px 20px 30px -10px;
}
.confirm-cancel button {
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 2px 2px 4px #000;
    border: 4px double var(--swal2-footer-border-color);
    background: linear-gradient(145deg, #2c2c5e, #1a1a3a);
    color: var(--white);
    box-shadow: 0 0 20px var(--swal2-footer-border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}
.confirm-cancel button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255,215,0,0.8); }
.confirm-cancel button:active { transform: translateY(1px); }
#personal-card { width: 100%; opacity: 0; visibility: hidden; transition: opacity 0.35s ease; }
#personal-card.show { opacity: 1; visibility: visible; position:absolute; bottom:0; height: 100dvh; z-index: 1;  }
#personal-dialogue-container { position: relative; bottom: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: flex; flex-direction: column; justify-content: flex-end; }
#personal-character-container { position: relative; height: 0; }
.personal-character-box.left { position: absolute; bottom: 0; width: 100%; }
.personal-character { width: 40%; margin: -40px 0; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
#personal-dialogue-box { position: relative; pointer-events: auto; }
#personal-dialogue-image { width: 100%; max-height: 200px; display: block; }
#personal-dialogue-text-container {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-height: 75%;
    text-align: justify;
    pointer-events: auto;
}
#personal-character-status { color: var(--red); font-weight: bold; text-align: center; }
#personal-dialogue-text { color: #000; word-wrap: break-word; }
#personal-nav-buttons { pointer-events: auto !important; }
#personal-nav-buttons button {
    background: rgba(0,0,0,0.4);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}
#personal-nav-buttons button:hover:not(:disabled) { background: var(--swal2-backdrop); transform: scale(1.2); }
#personal-nav-buttons button:disabled { opacity: 0.3; cursor: not-allowed; }
.close-vikos {
    position: absolute;
    z-index: 1;
    top: -20px;
}
.close-vikos img {
    width: 50%;
}
.vikos-guide-bar {
    position: absolute;
    bottom: 0;
    left: 10px;
    display: flex;
    align-items: center;
    border-radius: 50px;
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: opacity 0.5s ease;
    opacity: 1;
}
.vikos-guide-bar:hover {
    transform: scale(1.1);
    opacity: 0.8;
}
.vikos-guide-img {
    width: 50px;
}
.vikos-rewards {
    position: absolute;
    transition: all 0.4s ease;
    animation: float 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.vikos-rewards img {
    width: 30px;
    border-radius: 50%;
}
.vikos-guide-bar.hiding {
    opacity: 0;
    transform: translateY(20px);
}
.vikos-rewards-box {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
}
.vikos-rewards-success {
    width: 100%;
    max-width: 100px;
    object-fit: contain;
    border-radius: 10px;
    transition: 0.3s;
    border: 1px solid #ff4500;
    animation: glow 1s ease-in-out infinite;
}
.vikos-rewards-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    padding: 0 5px;
}
.vikos-rewards-text span {
    color: #fff;
    background: #fd7e1461;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.3), inset 0 0 10px rgba(253, 126, 20, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(253, 126, 20, 0.6);
    outline: 1px solid rgba(253, 126, 20, 0.8);
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glow { 0% { box-shadow: 0 0 5px yellow, 0 0 10px yellow; } 100% { box-shadow: 0 0 10px orange, 0 0 15px orange; } }
.character-box.center {
    position: relative;
    width: 100%;
    text-align: center;
}
.character {
    transition: opacity 0.3s ease;
    width: 45%;
    margin: -40px 0px;
}
#character-center {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 280px;
    height: auto;
    z-index: 10;
}
.create-confirm-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    padding: 30px;
}
.create-confirm {
    position:relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
}
.create-confirm-avatar {
    width:90%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}
.create-confirm-frame {
    position: absolute;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    pointer-events: none;
    border-radius: 10px;
    width: 100%;
}
div:where(.swal2-container).swal2-backdrop-show,
div:where(.swal2-container).swal2-noanimation {
    background: rgb(0 0 0 / 80%) !important;
}
div:where(.swal2-container).swal2-center > .swal2-popup,
.modal-content {
    border-radius: 5px !important;
    background: radial-gradient(circle at center, #7800ffa3, rgb(0 0 0)) !important;
    box-shadow: 0 4px 15px var(--swal2-background), inset 0 0 10px var(--light) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    outline: 1px solid rgba(255, 255, 255, 0.8) !important;
    color: #e5d7ff !important;
}
div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm),
div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel) {
    border-radius: 12px !important;
    cursor: pointer !important;
    text-shadow: 2px 2px 4px #000 !important;
    border: 4px double var(--swal2-footer-border-color) !important;
    background: linear-gradient(145deg, #2c2c5e, #1a1a3a) !important;
    color: var(--white) !important;
    --swal2-action-button-focus-box-shadow: none !important;
    box-shadow: 0 0 20px var(--swal2-footer-border-color) !important;
    transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    overflow: hidden !important;
}
div:where(.swal2-container) div:where(.swal2-validation-message) {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    color: inherit !important;
}
div:where(.swal2-container) div:where(.swal2-validation-message)::before {
    margin: 0 !important;
}
@media (min-width: 768px) {
    .card-info {
        grid-template-columns: repeat(3, 1fr);
    }
    .card-info-right {
        grid-column: span 2;
    }
    .card-info-frame-choose {
        grid-template-columns: repeat(5, 1fr);
    }
    .card-info-frame {
        aspect-ratio: auto !important;
    }
}