﻿@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    --ink-900: #0b1220;
    --ink-700: #1f2a44;
    --ink-500: #52607a;
    --surface-100: #f5f7fb;
    --surface-200: #edf1f7;
    --accent-700: #0e3b5e;
    --accent-500: #1f6b8f;
    --accent-300: #80a7bd;
    --gold-500: #b08b3e;
    --success-500: #0f766e;
    --danger-500: #b91c1c;
}

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

body {
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(14, 59, 94, 0.18), transparent 60%),
        radial-gradient(900px 600px at 90% -20%, rgba(176, 139, 62, 0.12), transparent 55%),
        linear-gradient(180deg, #f6f8fc 0%, #e9eef6 100%);
    font-size: 16.5px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--ink-900);
}

.main-wrapper {
    width: 100%;
    max-width: 1120px;
    position: relative;
}

/* 메인 카드 */
.main-card {
    background: white;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* 헤더 */
.card-header {
    background: linear-gradient(160deg, #f8fafc 0%, #eef3f8 100%);
    color: var(--ink-900);
    padding: 36px 40px 32px;
    text-align: center;
    border-bottom: 1px solid rgba(14, 59, 94, 0.12);
}

.header-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0e3b5e 0%, #1f6b8f 100%);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.2em;
    letter-spacing: 0.12em;
    box-shadow: 0 12px 24px rgba(14, 59, 94, 0.18);
}

.card-header h1 {
    font-size: 2.3em;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.15em;
    opacity: 0.7;
    font-weight: 500;
}

/* 컨텐츠 */
.card-content {
    padding: 60px;
}

/* 시스템 상태 패널 */
.status-panel {
    background: linear-gradient(120deg, #f7f9fc 0%, #eef2f8 100%);
    border-radius: 18px;
    padding: 36px;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent-500);
    border: 1px solid rgba(31, 107, 143, 0.12);
}

.status-panel h3 {
    color: var(--accent-500);
    font-size: 1.25em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.18em;
    font-weight: 600;
    color: var(--ink-700);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e0;
    animation: none;
}

.status-dot.inactive { background: #cbd5e0; }
.status-dot.ready { background: #fbbf24; }
.status-dot.active { background: #16a34a; }
.status-dot.speaking { background: #3b82f6; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15); }
}

.audio-visualizer {
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    margin-top: 15px;
    overflow: hidden;
}

.audio-bar {
    height: 100%;
    background: linear-gradient(90deg, #0f766e, #1f6b8f, #0b1d2e);
    width: 0%;
    transition: width 0.1s;
    border-radius: 18px;
}

.mic-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    display: none;
}

.mic-status.active {
    display: block;
}

/* 컨트롤 버튼 */
.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.btn {
    padding: 26px 40px;
    border: none;
    border-radius: 18px;
    font-size: 1.25em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-start {
    background: linear-gradient(135deg, #0e3b5e 0%, #1f6b8f 100%);
    color: white;
    box-shadow: 0 10px 22px rgba(14, 59, 94, 0.25);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.btn-stop {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: white;
    box-shadow: 0 10px 22px rgba(185, 28, 28, 0.25);
}

.btn-stop:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* AI 대화 영역 */
.conversation-section {
    background: linear-gradient(140deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 18px;
    padding: 36px;
    margin-bottom: 30px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* 회의 인사이트 (대화 영역 내부) */
.insights-inline {
    display: grid;
    gap: 16px;
}

.insight-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px 30px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.insight-loading {
    text-align: center;
    color: #475569;
    font-weight: 600;
}

.insight-card h4 {
    font-size: 1.15em;
    color: var(--ink-900);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.insight-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.insight-chip {
    background: #f8fafc;
    border: 1px solid rgba(14, 59, 94, 0.2);
    border-radius: 999px;
    padding: 15px 24px;
    min-width: 120px;
    flex: 0 1 auto;
    font-size: calc(12.5px + (var(--w, 60) - 50) * 0.08px);
    box-shadow: inset 0 0 0 1px rgba(14, 59, 94, 0.04);
}

.insight-chip-title {
    font-weight: 700;
    color: var(--accent-700);
    letter-spacing: 0.3px;
}


.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.15em;
    color: var(--ink-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.section-header .icon {
    font-size: 1.3em;
}

.transcript-area {
    background: white;
    border-radius: 18px;
    padding: 36px;
    min-height: 300px;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #9ca3af;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 1.25em;
    font-weight: 500;
}

/* 대화 아이템 */
.transcript-item {
    margin-bottom: 15px;
    padding: 20px 24px;
    border-radius: 18px;
    animation: slideIn 0.4s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transcript-item.user-question {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
    border-left: 5px solid var(--accent-500);
}

.transcript-item.ai-response {
    background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 100%);
    border-left: 5px solid var(--gold-500);
}

.transcript-time {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 700;
}

.transcript-text {
    color: #1f2937;
    line-height: 1.7;
    font-size: 1.18em;
}

/* 이메일 섹션 */
.email-section {
    background: linear-gradient(140deg, #f7fafc 0%, #eef2f7 100%);
    border-radius: 18px;
    padding: 42px;
    border: 1px solid rgba(14, 59, 94, 0.12);
}

.email-section h3 {
    color: var(--accent-700);
    font-size: 1.25em;
    margin-bottom: 20px;
    font-weight: 700;
}

.email-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.email-input {
    flex: 1;
    padding: 20px 26px;
    border: 1px solid #d0d7e2;
    border-radius: 18px;
    font-size: 1.16em;
    transition: all 0.3s;
    background: white;
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-300);
    box-shadow: 0 0 0 3px rgba(31, 107, 143, 0.12);
}

.btn-add {
    padding: 20px 36px;
    background: linear-gradient(135deg, #0e3b5e 0%, #1f6b8f 100%);
    color: white;
    border-radius: 18px;
    box-shadow: 0 6px 14px rgba(14, 59, 94, 0.25);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(14, 59, 94, 0.32);
}

.email-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 45px;
    margin-bottom: 15px;
}

.email-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 24px;
    background: linear-gradient(135deg, #0e3b5e 0%, #1f6b8f 100%);
    color: white;
    border-radius: 999px;
    font-size: 1.05em;
    font-weight: 600;
}

.email-tag-remove {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2em;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.email-tag-remove:hover {
    opacity: 1;
}

.btn-send-email {
    width: 100%;
    padding: 22px;
    background: linear-gradient(135deg, #0e3b5e 0%, #1f6b8f 100%);
    color: white;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(14, 59, 94, 0.28);
    font-size: 1.1em;
}

.btn-send-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* 알림 */
.alert {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 18px 28px;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 1000;
    max-width: 450px;
    animation: slideInRight 0.4s;
    font-weight: 600;
    font-size: 1.15em;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 5px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 5px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 5px solid #3b82f6;
}

/* 로딩 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    flex-direction: column;
    color: white;
}

.loading.active {
    display: flex;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    margin-top: 25px;
    font-size: 1.25em;
    font-weight: 600;
}

/* 스크롤바 */
.transcript-area::-webkit-scrollbar {
    width: 9px;
}

.transcript-area::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.transcript-area::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.transcript-area::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 반응형 */
@media (max-width: 768px) {
    .card-content {
        padding: 32px;
    }

    .control-buttons {
        grid-template-columns: 1fr;
    }

    .email-input-group {
        flex-direction: column;
    }

    .alert {
        right: 20px;
        left: 20px;
    }
}


