@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

@font-face {
    font-family: 'CookieRun-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/CookieRun-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

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

html {
    height: 100%;
}

body {
    height: 100%;
    display: grid;
    /* font-family: Arial, sans-serif; */
    font-family: Ubuntu, 'NanumBarunGothicBold';
    /* background-color: #08001d; */
    background-color: #7f5a83;
    background-image: -webkit-linear-gradient(bottom right, #7f5a83 0%, #0d324d 74%);
    background-image: -o-linear-gradient(bottom right, #7f5a83 0%, #0d324d 74%);
    background-image: linear-gradient(to left, #7f5a83 0%, #0d324d 74%);
    place-items: center;
    margin: 0;
    padding: 0 32px;
    animation: rotate 6s infinite alternate linear;
}

.container {
    display: grid;
    overflow: hidden;
    position: relative;
    align-items: stretch;
    z-index: 3;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.main_title_container {
    overflow: hidden;
    /* position: relative; */
    position: sticky;
    /* z-index: 3; */
    top:20px;
    z-index: 1000;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.main_title {
    font-size: 60px;
    font-weight: bold;
    font-family: "Press Start 2P";
    text-align: center;
    color: #fff;
    text-shadow:
        0 0 15px rgba(255, 110, 196, 0.8),
        0 0 20px rgba(255, 110, 196, 0.6);
}

.version {
    overflow: hidden;
    text-align: right;
    z-index: 3;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow:
        0 0 10px rgba(217, 255, 0, 0.8),
        0 0 15px rgb(255, 145, 0);
}

header {
    text-align: center;
    margin-top: 25rem;
    margin-bottom: 0px;
}

header h1 {
    font-size: 72px;
}

.navbar {
    background-color: #333;
    margin-bottom: 30px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    /* Ensures both columns align at the top */
    gap: 20px;
}
  
.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
}

.navbar li {
    color: white;
    padding: 10px 20px;
    cursor: pointer;
}

.navbar li:hover {
    background-color: #575757;
}



.content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    /* Ensures both columns align at the top */
    gap: 20px;
    /* Adds space between the two columns */
}

.group1 {
    flex: 1;
    padding: 20px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 8px;
    margin: 0 20px;
    text-align: center;
    z-index: 3;
    color: #f1f1f1;
    box-shadow:
        0 0 15px rgba(255, 110, 196, 0.2),
        0 0 30px rgba(120, 115, 245, 0.2),
        inset 0 0 15px rgba(255, 110, 196, 0.2),
        inset 0 0 30px rgba(120, 115, 245, 0.1);
    min-width: 300px;
}

.group2 {
    flex: 1;
    padding: 20px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 8px;
    margin: 0 20px;
    overflow: hidden;
    position: relative;
    z-index: 3;
    color: #f1f1f1;
    box-shadow:
        0 0 15px rgba(255, 110, 196, 0.2),
        0 0 30px rgba(120, 115, 245, 0.2),
        inset 0 0 15px rgba(255, 110, 196, 0.2),
        inset 0 0 30px rgba(120, 115, 245, 0.1);
    min-width: 300px;
}


h2 {
    font-size: 30px;
    margin-bottom: 10px;
    font-family: 'CookieRun-Regular';
}

.h_ready {
    font-size: 20px;
    margin-bottom: 10px;
    color: hsl(290, 70%, 43%);
    font-family: 'CookieRun-Regular';
}

.logo_lotto {
    width: 200px;
    height: auto;
}
.logo_yg {
    width: 250px;
    height: auto;
}
.logo_TBD {
    width: 200px;
    height: auto;
}

.logo_AlgoInfo {
    width: 150px;
    height: auto;
}

.scrollable-container {
    max-height: 80vh; /* Adjust the height as needed */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 20px;
    background-color: #333;
    border: 1px solid #555;
    margin: 10px 0;
}

.content-wrapper {
    padding: 10px;
}

/* Custom scroll bar for better appearance */
.scrollable-container::-webkit-scrollbar {
    width: 8px;
}

.scrollable-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.scrollable-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}


.data-frame th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* "최근 당첨현황" 테이블 스타일 */
.results-table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'CookieRun-Regular';
}

.results-table-container table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: inherit;
    /* font-size: 12px; */
}

.results-table-container th,
.results-table-container td {
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    font-family: inherit;
}

/* 결과 출력 */
.result-window {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    white-space: pre-wrap;
    font-family: inherit;
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.result-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 15px;
    /*font-family: Arial, sans-serif;*/
    font-family: inherit;
    max-height: 300px;
    overflow-y: auto;
}

.result-card .result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.result-card .result-item:last-child {
    border-bottom: none;
}

.result-card .result-key {
    font-weight: bold;
    color: #555;
}

.result-card .result-value {
    color: #d9534f;
    font-weight: bold;
}

/* 선택 박스 */
.dropdown {
    margin: 0 0 15px;
    width: 100%;
    padding: 10px;
    /* margin-bottom: 20px; */
    font-size: 14px;
    font-family: 'CookieRun-Regular';
    border-radius: 10px;
}

.dropdown_email {
    margin: 0 0 15px;
    width: 40%;
    padding: 10px;
    /* margin-bottom: 20px; */
    font-size: 14px;
    font-family: ubuntu;
    border-radius: 10px;
}

/* 메인 입력 파트*/
.form_algo {
    margin: 0 0 20px;
    font-family: 'CookieRun-Regular';
    display: grid;
    width: 80%;
    right: auto;
    left: 50%;
    margin-left: 10%;
}

.form {
    display: flex;
    justify-content: space-between;
    margin: 0 0 20px;
    /* display: grid; */
    /* gap: 30px; */
}

.form>input {
    width: 100%;
    height: 38px;
    border-radius: 10px;
}

.form>button {
    width: 100%;
    height: 50px;
    border-radius: 10px;
}

.form>input {
    border: 2px solid #e0e0e0;
    font-family: 'CookieRun-Regular';
    font-size: 16px;
    padding: 0 15px;
    color: #11274c;
    transition: all 0.375s;
}

.form>input:hover {
    border: 2px solid #000;
}

.form>input::placeholder {
    color: #cac8c8;
}

.generate-button {
    background: hsl(0, 0%, 85%);
    padding: 16px 2px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .01);
    width: 30%;
    margin: 0 33% 30px;
    font-family: 'CookieRun-Regular';
    font-size: 16px;

    &::after {
        position: absolute;
        content: "";
        top: 15px;
        left: 0;
        right: 0;
        z-index: -1;
        height: 100%;
        width: 100%;
        /* transform: scale(0.9) translateZ(0); */
        filter: blur(15px);
        background: linear-gradient(to left,
                #ff5770,
                #e4428d,
                #c42da8,
                #9e16c3,
                #6501de,
                #9e16c3,
                #c42da8,
                #e4428d,
                #ff5770);
        background-size: 200% 200%;
        animation: animateGlow 1.25s linear infinite;
    }
}

.generate-button:hover {
    /* background-color: #ffffff; */
    transform: scale(1.05);
    background: linear-gradient(to left,
            #ff577081,
            #e4428e81,
            #c42da881,
            #9e16c381,
            #6501de81,
            #9e16c381,
            #c42da881,
            #e4428d81,
            #ff577081);
}

@keyframes animateGlow {
    0% {
        background-position: 0% 50%;
        transform: translateZ(0);
    }

    100% {
        background-position: 200% 50%;
        transform: translateZ(0);
    }
}

/* 채팅 창 스타일 */
.chat-window {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #4c2381c0;
    scroll-behavior: smooth;
}

#chat-history {
    white-space: pre-wrap;
    font-family: 'Ubuntu', 'CookieRun-Regular';
    overflow-y: auto;
}

.chat-box {
    height: 300px;
    border: 1px solid #000;
    margin-bottom: 20px;
    background-color: #5a5b74;
    overflow-y: scroll;
    padding: 10px;
}

.chat-input-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-input {
    justify-content: space-between;
    align-items: center;
    /* width: 60%; */
    /* padding: 10px; */
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    font-family: inherit;
    font-size: 16px;
    padding: 8px 24px;
    color: #11274c;
    transition: all 0.375s;
}

.send-button {
    /* width: 22%; */
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'CookieRun-Regular';
    font-size: small;
}

.send-button:hover {
    background-color: #0056b3;
}


/* 태블릿 가로 (768px ~ 1023px) */
@media only screen and (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .main_title {
        font-size: 50px;
    }

    .content {
        flex-direction: column;
    }

    .group1, .group2 {
        width: 100%;
    }
}

@media only screen and (max-width: 768px) {
    header {
        margin-top: 40rem;
        margin-left: 0;
        padding: 10px;
        width: 100%;
    }
    .container {
        padding: 10px 5px;
    }

    .main_title_container {
        padding: 10px 5px;
    }

    .main_title {
        font-size: 36px;
        word-wrap: break-word;
    }

    .form, .form_algo {
        width: 100%;
    }

    .generate-button {
        width: 100%;
        margin: 10px 0;
    }
    .btn-sm{
        width:80% !important;
        word-break: break-all;
    }
}

@media only screen and (max-width: 480px) {
    header {
        margin-top: 40rem;
        margin-left: 0;
        padding: 10px;
        width: 100%;
    }
    .container {
        padding: 10px 5px;
    }

    .main_title_container {
        padding: 10px 5px;
    }

    .main_title {
        font-size: 24px;
        word-wrap: break-word;
    }

    .version {
        font-size: 12px;
    }

    .group1, .group2 {
        padding: 10px;
    }

    .form > input, .dropdown, .dropdown_email {
        font-size: 14px;
    }

    .chat-window {
        max-height: 200px;
    }
    .btn-sm{
        width:80% !important;
        word-break: break-all;
    }

}


/* Existing styles remain unchanged */

/* New styles for narrow screens */
@media only screen and (max-width: 430px) {
    header {
        margin-top: 40rem;
        margin-left: 0;
        padding: 10px;
        width: 100%;
    }
    .container {
        padding: 10px 5px;
    }

    .main_title_container {
        padding: 10px 5px;
    }

    .main_title {
        font-size: 24px;
        word-wrap: break-word;
    }

    .version {
        font-size: 10px;
    }

    .content {
        flex-direction: column;
    }

    .group1, .group2 {
        width: 100%;
        padding: 10px 5px;
        margin: 10px 0;
        min-width: unset;
    }

    .form, .form_algo {
        width: 100%;
    }
    .btn-sm{
        width:80% !important;
        word-break: break-all;
    }

    .form > input, .form > select, .form_algo > select {
        font-size: 14px;
        padding: 5px;
    }

    .generate-button {
        width: 100%;
        padding: 10px;
        font-size: 14px;
        margin: 10px 0;
    }

    .results-table-container {
        font-size: 12px;
    }

    .chat-window {
        max-height: 150px;
    }

    #chat-form .row {
        flex-direction: column;
    }

    #chat-form .col {
        width: 100%;
        margin-bottom: 10px;
    }

    #chat-message, #chat-form button {
        width: 100%;
    }
}
/* 모바일 (~430px) */

@media only screen and (max-width: 360px) {
    /* Header 스타일 수정 */
    header {
        margin-top: 40rem;
        margin-left: 0;
        padding: 10px;
        width: 100%;
    }

    .main_title {
        margin-top: 20px;
        margin-left: -2rem;
        font-size: 5vw;
        text-align: center;
        word-wrap: break-word;
        padding: 0 10px;
    }
    .version{
        font-size: 2vw;
    }

    /* Content 레이아웃 조정 */
    .content {
        flex-direction: column;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* 그룹 레이아웃 조정 */
    .group1,
    .group2 {
        width: 60%;
        margin: 10px 0;
        padding: 10px;
        box-sizing: border-box;
        min-width: 280px;
    }

    /* Generate 버튼 조정 */
    .generate-button {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
        font-size: 14px;
    }

    /* Form 입력 필드 수정 */
    .form > input {
        font-size: 4vw;
        padding: 5px;
        width: 100%;
        box-sizing: border-box;
    }

    .form_algo {
        margin: 0 0 20px;
        font-family: 'CookieRun-Regular';
        font-size: 12px;
        display: grid;
        word-break: break-all;
    }
    .btn-sm{
        width:80% !important;
        word-break: break-all;
    }

    /* 결과 테이블 수정 */
    .results-table-container {
        max-height: 300px;
        overflow-y: auto;
        width: 100%;
    }

    .results-table-container th,
    .results-table-container td {
        font-size: 10px;
        padding: 5px;
    }

    /* 결과 카드 수정 */
    .result-card {
        font-size: 12px;
        padding: 10px;
        margin-top: 15px;
        width: 100%;
    }

    /* 채팅 박스 수정 */
    .chat-box,
    .chat-window {
        max-height: 150px;
        overflow-y: auto;
        width: 100%;
        padding: 10px;
    }
}