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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #f8fafc;
    --dark: #1e293b;
}

body {
    font-family: 'Noto Sans KR', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 92vh;
    max-height: 900px;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 30px 30px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: pulse 3s ease-in-out infinite;
}

.logo i {
    font-size: 32px;
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-text p {
    font-size: 14px;
    opacity: 0.95;
}

.header-right {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.status-bar {
    padding: 16px 30px;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-item i {
    color: var(--primary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.settings-panel {
    display: none;
    padding: 20px 30px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid #fbbf24;
}

.settings-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 28px;
    background: #cbd5e1;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: left 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    left: 31px;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 25px 30px;
    background: #fafafa;
    position: relative;
}

.welcome-screen {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.8s ease;
}

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

.welcome-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    animation: float2 3s ease-in-out infinite;
}

.welcome-icon i {
    font-size: 60px;
    color: white;
}

@keyframes float2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 14px;
    animation: messageSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.message-avatar i {
    font-size: 22px;
    color: white;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #f093fb 0%, var(--accent) 100%);
}

.message-content {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 20px;
    line-height: 1.7;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 15px;
    position: relative;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.message.assistant .message-content {
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.message.system .message-content {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    text-align: center;
    max-width: 100%;
    font-size: 14px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.typing-indicator {
    display: none;
    padding: 16px 20px;
    background: white;
    border-radius: 20px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    width: fit-content;
}

.typing-indicator.active {
    display: flex;
    gap: 8px;
}

.typing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    animation: typing 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

.quick-actions {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
}

.quick-actions::-webkit-scrollbar {
    height: 6px;
}

.quick-actions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.quick-btn {
    padding: 12px 22px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    color: var(--dark);
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-btn i {
    font-size: 16px;
}

.quick-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.input-container {
    padding: 25px 30px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 14px;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

#messageInput {
    width: 100%;
    padding: 16px 50px 16px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
    background: #f8fafc;
}

#messageInput:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.clear-btn.visible {
    display: flex;
}

.clear-btn:hover {
    background: #cbd5e1;
    color: var(--dark);
}

#sendBtn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#sendBtn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

#sendBtn:active:not(:disabled) {
    transform: translateY(-1px);
}

#sendBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scroll-to-bottom {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    z-index: 10;
    transition: all 0.3s;
}

.scroll-to-bottom i {
    font-size: 20px;
}

.scroll-to-bottom.visible {
    display: flex;
}

.scroll-to-bottom:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}

.chat-container::-webkit-scrollbar {
    width: 10px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .header-text h1 {
        font-size: 22px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .welcome-icon {
        width: 100px;
        height: 100px;
    }
    
    .welcome-icon i {
        font-size: 50px;
    }
    
    .welcome-title {
        font-size: 26px;
    }

    /* style.css에 추가할 스타일 */

/* 웰컴 노트 스타일 추가 */
.welcome-note {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-top: 20px;
    padding: 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.welcome-note strong {
    color: var(--primary);
    font-weight: 600;
}

/* style.css에 추가할 스타일 - welcome-tips */

.welcome-tips {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    text-align: left;
}

.tip-item i {
    font-size: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.tip-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.tip-text strong {
    color: var(--dark);
    font-weight: 600;
}

@media (max-width: 768px) {
    .welcome-tips {
        max-width: 100%;
    }
    
    .tip-item {
        padding: 12px 15px;
    }
    
    .tip-item i {
        font-size: 20px;
    }
}
}
