body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #020617, #0f172a);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow-x: hidden;
}

/* canvas */
canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* 로고 */
.logo {
    height: clamp(120px, 18vw, 200px);
    width: auto;
    display: block;
    margin: 0 auto 35px;
    object-fit: contain;
    animation: float 4s ease-in-out infinite, glow 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 14px rgba(124, 58, 237, 0.6));
}

/* 떠다니기 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* glow */
@keyframes glow {
    0%, 100% { opacity: 0.92; }
    50% { opacity: 1; }
}

/* 카드 */
.container {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    width: 90%;
    max-width: 640px;
    padding: clamp(30px, 5vw, 70px);
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* 모바일에서 카드 살짝 축소 */
@media (max-width: 768px) {
    .container {
        width: 88%;
        max-width: 420px;
        padding: 20px 16px;
    }

    .logo {
        height: clamp(90px, 14vw, 120px);
        margin-bottom: 24px;
    }

    h1 {
        font-size: clamp(26px, 5vw, 34px);
        margin-bottom: 25px;
    }

    .btn {
        padding: 14px;
    }
}

/* 타이틀 */
h1 {
    font-size: clamp(34px, 4.5vw, 52px);
    margin-bottom: 35px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 0 10px rgba(124,58,237,0.4);
}

/* 버튼 */
.btn {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    box-shadow: 0 0 20px rgba(124,58,237,0.5);
    transition: 0.3s;
    margin-bottom: 12px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 40px rgba(124,58,237,0.9);
}

/* 비활성 버튼 */
.btn.disabled {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    box-shadow: none;
    cursor: not-allowed;
}

.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 기본 텍스트 */
.btn .text {
    display: inline-block;
    transition: all 0.2s;
}

/* hover 텍스트 */
.btn .hover-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: all 0.2s;
    white-space: nowrap;
}

/* hover 시 교체 */
.btn.disabled:hover .text {
    opacity: 0;
    transform: scale(0.9);
}

.btn.disabled:hover .hover-text {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Burger King 버튼 */
.bkr {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.bkr-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    color: white;
    transition: 0.25s;
}

.bkr-btn img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
    display: block;
    object-fit: contain;
}

.bkr-btn:hover {
    transform: translateY(-2px);
    background: #D62300;
    box-shadow: 0 0 15px rgba(214,35,0,0.5);
}

/* 아이콘 */
.icons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.icon {
    width: 40px;
    height: 40px;
    opacity: 0.7;
    cursor: pointer;
    transition: 0.3s;
}

.icon:hover {
    opacity: 1;
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px #7c3aed);
}

/* 메일 */
.mail {
    margin-top: 20px;
    opacity: 0.7;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mail-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* footer */
.footer {
    margin-top: 30px;
    font-size: 12px;
    opacity: 0.3;
}

.footer span {
    opacity: 0.65;
    font-size: 11px;
}



/* ===== CHAT UI ===== */

.chat-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 900px;
    height: 85vh;

    backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* 채팅 영역 */
#chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
}

/* 메시지 */
.message {
    max-width: 65%;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 14px;
    line-height: 1.4;
    font-size: 14px;
}

/* 유저 */
.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

/* AI */
.bot {
    align-self: flex-start;
    background: rgba(255,255,255,0.08);
}

/* 입력 영역 */
.input-area {
    display: flex;
    padding: 14px;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* 입력창 */
#input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    outline: none;

    background: rgba(255,255,255,0.08);
    color: white;
}

/* 버튼 */
.input-area button {
    margin-left: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    border: none;

    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    font-weight: 600;

    cursor: pointer;
    transition: 0.2s;
}

.input-area button:hover {
    transform: scale(1.05);
}

/* 스크롤바 (간지🔥) */
#chat-box::-webkit-scrollbar {
    width: 6px;
}

#chat-box::-webkit-scrollbar-thumb {
    background: rgba(124,58,237,0.5);
    border-radius: 10px;
}

/* ===== 전체 레이아웃 ===== */

.chat-wrapper {
    display: flex;
    gap: 20px;
    width: 95%;
    max-width: 1200px;
    height: 85vh;
}

/* ===== 캐릭터 ===== */

.character-area {
    position: relative;
    width: 40%;
    min-width: 300px;
    height: 100%;
}

/* Live2D canvas */
#live2d {
    width: 100%;
    height: 100%;
}

/* ===== 말풍선 ===== */

#speech-bubble {
    position: absolute;
    top: 10%;
    left: 20%;

    background: rgba(255,255,255,0.95);
    color: black;

    padding: 12px 16px;
    border-radius: 12px;

    max-width: 200px;
    font-size: 14px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ===== 채팅창 ===== */

.chat-container {
    width: 60%;
}