@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Chakra+Petch:wght@400;600&family=Share+Tech+Mono&family=Noto+Sans+KR:wght@400;500;700;900&family=Nanum+Myeongjo:wght@400;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #050508;
  --bg-secondary: #0a0a0f;
  --text-primary: #e0e0e0;
  --text-secondary: #6b7280;
  --accent-red: #dc2626;
  --accent-amber: #f59e0b;
  --accent-cyan: #06b6d4;
  --border-color: #1f2937;
  --paper-bg: #f4f1ea; 
  --ink-color: #1c1917; 
}

body {
  font-family: 'Chakra Petch', 'Noto Sans KR', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .font-military { font-family: "Black Ops One", system-ui; letter-spacing: 0.1em; }
.font-mono, .code, .label, .status { font-family: "Share Tech Mono", monospace; }

@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popInRight { 
  0% { opacity: 0; transform: translateX(100px) scale(0.9); } 
  70% { opacity: 1; transform: translateX(-10px) scale(1.02); }
  100% { opacity: 1; transform: translateX(0) scale(1); } 
}
@keyframes fadeInSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scanline { 0% { transform: translateY(-100%); } 100% { transform: translateY(100vh); } }

.animate-slide-up { animation: slideUp 0.5s ease-out forwards; }
.animate-blink { animation: blink 1s infinite; }

/* 공통 상단바 & 공지 */
.alert-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  background: linear-gradient(90deg, #1a0000 0%, #2d0000 50%, #1a0000 100%);
  border-bottom: 2px solid var(--accent-red); padding: 0.75rem 0; overflow: hidden;
  white-space: nowrap;
}
.alert-marquee { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.alert-content { display: flex; }
.alert-item { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 3rem; font-family: "Share Tech Mono", monospace; font-size: 0.875rem; }
.alert-item.critical { color: var(--accent-red); }
.alert-item.warning { color: var(--accent-amber); }
.alert-icon { font-style: normal; font-size: 1.1rem; }

/* 헤더 & 로고 & 상단 버튼 */
.main-header { 
  position: fixed; top: 45px; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; 
  padding: 1rem 2rem; background: rgba(5, 5, 8, 0.95); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(10px); 
}
.header-left { display: flex; align-items: center; gap: 1rem; cursor: pointer; transition: 0.3s; }
.header-left:hover { opacity: 0.8; }
.header-logo { width: 45px; height: 45px; object-fit: contain; }
.header-logo-text h1 { font-size: 1.5rem; letter-spacing: 0.1em; color: white;}
.header-logo-text p { font-family: "Share Tech Mono", monospace; font-size: 0.625rem; color: var(--text-secondary); letter-spacing: 0.2em; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.deploy-btn, .logout-btn { 
  display: flex; align-items: center; justify-content: center;
  height: 38px; width: 90px; 
  font-family: "Noto Sans KR", sans-serif; font-weight: 700; font-size: 0.8rem; 
  cursor: pointer; transition: 0.3s; border-radius: 4px; background: rgba(0,0,0,0.5);
}
.deploy-btn { border: 1px solid var(--accent-red); color: var(--accent-red); }
.deploy-btn:hover { background: var(--accent-red); color: white; box-shadow: 0 0 15px rgba(220, 38, 38, 0.5); }
.logout-btn { border: 1px solid var(--accent-amber); color: var(--accent-amber); font-family: "Share Tech Mono", monospace; }
.logout-btn:hover { background: var(--accent-amber); color: white; box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }

/* 알림 시스템 */
#notification-container {
  position: fixed; bottom: 30px; right: 30px; z-index: 9999;
  display: flex; flex-direction: column; gap: 15px;
}
.chat-notification {
  width: 320px; background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid var(--accent-red); border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(220, 38, 38, 0.3);
}
.chat-notification.animate-in {
  animation: popInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.chat-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: rgba(220, 38, 38, 0.1); border-bottom: 1px solid rgba(220, 38, 38, 0.3); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent-red); overflow: hidden; }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-info { flex: 1; }
.chat-info .name { font-weight: 700; font-size: 0.875rem; color: white; }
.chat-info .status { font-size: 0.75rem; color: var(--accent-red); font-family: "Share Tech Mono", monospace; }
.chat-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.25rem; transition: 0.2s; }
.chat-close:hover { color: white; }
.chat-body { padding: 1rem; }
.chat-message { font-size: 0.875rem; line-height: 1.5; margin-bottom: 1rem; color: white; }
.chat-actions { display: flex; gap: 0.5rem; }
.chat-btn { flex: 1; padding: 0.625rem; font-family: "Share Tech Mono", monospace; font-size: 0.75rem; border: none; cursor: pointer; transition: all 0.3s; border-radius: 4px; }
.chat-btn.deploy { background: var(--accent-red); color: white; }
.chat-btn.deploy:hover { background: #b91c1c; }
.chat-btn.location { background: rgba(6, 182, 212, 0.1); color: var(--accent-cyan); border: 1px solid var(--accent-cyan); }
.chat-btn.location:hover { background: rgba(6, 182, 212, 0.3); }

/* 모바일 전용 알림 FAB & 패널 */
.mobile-notif-fab { display: none; }
.mobile-notif-panel { display: none; }
.mobile-notif-panel .chat-notification.animate-in {
  animation: fadeInSlideUp 0.3s ease-out forwards;
}

/* Landing Page */
.landing-page { position: fixed; inset: 0; background: var(--bg-primary); z-index: 10000; }
.landing-container { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; gap: 1.5rem; padding: 2rem; }
.scanline { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.8), transparent); box-shadow: 0 0 15px rgba(220, 38, 38, 0.6); animation: scanline 4s linear infinite; pointer-events: none; z-index: 50; }
.warning-box { border: 1px solid rgba(220, 38, 38, 0.4); padding: 1rem 3rem; text-align: center; background: rgba(0,0,0,0.6); }
.warning-box .label { color: var(--accent-red); font-size: 0.85rem; margin-bottom: 0.5rem; letter-spacing: 0.1em; font-family: "Share Tech Mono"; }
.warning-box .message { color: var(--text-secondary); font-size: 0.85rem; letter-spacing: 0.05em; font-family: "Share Tech Mono"; }
.classified-stamp { border: 4px solid var(--accent-red); padding: 1rem 3rem; box-shadow: inset 0 0 20px rgba(220,38,38,0.2), 0 0 20px rgba(220,38,38,0.2); text-align: center; }
.classified-stamp span { font-family: "Black Ops One"; font-size: 3.5rem; color: var(--accent-red); letter-spacing: 0.2em; text-shadow: 0 0 10px rgba(220,38,38,0.5); }
.main-title { text-align: center; margin-top: 1rem; width: 100%; }
.main-title h1 { font-family: "Black Ops One", system-ui; font-weight: 400; font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: 0.15em; color: #f8f9fa; margin-bottom: 1.5rem; text-shadow: 0 0 20px rgba(255, 255, 255, 0.1); word-break: keep-all;}
.main-title .tagline { font-size: 0.9rem; color: var(--text-secondary); letter-spacing: 0.1em; }
.security-level { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; font-family: "Share Tech Mono"; font-size: 0.8rem; color: var(--text-secondary); margin-top: 1rem; margin-bottom: 1rem; text-align: center;}
.security-level .highlight { color: var(--accent-red); }
.access-btn { margin-top: 1.5rem; padding: 1rem 4rem; font-family: "Black Ops One", system-ui; font-weight: 400; font-size: 1.2rem; letter-spacing: 0.3em; background: rgba(0,0,0,0.5); color: var(--accent-red); border: 2px solid var(--accent-red); cursor: pointer; transition: all 0.3s; }
.access-btn:hover { background: rgba(220, 38, 38, 0.1); box-shadow: 0 0 30px rgba(220, 38, 38, 0.4); }

/* ★ 메인 페이지 은은한 배경 이미지 추가 ★ */
.main-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('images/background.png') center/cover no-repeat;
  opacity: 0.35; /* 투명도 조절 (너무 진하면 내용이 안보임) */
  z-index: -1;
  pointer-events: none;
}

/* Main Dashboard */
.main-content { padding-top: 130px; flex: 1; position: relative; z-index: 1; }
.map-section { padding: 0 2rem 2rem 2rem; }
.map-banner { position: relative; max-width: 1152px; height: 256px; margin: 0 auto; border: 2px solid var(--border-color); overflow: hidden; cursor: pointer; border-radius: 4px; transition: 0.3s; }
.map-banner:hover { border-color: var(--accent-red); }
.map-banner img { width: 100%; height: 100%; object-fit: cover; }
.map-warning { position: absolute; top: 1rem; left: 1rem; padding: 0.5rem 1rem; background: rgba(220, 38, 38, 0.9); font-family: "Share Tech Mono"; font-size: 0.875rem; color: white; border-radius: 4px; }
.menu-section { padding: 0 2rem 3rem 2rem; max-width: 1152px; margin: 0 auto; }
.section-title { font-size: 1.5rem; margin-bottom: 2rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--border-color); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.menu-card { padding: 1.5rem; background: linear-gradient(145deg, rgba(17, 17, 24, 0.8), rgba(10, 10, 15, 0.9)); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; transition: 0.3s; position: relative; }
.menu-card:hover { border-color: var(--accent-red); transform: translateY(-4px); }
.menu-card.disabled { opacity: 0.5; cursor: not-allowed; }
.menu-card-title h4 { font-family: 'Noto Sans KR', sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.05em; color: #fff; text-shadow: 2px 0px 0px rgba(220, 38, 38, 0.9), -2px 0px 0px rgba(6, 182, 212, 0.9); margin-bottom: 0.4rem; }
.menu-card-title .code { font-family: "Share Tech Mono", monospace; font-size: 0.65rem; color: #475569; letter-spacing: 0.05em; }
.menu-card p { font-size: 0.875rem; color: var(--text-secondary); margin-top: 1rem;}

/* 신규 요원 리스트 갤러리 */
.agent-grid-section .agent-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.agent-gallery-item { width: calc(50% - 0.75rem); position: relative; border: 2px solid var(--border-color); border-radius: 4px; overflow: hidden; cursor: pointer; transition: 0.3s; }
.agent-gallery-item:hover { border-color: var(--accent-red); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.agent-gallery-item img { width: 100%; height: auto; display: block; object-fit: cover; }

/* Agent Selection Files */
.agent-selection-page { padding-top: 180px; display: flex; flex-direction: column; align-items: center; flex: 1; overflow: hidden; }
.selection-header { text-align: center; margin-bottom: 3rem; }
.selection-header h2 { font-size: 3.5rem; letter-spacing: 0.1em; color: white; }
.selection-header p { font-family: "Share Tech Mono", monospace; color: var(--accent-red); letter-spacing: 0.2em; }
.files-container { position: relative; height: 600px; display: flex; align-items: flex-end; justify-content: center; width: 100%; max-width: 1200px; margin: 0 auto; }
.file-stack { position: absolute; width: 320px; height: 460px; cursor: pointer; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s; transform: translate(var(--tx), 0px) rotate(var(--rot)); }
.file-stack:hover { transform: translate(var(--tx), -70px) rotate(var(--rot)) scale(1.05) !important; z-index: 100 !important; box-shadow: 0 25px 50px rgba(0,0,0,0.9); }
.file-stack:nth-child(1) { --rot: -12deg; --tx: -420px; z-index: 1; }
.file-stack:nth-child(2) { --rot: -8deg; --tx: -280px; z-index: 2; }
.file-stack:nth-child(3) { --rot: -4deg; --tx: -140px; z-index: 3; }
.file-stack:nth-child(4) { --rot: 0deg; --tx: 0px; z-index: 4; }
.file-stack:nth-child(5) { --rot: 4deg; --tx: 140px; z-index: 5; }
.file-stack:nth-child(6) { --rot: 8deg; --tx: 280px; z-index: 6; }
.file-stack:nth-child(7) { --rot: 12deg; --tx: 420px; z-index: 7; }
.file-folder-back { position: absolute; inset: 0; background: linear-gradient(145deg, #654321 0%, #4a3018 100%); border-radius: 8px 8px 4px 4px; border: 2px solid #8B6914; }
.file-folder-tab { position: absolute; top: -25px; left: 20px; width: 100px; height: 30px; background: linear-gradient(145deg, #8B6914 0%, #654321 100%); border-radius: 6px 6px 0 0; border: 2px solid #8B6914; border-bottom: none; }
.file-folder-front { position: absolute; inset: 0; background: linear-gradient(145deg, #8B6914 0%, #654321 50%, #4a3018 100%); border-radius: 8px 8px 4px 4px; display: flex; flex-direction: column; padding: 1.5rem; border: 2px solid #a68532; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); }
.file-photo { flex: 1; border: 4px solid #f5f5dc; margin-bottom: 1.5rem; overflow: hidden; border-radius: 4px; background: #fff; }
.file-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.file-info { text-align: center; }
.file-info .name { font-weight: 700; font-size: 1.5rem; color: #f5f5dc; margin-bottom: 0.2rem; }
.file-info .role { font-size: 0.85rem; color: rgba(245, 245, 220, 0.8); font-family: "Share Tech Mono"; }

/* Agent Detail Page */
.agent-detail-page { padding-top: 140px; flex: 1; }
.detail-content { display: flex; align-items: center; justify-content: center; padding: 2rem; position: relative; padding-bottom: 120px; }
.document-card { 
  width: 100%; max-width: 950px; 
  background-color: var(--paper-bg); 
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.04"/></svg>');
  border: 2px solid #222; 
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8); 
  position: relative; overflow: hidden;
}
.document-card::before {
  content: "CLASSIFIED";
  position: absolute; top: 40%; left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: clamp(6rem, 10vw, 10rem);
  color: rgba(220, 38, 38, 0.04);
  font-family: "Black Ops One", system-ui;
  pointer-events: none; z-index: 0; white-space: nowrap;
}
.doc-header { background: #111; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; color: white; border-bottom: 4px solid #dc2626; position: relative; z-index: 1; }
.doc-header h4 { font-family: "Black Ops One"; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.doc-stamp { position: absolute; top: 60px; right: 30px; padding: 0.5rem 1.5rem; border: 4px solid #dc2626; color: #dc2626; font-family: "Black Ops One"; font-size: 1.5rem; letter-spacing: 0.2em; transform: rotate(-15deg); opacity: 0.8; z-index: 10; box-shadow: inset 0 0 10px rgba(220,38,38,0.2); }

.doc-new-layout { padding: 2.5rem; display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; position: relative; z-index: 1; }
.doc-left-col { display: flex; flex-direction: column; gap: 1.5rem; }
.doc-photo { aspect-ratio: 3/4; border: 4px solid #111; border-radius: 2px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.3); position: relative; }
.doc-photo::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); pointer-events: none; }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: contrast(1.1) saturate(1.1); }

.doc-basic-info-new { background: rgba(255,255,255,0.4); border: 2px dashed #444; padding: 1.5rem; }
.doc-basic-info-new h5 { margin-bottom: 1rem; color: var(--ink-color); font-weight: 800; font-size: 1rem; font-family: 'Nanum Myeongjo', serif !important; letter-spacing: 0.1em; border-bottom: 2px solid #444; padding-bottom: 0.5rem; }
.doc-info-table { width: 100%; font-size: 0.95rem; border-collapse: collapse; font-family: 'Nanum Myeongjo', serif !important; }
.doc-info-table th { text-align: left; padding: 0.6rem 0; color: #444; font-weight: 800; border-bottom: 1px dotted #888; }
.doc-info-table td { text-align: right; padding: 0.6rem 0; font-weight: 800; color: var(--ink-color); border-bottom: 1px dotted #888; }

.doc-right-col { display: flex; flex-direction: column; }
.doc-name-header-new { border-bottom: 4px double #111; padding-bottom: 1rem; margin-bottom: 1.5rem; }
.doc-name-header-new h2 { font-family: 'Nanum Myeongjo', serif !important; font-size: 3rem; font-weight: 800; color: var(--ink-color); display: flex; align-items: baseline; gap: 15px; margin-bottom: 0.2rem; }
.doc-name-header-new h2 span { font-family: "Share Tech Mono", monospace !important; font-size: 1.2rem; color: #555; font-weight: 700; }
.doc-name-header-new .role { color: #dc2626; font-weight: 800; font-size: 1.1rem; font-family: 'Nanum Myeongjo', serif !important; letter-spacing: 0.05em; }

.doc-block-new { padding: 1.5rem; border: 2px solid #222; margin-bottom: 1.5rem; background: rgba(255,255,255,0.6); position: relative; }
.doc-block-new::before { content: ''; position: absolute; top: 0; left: 0; width: 6px; height: 100%; }
.doc-block-new.outline-blue::before { background: #3b82f6; }
.doc-block-new.outline-red { background: rgba(254, 226, 226, 0.4); border-color: #b91c1c; }
.doc-block-new.outline-red::before { background: #dc2626; }
.doc-block-new.outline-gold::before { background: #ca8a04; }
.doc-block-new p { color: var(--ink-color); font-size: 1rem; line-height: 1.8; font-family: 'Nanum Myeongjo', serif !important; font-weight: 700; letter-spacing: 0.05em; }
.block-title { text-align: left; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; font-family: "Black Ops One", system-ui; letter-spacing: 0.1em; color: #111; }
.outline-red .block-title { color: #b91c1c; }

.case-log-btn { display: block; margin-top: 1rem; padding: 1rem; background: #111; color: var(--accent-red); font-family: "Black Ops One", system-ui; font-size: 1.1rem; text-decoration: none; border: 2px solid var(--accent-red); text-align: center; cursor: pointer; transition: all 0.3s; letter-spacing: 0.1em; }
.case-log-btn:hover { background: var(--accent-red); color: #fff; box-shadow: 0 0 20px rgba(220, 38, 38, 0.6); }

.doc-mini-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 0.5rem; }
.mini-img-box { border: 2px solid #111; aspect-ratio: 1; overflow: hidden; background: #fff; cursor: pointer; transition: 0.3s; padding: 2px; }
.mini-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; filter: grayscale(20%); }
.mini-img-box:hover { border-color: var(--accent-red); }
.mini-img-box:hover img { transform: scale(1.1); filter: grayscale(0%); }

.agent-thumbs { position: fixed; bottom: 0; left: 0; right: 0; padding: 1rem; background: rgba(5, 5, 8, 0.98); border-top: 1px solid var(--border-color); display: flex; justify-content: center; gap: 1rem; z-index: 1000; }
.agent-thumb { width: 56px; height: 56px; border: 2px solid var(--border-color); cursor: pointer; opacity: 0.5; transition: 0.3s; border-radius: 2px; overflow: hidden; }
.agent-thumb.active, .agent-thumb:hover { border-color: var(--accent-red); opacity: 1; transform: translateY(-5px); }
.agent-thumb img { width: 100%; height: 100%; object-fit: cover; }

.back-btn { position: absolute; top: 130px; left: 2rem; padding: 0.625rem 1.25rem; background: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); cursor: pointer; font-family: "Share Tech Mono"; z-index: 100; border-radius: 4px; }
.back-btn:hover { border-color: var(--accent-red); color: white; background: rgba(220, 38, 38, 0.1); }
.nav-btn { position: absolute; width: 50px; height: 50px; background: rgba(15, 23, 42, 0.8); border: 1px solid var(--border-color); color: white; cursor: pointer; font-size: 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.nav-btn:hover { background: var(--accent-red); border-color: var(--accent-red); }
.nav-btn.left { left: 3rem; }
.nav-btn.right { right: 3rem; }

/* 모달 및 지도 비율 고정 */
.location-modal, .map-modal { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, 0.9); align-items: center; justify-content: center; }
.location-modal.active, .map-modal.active { display: flex; }
.location-content { text-align: center; max-width: 500px; width: 90%; background: #1e293b; padding: 2rem; border: 2px solid var(--accent-red); border-radius: 8px; }
.location-title { font-family: "Black Ops One"; font-size: 1.5rem; color: var(--accent-red); margin-bottom: 1rem; }
.location-desc { color: var(--text-primary); margin-bottom: 1rem; font-family: "Noto Sans KR"; font-weight: bold; }
.location-map { margin-bottom: 2rem; border-radius: 4px; overflow: hidden; border: 1px solid var(--accent-red); }
.location-close { padding: 0.75rem 2rem; background: var(--accent-red); border: none; color: white; font-family: "Share Tech Mono"; cursor: pointer; border-radius: 4px; transition: 0.3s; }
.location-close:hover { background: #b91c1c; }

/* 모달 컨텐츠 크기 고정 및 꽉 차게 변경 */
.map-modal-content { 
  position: relative; 
  width: 90vw; height: 90vh; 
  max-width: 1200px;
  border: 2px solid var(--accent-red); border-radius: 8px; overflow: hidden; background: #000; 
  display: flex; align-items: center; justify-content: center;
}
.map-modal-content img { max-width: 100%; max-height: 100%; object-fit: contain; } 
.map-modal-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; background: rgba(0, 0, 0, 0.8); border: 1px solid var(--accent-red); color: var(--accent-red); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; z-index: 10; }
.map-modal-close:hover { background: var(--accent-red); color: white; }

#mini-preview-modal { opacity: 0; visibility: hidden; position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity 0.25s ease-out, visibility 0.25s ease-out; }
#mini-preview-modal.active { opacity: 1; visibility: visible; }
#mini-preview-img { max-width: 90vw; max-height: 90vh; object-fit: contain; border: 2px solid var(--accent-red); box-shadow: 0 0 30px rgba(0,0,0,0.8); border-radius: 8px; transform: scale(0.95) translateY(10px); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
#mini-preview-modal.active #mini-preview-img { transform: scale(1) translateY(0); }

/* 푸터 */
.site-footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem;
  font-family: "Share Tech Mono", "Noto Sans KR", sans-serif; font-size: 0.8rem; color: var(--text-secondary);
  position: relative; z-index: 500; margin-top: auto; 
}
.site-footer.footer-padded { padding-bottom: 100px; }
.site-footer .copyright span { color: var(--text-primary); font-weight: bold; }
.site-footer .copyright small { display: block; margin-top: 0.4rem; color: var(--accent-red); opacity: 0.8; font-size: 0.7rem; }
.family-site select {
  background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-color);
  padding: 0.6rem 1rem; font-family: "Share Tech Mono", "Noto Sans KR", sans-serif; font-size: 0.8rem;
  border-radius: 4px; outline: none; cursor: pointer; transition: all 0.3s;
}
.family-site select:hover { border-color: var(--accent-red); }
.family-site select:focus { border-color: var(--accent-red); box-shadow: 0 0 10px rgba(220, 38, 38, 0.3); }

/* 사무소 전용 스타일 */
.office-blueprint { padding: 2rem 2.5rem 0 2.5rem; position: relative; z-index: 1; }
.office-blueprint img { width: 100%; border: 4px solid #111; border-radius: 4px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); filter: contrast(1.1) brightness(0.95); }
.office-content { padding: 2rem 2.5rem 3rem 2.5rem; position: relative; z-index: 1; }
.office-quote { font-family: 'Nanum Myeongjo', serif !important; font-size: 1.15rem; font-weight: 900; color: #b91c1c; text-align: center; margin-bottom: 2rem; padding: 1.5rem; border-top: 2px dashed #b91c1c; border-bottom: 2px dashed #b91c1c; background: rgba(254, 226, 226, 0.4); letter-spacing: 0.05em; }
.office-desc { font-family: 'Nanum Myeongjo', serif !important; font-size: 1.05rem; color: var(--ink-color); line-height: 1.8; margin-bottom: 3rem; font-weight: 700; text-align: justify; padding: 0 1rem; word-break: keep-all;}
.floor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
.floor-grid p { font-family: 'Nanum Myeongjo', serif !important; letter-spacing: 0.05em; }
.floor-grid h6 { font-family: "Black Ops One", 'Nanum Myeongjo', serif !important; }
.office-outro { text-align: center; font-family: 'Nanum Myeongjo', serif !important; font-weight: 900; font-size: 1.2rem; color: #111; margin-top: 2rem; padding-top: 2.5rem; border-top: 4px double #111; line-height: 1.6; letter-spacing: 0.05em; }

/* 모바일 반응형 */
@media (max-width: 768px) {
  .header-actions { flex-direction: column; gap: 4px; width: 90px; }
  .deploy-btn, .logout-btn { width: 100%; height: 26px; padding: 0; font-size: 0.7rem; }
  
  #notification-container { display: none !important; }
  
  .mobile-notif-fab { 
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 90px; right: 20px; width: 50px; height: 50px; 
    background: #1e293b; border: 2px solid var(--accent-red); border-radius: 50%;
    z-index: 9999; box-shadow: 0 5px 15px rgba(0,0,0,0.5); cursor: pointer;
  }
  .notif-badge { display: none; position: absolute; top: -2px; right: -2px; width: 14px; height: 14px; background: var(--accent-red); border-radius: 50%; border: 2px solid #1e293b; }
  .notif-badge.active { display: block; }
  
  .mobile-notif-panel {
    display: flex; flex-direction: column; position: fixed; bottom: -100%; left: 0; right: 0; 
    background: #0f172a; border-top: 2px solid var(--accent-red);
    z-index: 10000; transition: bottom 0.3s ease; max-height: 70vh;
    border-radius: 12px 12px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
  }
  .mobile-notif-panel.active { bottom: 0; }
  .panel-header { padding: 1rem; display: flex; justify-content: space-between; border-bottom: 1px solid #1e293b; font-family: "Noto Sans KR"; font-weight: bold; color: white;}
  .panel-header button { background: none; border: none; color: white; font-size: 1.5rem; }
  .panel-list { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }

  .agent-grid-section .agent-gallery { display: flex; flex-direction: column; }
  .agent-gallery-item { width: 100%; } 
  .nav-btn { display: none !important; }
  .doc-new-layout { grid-template-columns: 1fr; padding: 1.5rem; }
  .files-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; height: auto; padding: 0 1.5rem; }
  .files-container .file-stack { position: relative; transform: none !important; width: 100%; height: auto; aspect-ratio: 3/4.5; }
  .files-container .file-stack:hover { transform: scale(1.05) !important; }

  .site-footer { flex-direction: column; text-align: center; justify-content: center; }
  .site-footer.footer-padded { padding-bottom: 150px; }
}