/* ===========================
   기본 설정
=========================== */

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

body{

    font-family:'Pretendard',sans-serif;

    min-height:100vh;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#0f172a;

    overflow-x:hidden;

    color:white;

}

/* ===========================
   움직이는 배경
=========================== */

.background{

    position:fixed;

    inset:0;

    background:
    linear-gradient(
    -45deg,
    #2563eb,
    #9333ea,
    #0ea5e9,
    #06b6d4);

    background-size:400% 400%;

    animation:bgMove 15s ease infinite;

    z-index:-2;

}

.background::after{

    content:"";

    position:absolute;

    inset:0;

    backdrop-filter:blur(80px);

}

@keyframes bgMove{

0%{background-position:0% 50%;}

50%{background-position:100% 50%;}

100%{background-position:0% 50%;}

}

/* ===========================
   컨테이너
=========================== */

.container{

    width:100%;

    max-width:900px;

    padding:30px;

}

/* ===========================
   카드
=========================== */

.card{

    background:rgba(255,255,255,.12);

    backdrop-filter:blur(25px);

    border:1px solid rgba(255,255,255,.2);

    border-radius:25px;

    padding:40px;

    box-shadow:

    0 20px 60px rgba(0,0,0,.35);

    text-align:center;

}

/* ===========================
   제목
=========================== */

.title h1{

    font-size:42px;

    margin-bottom:10px;

    font-weight:800;

}

.title p{

    opacity:.8;

    margin-bottom:35px;

    font-size:18px;

}

/* ===========================
   생성 버튼
=========================== */

#generateBtn{

    border:none;

    outline:none;

    cursor:pointer;

    background:linear-gradient(135deg,#ffd93d,#ff9800);

    color:#111;

    font-size:20px;

    font-weight:700;

    padding:18px 50px;

    border-radius:50px;

    transition:.3s;

}

#generateBtn:hover{

    transform:translateY(-5px);

    box-shadow:0 15px 35px rgba(255,170,0,.45);

}

#generateBtn:active{

    transform:scale(.96);

}

/* ===========================
   로딩
=========================== */

#loading{

    margin-top:25px;

    opacity:.8;

    display:none;

}

/* ===========================
   번호 영역
=========================== */

.numbers{

    margin-top:45px;

    display:flex;

    justify-content:center;

    flex-wrap:wrap;

    gap:18px;

}

/* ===========================
   로또 공
=========================== */

.ball{

    width:72px;

    height:72px;

    border-radius:50%;

    background:white;

    color:#111;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:28px;

    font-weight:800;

    transform:scale(0);

    transition:.35s;

    box-shadow:

    0 10px 25px rgba(0,0,0,.35);

}

/* 번호 표시 */

.ball.show{

    transform:scale(1);

}

/* ===========================
   번호 색상
=========================== */

.yellow{

    background:#facc15;

}

.blue{

    background:#3b82f6;

    color:white;

}

.red{

    background:#ef4444;

    color:white;

}

.gray{

    background:#9ca3af;

}

.green{

    background:#22c55e;

    color:white;

}

/* ===========================
   버튼들
=========================== */

.buttons{

    margin-top:40px;

    display:flex;

    justify-content:center;

    gap:20px;

    flex-wrap:wrap;

}

.buttons button{

    border:none;

    cursor:pointer;

    padding:14px 28px;

    border-radius:15px;

    font-size:17px;

    font-weight:700;

    transition:.3s;

}

#copyBtn{

    background:#3b82f6;

    color:white;

}

#resetBtn{

    background:#ef4444;

    color:white;

}

.buttons button:hover{

    transform:translateY(-4px);

}

/* ===========================
   최근 번호
=========================== */

.history{

    margin-top:35px;

    background:rgba(255,255,255,.12);

    backdrop-filter:blur(20px);

    border-radius:20px;

    padding:30px;

}

.history h2{

    margin-bottom:20px;

}

#historyList{

    display:flex;

    flex-direction:column;

    gap:12px;

}

.historyItem{

    background:rgba(255,255,255,.1);

    padding:12px;

    border-radius:12px;

    font-weight:600;

}

/* ===========================
   Footer
=========================== */

footer{

    position:fixed;

    bottom:15px;

    left:50%;

    transform:translateX(-50%);

    opacity:.75;

    font-size:14px;

}

/* ===========================
   모바일
=========================== */

@media(max-width:768px){

.title h1{

font-size:32px;

}

.ball{

width:58px;

height:58px;

font-size:22px;

}

.card{

padding:25px;

}

.buttons{

flex-direction:column;

}

.buttons button{

width:100%;

}

}