@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.6/dist/web/static/pretendard.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC&family=Noto+Sans+TC&family=Noto+Sans+Thai&family=Noto+Sans+Devanagari&display=swap");
@import url("https://cdn-uicons.flaticon.com/3.0.0/uicons-regular-straight/css/uicons-regular-straight.css");
@import url("https://cdn-uicons.flaticon.com/3.0.0/uicons-solid-rounded/css/uicons-solid-rounded.css");
@import url("https://cdn-uicons.flaticon.com/3.0.0/uicons-regular-rounded/css/uicons-regular-rounded.css");

:root {
    color-scheme: dark light;

    --primary-color: #646cff;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #213547;
    --input-bg: #ffffff;
    --input-border: #ddd;

    --primary-glow: #3b82f6;
    --secondary-glow: #06b6d4;
    --accent: #60a5fa;
    --bg-deep: #0f172a;
    --text-main: #f0f9ff;
    --text-sub: #bae6fd;

    /* header */
    --header-height: 60px;
    --header-padding: 0 1rem;
    --header-max-width: 1200px;

    --header-bg: rgba(255, 255, 255, 0.95);
    --header-border-color: #e0e0e0;
    --header-text-color: #333;

    --btn-size: 40px;
    --btn-font-size: 1.2rem;
    --btn-hover-bg: rgba(0, 0, 0, 0.05);
    --btn-border-color: #ddd;

    /* journey */
    --result-bg: #f9f9f9;

    /* gacha */
    --banner-bg: #2a2a2a;
    --banner-active: #4a90e2;
    --border-color: #ddd;
}

[data-theme="dark"] {
    --primary-color: #7e86f8;
    --bg-color: #1a1a1a;
    --card-bg: #242424;
    --text-color: rgba(255, 255, 255, 0.87);

    --header-bg: rgba(15, 23, 42, 0.95);
    --header-border-color: #444;
    --header-text-color: #fff;
    --btn-hover-bg: rgba(255, 255, 255, 0.1);
    --btn-border-color: #555;
    /* --header-bg: #242424; */
    --input-bg: #2a2a2a;
    --input-border: #444;

    /* header */
    --header-bg: rgba(15, 23, 42, 0.95);

    /* journey */
    --result-bg: #2c2c2c;

    /* gacha */
    --card-bg: #1a1a1a;
    --border-color: #444;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
}

body,
#app {
    width: 100%;
}

body {
    background-color: var(--bg-color);
}

* {
    margin: 0;
    padding: 0;

    box-sizing: border-box;
    text-decoration: none;
    border: none;
    background: none;

    font-family: "Pretendard";
    /* font-size: 16px;
  font-weight: 400; */

    outline: none;

    transition: 0.3s;
}

ul,
li {
    list-style-type: none;
}

#container {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;

    padding: 20px;

    display: none;
    justify-content: center;
    align-items: center;

    width: 100%;
    height: 100vh;

    background: rgba(0, 0, 0, 0.8);

    transition: opacity 0.3s;
    opacity: 1;
    z-index: 100;
}

.modal.active {
    display: flex;
}

.window {
    position: relative;

    display: flex;

    width: 100%;
    max-width: 1100px;
    height: 90vh;
    max-height: 90vh;

    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 16px;

    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.event-desc .window {
    width: fit-content;
    min-width: 400px;
    height: fit-content;
    min-height: 400px;

    max-height: 600px;
}

.modal.items .window {
    width: fit-content;
    min-width: 400px;
    height: fit-content;
    min-height: 400px;
}

.modal.fit .window {
    width: fit-content;
    height: fit-content;
}

.modal.overflow .window {
    overflow: visible;
}

.modal.scroll .window {
    overflow-x: hidden;
    overflow-y: scroll;
}

.modal.scroll .window::-webkit-scrollbar {
    width: 10px; /* 스크롤바의 너비 */
}

.modal.scroll .window::-webkit-scrollbar-thumb {
    height: 30%; /* 스크롤바의 길이 */
    background: #b4b9bd; /* 스크롤바의 색상 */

    background-clip: padding-box;
    border: 2px solid transparent;
    border-radius: 8px;
}

.select-wrapp.modal.scroll .window::-webkit-scrollbar-track {
    background: transparent; /*스크롤바 뒷 배경 색상*/
    border-radius: 4px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border: 1px solid var(--btn-border-color);
    border-radius: 50%;
    background-color: white;

    font-size: 12px;
    font-weight: 700;
    color: var(--text-color);

    cursor: pointer;
    transition: 0.3s;
    z-index: 1;
}

.close-button:hover {
    background-color: rgba(255, 0, 0, 0.5);
    color: var(--text-color);
}

.close-button i {
    display: flex;
}

.modal.event-desc .close-button {
    top: 7px;
    right: 7px;
}

.window .level-buttons {
    position: absolute;
    top: 45px;
    right: 25px;

    padding: 4px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 12px;

    color: var(--text-color);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);

    z-index: 1;
}

.window .level-buttons button {
    padding: 6px 14px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;

    font-size: 0.85rem;
    font-weight: 700;
    color: #adb5bd;
    letter-spacing: 0.5px;

    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.window .level-buttons button.active {
    background: #ffffff;
    color: #495057;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    .window {
        background-color: var(--header-bg) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;

        color: #e0e0e0;

        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .close-button {
        background-color: var(--header-bg);
    }

    .close-button:hover {
        background-color: rgba(255, 0, 0, 0.5);
        color: var(--text-color);
    }

    .level-buttons {
        background: rgba(20, 20, 25, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .window .level-buttons button {
        color: #888;
    }

    .window .level-buttons button.active {
        background: linear-gradient(135deg, rgba(64, 196, 255, 0.2), rgba(64, 196, 255, 0.1));
        border: 1px solid rgba(64, 196, 255, 0.4);

        color: #40c4ff;
        text-shadow: 0 0 8px rgba(64, 196, 255, 0.4);

        box-shadow: 0 2px 10px rgba(64, 196, 255, 0.15);
    }
}

@media (max-width: 1024px) {
    .window .level-buttons {
        top: 75px;
    }
}

@media (max-width: 768px) {
    .modal {
        padding: 0;
    }

    .window {
        width: 100%;
        height: 90%;

        flex-direction: column;

        border-radius: 0;

        overflow-y: scroll;
    }

    .modal.fit .window {
        border-radius: 16px;
    }

    .window .close-button {
        right: 10px;
    }
}
