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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e8e8e8;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-content {
    display: none;
    padding: 30px;
    min-height: 500px;
}

.tab-content.active {
    display: block;
}

/* 채팅 스타일 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background: #667eea;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.assistant {
    background: #e8e8e8;
    color: #333;
}

.message-header {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.message-content {
    line-height: 1.6;
}

.usage-info {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

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

.chat-input-container input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input-container input:focus {
    border-color: #667eea;
}

.chat-input-container button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.chat-input-container button:hover {
    background: #5568d3;
}

.chat-input-container button:active {
    transform: scale(0.98);
}

/* 멀티모달 스타일 */
.multimodal-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-section textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.input-section textarea:focus {
    border-color: #667eea;
}

.file-upload-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-label {
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    color: #667eea;
    transition: background 0.3s;
}

.file-label:hover {
    background: #e8e8e8;
}

.file-upload-section input[type="file"] {
    display: none;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
}

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

.button-group button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.button-group button:first-child {
    background: #667eea;
    color: white;
}

.button-group button:first-child:hover {
    background: #5568d3;
}

.button-group button:last-child {
    background: #f5f5f5;
    color: #666;
}

.button-group button:last-child:hover {
    background: #e8e8e8;
}

.multimodal-response {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    max-height: 500px;
    overflow-y: auto;
}

/* 웹 요약 스타일 */
.web-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.web-container .input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.web-container input[type="url"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    outline: none;
}

.web-container input[type="url"]:focus {
    border-color: #667eea;
}

.web-container button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.web-container button:hover {
    background: #5568d3;
}

.web-response {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    line-height: 1.8;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .multimodal-container {
        grid-template-columns: 1fr;
    }
    
    .message {
        max-width: 90%;
    }
    
    header h1 {
        font-size: 2em;
    }
}

