:root {
    --primary-color: #ffb7c5;
    --secondary-color: #4285F4;
    --bg-color: #f0f2f5;
    --text-color: #333333;
    --card-bg: #ffffff;
    --bot-msg-bg: #ffffff;
    --user-msg-bg: #ffb7c5;
}

body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.chat-wrapper {
    width: 100%;
    max-width: 800px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    margin-top: 2vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.chat-header {
    background-color: var(--card-bg);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #ececec;
    z-index: 10;
}

.chat-header h1 {
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.chat-header p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f7f9fa;
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 20px;
    line-height: 1.5;
    font-size: 1rem;
    word-break: keep-all;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    background-color: var(--bot-msg-bg);
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user {
    background-color: var(--user-msg-bg);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 5px rgba(255, 183, 197, 0.3);
}

.chat-input-area {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-top: 1px solid #ececec;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.quick-reply-btn {
    background-color: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.input-group {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 12px 20px;
    font-size: 1rem;
    border: 1px solid #ececec;
    border-radius: 30px;
    outline: none;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    background-color: #fff;
}

button#sendBtn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

button#sendBtn:hover {
    background-color: #ff9eaa;
}

button#sendBtn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Itinerary Result Styles */
.itinerary-card {
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.itinerary-header {
    text-align: center;
    margin-bottom: 20px;
}

.itinerary-emoji {
    font-size: 3rem;
}

.itinerary-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0 5px 0;
}

.itinerary-desc {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.course-box {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.course-title {
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.course-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-item {
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.course-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.place-time {
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: bold;
}

.place-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.05rem;
    margin: 3px 0;
}

.place-detail {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.item-map-btn {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e8f0fe;
    color: #1a73e8;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px;
    background-color: var(--bot-msg-bg);
    border-radius: 20px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #ccc;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}