/* MCP 프레젠테이션 - 발표 최적화 디자인 */

/* CSS 변수 정의 */
:root {
    --primary-orange: #ea580c;
    --secondary-orange: #f97316;
    --accent-orange: #fb923c;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --bg-navy: #1e293b;
    --bg-navy-light: #334155;
    --card-bg: #ffffff;
    --border-light: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 전체 배경 설정 */
html, body {
    background: linear-gradient(135deg, var(--bg-navy) 0%, var(--bg-navy-light) 100%) !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, sans-serif;
}

.reveal {
    background: linear-gradient(135deg, var(--bg-navy) 0%, var(--bg-navy-light) 100%) !important;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, sans-serif;
}

.reveal .backgrounds {
    background: linear-gradient(135deg, var(--bg-navy) 0%, var(--bg-navy-light) 100%) !important;
}

.reveal .backgrounds .slide-background {
    background: linear-gradient(135deg, var(--bg-navy) 0%, var(--bg-navy-light) 100%) !important;
}

/* 슬라이드 기본 스타일 - 강제 중앙 정렬 */
.reveal .slides section {
    background: var(--card-bg) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem 2.5rem !important;
    color: var(--text-dark) !important;
    backdrop-filter: blur(10px) !important;
    width: 90% !important;
    max-width: 1100px !important;
    text-align: center !important;
    
    /* 강제 중앙 정렬 */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    
    /* 높이 제한 - 스크롤 없이 */
    max-height: 85vh !important;
    overflow: hidden !important;
    
    /* 내용이 많을 때 자동 축소 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* 오렌지 상단 라인 */
.reveal .slides section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    border-radius: 24px 24px 0 0;
}

/* 타이틀 슬라이드 (첫 번째) */
.reveal .slides section:first-child {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%) !important;
    color: var(--text-white) !important;
    border: none !important;
    /* 중앙 정렬 강화 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.reveal .slides section:first-child::before {
    display: none;
}

.reveal .slides section:first-child h1,
.reveal .slides section:first-child h2,
.reveal .slides section:first-child h3,
.reveal .slides section:first-child p {
    color: var(--text-white) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 제목 스타일 */
.reveal h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-orange) !important;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.02em;
}

.reveal .slides section:first-child h1 {
    color: var(--text-white) !important;
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
}

.reveal h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-dark) !important;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 0.8rem;
}

.reveal h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    border-radius: 2px;
}

.reveal h3 {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--primary-orange) !important;
    margin-bottom: 1rem;
    text-align: center;
}

.reveal h4 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    margin-bottom: 0.8rem;
}

/* 본문 텍스트 */
.reveal p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--text-dark) !important;
    font-weight: 400;
    text-align: center;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.reveal li {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    color: var(--text-dark) !important;
    text-align: left;
}

.reveal ul, .reveal ol {
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

/* 강조 텍스트 */
.reveal strong {
    color: var(--primary-orange) !important;
    font-weight: 600;
}

.reveal em {
    color: var(--secondary-orange) !important;
    font-style: normal;
    font-weight: 500;
}

/* Fragment 애니메이션 */
.reveal .fragment {
    margin: 1rem 0;
    padding: 1.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-orange);
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.reveal .fragment:not(.visible) {
    opacity: 0.3;
    transform: translateY(20px);
}

.reveal .fragment.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Before/After 비교 스타일 */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
    text-align: left;
}

.before, .after {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border-top: 6px solid var(--primary-orange);
}

.before {
    border-top-color: #dc2626;
}

.after {
    border-top-color: #16a34a;
}

.before h4 {
    color: #dc2626 !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.after h4 {
    color: #16a34a !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 시간 절약 강조 박스 */
.savings-highlight {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    color: var(--text-white);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.savings-highlight h3 {
    color: var(--text-white) !important;
    margin: 0;
    font-size: 1.4rem;
}

/* MCP 기능 카드 스타일 */
.mcp-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 6px solid var(--primary-orange);
    position: relative;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.feature-card h3 {
    color: var(--primary-orange) !important;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light) !important;
}

.feature-card ul {
    text-align: left;
    margin: 0;
}

.feature-card li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* 아키텍처 플로우 */
.architecture-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.flow-step {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    flex: 1;
    min-width: 180px;
    border-top: 4px solid var(--primary-orange);
}

.flow-step h4 {
    color: var(--primary-orange) !important;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.flow-arrow {
    font-size: 2rem;
    color: var(--primary-orange);
    font-weight: bold;
}

/* 코드 블록 */
.reveal pre {
    width: 100%;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
    overflow: hidden;
    max-width: 95%;
}

.reveal pre code {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 2rem;
    border-radius: 16px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    background: linear-gradient(135deg, var(--bg-navy) 0%, var(--bg-navy-light) 100%);
    color: #e2e8f0;
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    color: var(--text-white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mermaid 다이어그램 */
.mermaid-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    width: 100%;
}

.mermaid {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(234, 88, 12, 0.15);
    margin: 0 auto;
    max-width: 100%;
    width: auto;
    overflow: visible;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif !important;
}

/* Large Mermaid 다이어그램 스타일 */
.mermaid-large {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 24px !important;
    padding: 2rem !important;
    box-shadow: var(--shadow-lg) !important;
    border: 3px solid rgba(234, 88, 12, 0.2) !important;
    margin: 2rem auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif !important;
    transform: scale(1.1) !important;
    transform-origin: center !important;
    min-height: 600px !important;
}

/* Mermaid 내부 요소 크기 조정 */
.mermaid-large svg {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
}

.mermaid-large .sequenceDiagram {
    font-size: 14px !important;
}

.mermaid-large text {
    font-size: 13px !important;
    font-weight: 500 !important;
}

.mermaid-large .actor {
    font-size: 14px !important;
    font-weight: 600 !important;
}

.mermaid-large .note {
    font-size: 12px !important;
}

/* 반응형 mermaid-large */
@media (max-width: 768px) {
    .mermaid-large {
        transform: scale(0.9) !important;
        padding: 1.5rem !important;
        min-height: 500px !important;
    }
}

@media (max-width: 480px) {
    .mermaid-large {
        transform: scale(0.8) !important;
        padding: 1rem !important;
        min-height: 400px !important;
    }
}

/* pre 태그로 감싼 Mermaid 다이어그램 */
pre.mermaid {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 24px !important;
    padding: 2rem !important;
    box-shadow: var(--shadow-lg) !important;
    border: 3px solid rgba(234, 88, 12, 0.2) !important;
    margin: 2rem auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif !important;
    transform: scale(1.1) !important;
    transform-origin: center !important;
    min-height: 600px !important;
    white-space: pre !important;
    text-align: left !important;
}

/* pre.mermaid 내부 SVG 스타일 */
pre.mermaid svg {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
}

/* 반응형 pre.mermaid */
@media (max-width: 768px) {
    pre.mermaid {
        transform: scale(0.9) !important;
        padding: 1.5rem !important;
        min-height: 500px !important;
    }
}

@media (max-width: 480px) {
    pre.mermaid {
        transform: scale(0.8) !important;
        padding: 1rem !important;
        min-height: 400px !important;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .reveal .slides section {
        padding: 2rem;
        width: 95%;
    }
    
    .reveal h1 {
        font-size: 3rem;
    }
    
    .reveal h2 {
        font-size: 2.5rem;
    }
    
    .reveal h3 {
        font-size: 1.8rem;
    }
    
    .reveal p {
        font-size: 1.1rem;
    }
    
    .comparison {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .mcp-features {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .architecture-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .reveal .slides section {
        padding: 1.5rem;
        margin: 10px;
    }
    
    .reveal h1 {
        font-size: 2.5rem;
    }
    
    .reveal h2 {
        font-size: 2rem;
    }
    
    .reveal p {
        font-size: 1rem;
    }
}

/* 특별한 스타일 */
.emoji-large {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.highlight-box {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    color: var(--text-white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.highlight-box h3 {
    color: var(--text-white) !important;
    margin-bottom: 1rem;
}

.highlight-box p {
    color: var(--text-white) !important;
    margin: 0;
}

/* 발표자 도구 스타일 */
.blackout {
    background: #000000 !important;
}

.blackout * {
    visibility: hidden !important;
}

.whiteout {
    background: #ffffff !important;
}

.whiteout * {
    visibility: hidden !important;
}

.title-slide {
    /* 타이틀 슬라이드 전용 스타일 */
}

/* 인쇄용 스타일 */
@media print {
    .reveal .slides section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-light);
        background: var(--text-white) !important;
    }
    
    .reveal .fragment {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* 메신저 UI 스타일 */
.messenger-container {
    max-width: 900px;
    margin: 0 auto;
    background: #f8fafc;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1.2rem;
    font-family: 'Noto Sans KR', sans-serif;
    max-height: 65vh;
    overflow-y: auto;
    transform: scale(0.9);
}

.messenger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
}

.messenger-header h3 {
    color: var(--primary-orange) !important;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.timestamp {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
}

.messenger-message {
    margin-bottom: 1rem;
}

.message-bot {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    text-align: left;
}

.message-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #ffffff;
}

.message-content h4 {
    color: var(--primary-orange) !important;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.error-section {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.error-section h5 {
    color: var(--text-dark) !important;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-align: left;
}

.error-section p {
    color: var(--text-dark) !important;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    text-align: left;
}

.error-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.error-section li {
    color: var(--text-dark) !important;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    text-align: left;
}

.error-section.summary {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border-color: #f59e0b !important;
    border-width: 2px !important;
    margin-top: 1rem !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

.error-section.summary h5 {
    color: #b45309 !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 0.8rem !important;
}

.error-section.summary p {
    color: #92400e !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}

.error-section code {
    background: #374151;
    color: #f9fafb;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.8em;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
}

.message-time {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 1rem;
    text-align: right;
    font-style: italic;
}

/* 메신저 UI 반응형 */
@media (max-width: 768px) {
    .messenger-container {
        transform: scale(0.8);
        max-height: 55vh;
    }
    
    .error-section li {
        font-size: 0.85rem;
    }
    
    .message-content {
        padding: 1rem;
    }
}

/* 비디오 컨테이너 스타일 */
.video-container {
    margin: 2rem auto;
    max-width: 900px;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 2rem 2rem 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(234, 88, 12, 0.15);
    position: relative;
    overflow: hidden;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    border-radius: 20px 20px 0 0;
}

/* 비디오 래퍼 스타일링 */
.video-container > div {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 비율 */
    overflow: hidden;
    border-radius: 12px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 비디오 컨테이너 반응형 */
@media (max-width: 768px) {
    .video-container {
        padding: 1.5rem 1.5rem 2rem 1.5rem;
        margin: 1.5rem auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .video-container {
        padding: 1rem 1rem 1.5rem 1rem;
        margin: 1rem auto;
        max-width: 100%;
    }
}