/* --- Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height: 100%; }
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #000; color: #fff; -webkit-font-smoothing:antialiased; overflow: hidden; 
}

/* --- Hero & Background Video Settings --- */
.hero {
  position: relative; height: 100%; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  /* 상위 폴더의 wall.jpg를 참조 */
  background: url("../wall.jpg") no-repeat center center;
  background-size: cover; 
  background-color: #111;
  overflow: hidden;
}

.video-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  opacity: 0; 
  transition: opacity 1.5s ease-in-out;
}
.video-bg.loaded { opacity: 1; }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.0) 60%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.hero::after { 
  content: ""; position: absolute; inset: 0; 
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(0,0,0,0.2) 95%); 
  pointer-events: none; z-index: 2; 
}

/* --- Topbar --- */
.topbar{
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; z-index: 30;
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.0));
  backdrop-filter: blur(2px); border-bottom: 1px solid rgba(255,255,255,0.05);
}
.top-left { display: flex; align-items: center; gap: 15px; }
.hamburger { cursor: pointer; opacity: 0.8; display: flex; align-items: center; }
.hamburger:hover { opacity: 1; }

.site-title{
  font-weight:700; font-size:16px; letter-spacing:0.5px;
  background: linear-gradient(180deg, #e8e4e0 0%, #c8c4bc 50%, #a8a49c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.login-pill{
  background: linear-gradient(180deg,#3ff0e6,#09c6ff); color:#001318; padding:8px 14px; 
  border-radius:22px; font-weight:700; box-shadow:0 6px 18px rgba(9,198,255,0.18);
  cursor: pointer; font-size: 14px; transition: transform 0.2s;
}
.login-pill:active { transform: scale(0.95); }

/* --- Sidebar --- */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.3s; backdrop-filter: blur(2px); }
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; background: #121212;
  z-index: 50; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-right: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; padding: 20px;
  box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}
.sidebar.active { transform: translateX(0); }
.menu-item { padding: 14px 10px; color: #ccc; border-radius: 8px; cursor: pointer; text-decoration: none; display: block; transition: 0.2s; font-weight: 500; }
.menu-item:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* --- Content --- */
.intro-layout { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }

.logo {
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 900; letter-spacing: 4px; text-transform: uppercase;
  background: linear-gradient(180deg,
      rgba(212, 205, 189, 0.78) 0%,
      rgba(140, 123, 96, 0.65) 28%,
      rgba(120, 70, 60, 0.52) 48%,
      rgba(94, 11, 11, 0.38) 68%,
      rgba(70, 8, 8, 0.25) 85%,
      rgba(40, 0, 0, 0.10) 100%
  );
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6), 0 0 18px rgba(130, 20, 20, 0.22);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.subtitle {
   font-size: clamp(14px, 2.5vw, 18px); color: rgba(255,255,255,0.9);
   text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.btn-start{
  margin-top: 20px; display:inline-block; padding: 16px 48px;
  border-radius: 50px; font-weight:800; font-size:18px; text-decoration:none; color:#fff; cursor: pointer;
  background: linear-gradient(180deg, #ae7cff, #8f56ff); box-shadow: 0 0 20px rgba(143,86,255,0.4);
  border: 1px solid rgba(255,255,255,0.1); transition: transform .1s;
}

.log-container { 
  width: 100%; max-width: 800px; height: min(500px, 60vh); 
  background: rgba(0, 10, 16, 0.65); border: 1px solid rgba(255,255,255,0.1); 
  border-radius: 12px; backdrop-filter: blur(12px); padding: 20px; 
  overflow-y: auto; text-align: left; font-family: monospace; font-size: 14px; 
}
.log-entry { margin-bottom: 10px; display: flex; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.03); padding-bottom: 6px; }
.log-time { color: #888; flex-shrink: 0; font-size: 12px; width: 80px; }
.log-msg { color: #ddd; word-break: break-all; }

.tabs-wrap{ position: relative; z-index: 20; margin-top: 80px; width: min(600px, 92%); display:flex; justify-content:center; padding:8px; }
.tabs{ display:flex; gap:8px; width:100%; background: rgba(255,255,255,0.1); border-radius:40px; padding:6px; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); }
.tab{ flex:1; text-align:center; padding:10px 0; border-radius:30px; color: rgba(255,255,255,0.7); font-weight:600; font-size: 15px; cursor:pointer; transition: all .2s ease; }
.tab.active{ background: rgba(255,255,255,0.2); color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.content-area { position: relative; z-index: 10; width: min(920px, 94%); flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 60px; }

/* --- Animations --- */
.anim-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.anim-slide-up { animation: slideUp 0.6s ease-out forwards; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Modals & Forms --- */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(6px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.open { display: flex; opacity: 1; }
.modal-window {
  position: relative; width: min(400px, 90%);
  background: rgba(20, 24, 30, 0.95); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 30px 24px; box-shadow: 0 25px 50px rgba(0,0,0,0.7);
  display: flex; flex-direction: column; gap: 16px;
}
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: #666; font-size: 24px; cursor: pointer; }
.modal-title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 10px; color: #fff; }

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 11px; color: #888; margin-left: 4px; font-weight: 600; letter-spacing: 0.5px; }
.custom-input, .custom-select { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 12px 16px; color: #fff; font-size: 16px; width: 100%; outline: none; }
.custom-select option { background-color: #1c140a; color: #f5e6c5; }
.submit-btn { margin-top: 10px; background: linear-gradient(90deg, #3ff0e6, #09c6ff); border: none; padding: 14px; border-radius: 8px; color: #001318; font-weight: 800; font-size: 16px; cursor: pointer; width: 100%; }
.submit-btn.start-action { background: linear-gradient(90deg, #ae7cff, #8f56ff); color: #fff; }

.save-check-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #ccc; cursor: pointer; margin-top: 5px; }
.save-check-wrap input { cursor: pointer; width: 16px; height: 16px; accent-color: #09c6ff; }

.success-card { text-align: center; animation: popIn 0.5s ease-out; }
.char-img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid #ae7cff; object-fit: cover; margin-bottom: 15px; }

.avatar-section { display: flex; align-items: center; gap: 15px; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); object-fit: cover; background: #000; }
.radio-group { display: flex; gap: 20px; padding: 5px 0; }