:root {
    --bg-color: #0d0d12;
    --chat-bg: #1a1a24;
    --accent: #00f2ff;
    --accent-secondary: #bc13fe;
    --text-color: #e0e0e0;
    --bot-msg-bg: #2a2a35;
    --user-msg-bg: #007bff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 480px;
    /* 모바일 대응 */
    height: 80vh;
    background-color: var(--chat-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent));
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.status-bar {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

.chat-log {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
    line-height: 1.4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.user {
    background-color: var(--user-msg-bg);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot {
    background-color: var(--bot-msg-bg);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border-left: 3px solid var(--accent);
}

.system {
    font-size: 0.8rem;
    color: #888;
    align-self: center;
    background: transparent;
    border: none;
    text-align: center;
    width: 100%;
    margin: 5px 0;
}

.error {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    align-self: center;
    border: 1px solid #ff4d4d;
}

.success {
    color: #00ff88;
    border: 1px solid #00ff88;
    background: rgba(0, 255, 136, 0.1);
    align-self: center;
}

.input-area {
    padding: 15px;
    background-color: #252530;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

input[type="text"] {
    flex: 1;
    background: #111;
    border: 1px solid #333;
    color: white;
    padding: 12px;
    border-radius: 20px;
    outline: none;
    font-size: 1rem;
}

button {
    background: var(--accent);
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:active {
    transform: scale(0.95);
}

#file-input {
    display: none;
}