:root{
  /* Premium Black & White with Blue Accent - 100억짜리 디자인 */
  --bg: #fafafa;
  --bg-pure: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #525252;
  --text-muted: #737373;
  --text-subtle: #a3a3a3;
  
  /* Blue Accent */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-bg: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.2);

  --border: rgba(0,0,0,.08);
  --border-hover: rgba(0,0,0,.15);
  --border-focus: rgba(0,0,0,.25);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.1), 0 8px 16px rgba(0,0,0,.06);
  
  --glass: rgba(255,255,255,.7);
  --glass-border: rgba(255,255,255,.5);
}

*{box-sizing:border-box;margin:0;padding:0}
html{height:100%;scroll-behavior:smooth}
body{
  min-height:100%;
  font-family: 'Pretendard', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on, 'cv01' on;
}

/* Premium Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Pretendard', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

/* Numbers - Tabular for alignment */
.stat__value,
.fileinfo__value,
.progressText,
input[type="number"] {
  font-family: 'Inter', 'Pretendard', sans-serif;
  font-feature-settings: 'tnum' on, 'lnum' on;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.skip{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus{
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 9999;
  background: var(--text);
  color: var(--bg-pure);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
}

/* Container */
.container{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px){
  .container{ padding: 0 40px; }
}

/* Premium Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0; 
    transform: scale(0.96); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

/* ===== HEADER ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.topbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__mark{
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: var(--shadow-md), 0 4px 12px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}

.brand__mark::before{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: var(--bg-pure);
  border-radius: 4px;
  opacity: 0.9;
}

.brand__text{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__title{
  font-family: 'Plus Jakarta Sans', 'Pretendard', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand__subtitle{
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topbar__meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill{
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--bg-pure);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease);
}

.pill:hover{
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

/* ===== HERO ===== */
.hero{
  padding: 64px 0 40px;
  text-align: center;
  animation: slideUp 0.6s var(--ease) both;
}

.hero__content{
  max-width: 680px;
  margin: 0 auto;
}

.hero h1{
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero__desc{
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.hero__desc strong{
  color: var(--accent);
  font-weight: 600;
}

.hero__stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
  margin: 32px auto 0;
}

.stat{
  background: var(--bg-pure);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease);
}

.stat:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.stat__label{
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat__value{
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* ===== MAIN CARD ===== */
.card{
  background: var(--bg-pure);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 32px;
  margin: 0 auto 40px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.5s var(--ease) 0.1s both;
  position: relative;
  overflow: hidden;
}

.card::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
  opacity: 0.5;
}

.card__header{
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.card__header h2{
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.muted{
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ===== DROPZONE ===== */
.dropzone{
  position: relative;
  border: 2px dashed var(--border);
  background: linear-gradient(180deg, rgba(250,250,250,.5) 0%, rgba(245,245,245,.5) 100%);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  outline: none;
}

.dropzone:hover{
  border-color: var(--border-hover);
  background: linear-gradient(180deg, rgba(250,250,250,.8) 0%, rgba(245,245,245,.8) 100%);
  transform: translateY(-1px);
}

.dropzone:focus{
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(0,0,0,.05);
}

.dropzone.dragover{
  border-color: var(--text);
  background: rgba(0,0,0,.02);
  transform: scale(1.01);
}

.dropzone input[type=file]{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.dropzone__icon{
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--bg-pure);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.dropzone__icon svg{
  width: 24px;
  height: 24px;
}

.dropzone__title{
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dropzone__hint{
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== FILE INFO ===== */
.fileinfo{
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.fileinfo__row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
}

.fileinfo__row:hover{
  border-color: var(--border-hover);
  background: var(--bg-pure);
}

.fileinfo__label{
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.fileinfo__value{
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== DIVIDER ===== */
.divider{
  height: 1px;
  background: var(--border);
  margin: 28px 0;
  position: relative;
}

/* ===== MODE TOGGLE ===== */
.mode{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.radio:hover{
  border-color: var(--border-hover);
  background: var(--bg-pure);
}

.radio:has(input:checked){
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-pure);
  box-shadow: var(--shadow-md), 0 4px 12px rgba(37, 99, 235, 0.2);
}

.radio input{
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  opacity: 0.6;
}

.radio:has(input:checked) input{
  opacity: 1;
  border-color: var(--bg-pure);
}

.radio input:checked::after{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}

/* ===== PANELS ===== */
.panel{
  margin-top: 24px;
  animation: fadeIn 0.3s var(--ease);
}

.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label{
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input{
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', 'Pretendard', sans-serif;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: all 0.2s var(--ease);
}

.field input::placeholder{
  color: var(--text-subtle);
}

.field input:hover{
  border-color: var(--border-hover);
}

.field input:focus{
  border-color: var(--text);
  background: var(--bg-pure);
  box-shadow: 0 0 0 4px rgba(0,0,0,.05);
}

/* ===== ACTIONS ===== */
.actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  gap: 12px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Pretendard', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  border: 1px solid var(--border);
  background: var(--bg-pure);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.btn:hover{
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn:active{
  transform: translateY(0) scale(0.98);
}

.btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,0,0,.08);
}

.btn--primary{
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  border: 1px solid var(--accent-hover);
  color: var(--bg-pure);
  box-shadow: var(--shadow-md), 0 4px 14px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255,255,255,.15);
}

.btn--primary:hover{
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
  box-shadow: var(--shadow-lg), 0 6px 20px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255,255,255,.15);
  transform: translateY(-2px);
}

/* ===== MULTI PANEL ===== */
.multiHeader{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.multiHeader .muted{
  flex: 1;
  min-width: 200px;
}

.ranges{
  display: grid;
  gap: 12px;
}

.rangeRow{
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s var(--ease);
}

.rangeRow:hover{
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.rangeRow .btn{
  padding: 14px 18px;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.rangeRow .btn:hover{
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239,68,68,.05);
}

/* ===== PROGRESS ===== */
.progressRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progressLabel{
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progressText{
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.progress{
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress__bar{
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s var(--ease);
  position: relative;
}

.progress__bar::after{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer{
  0%{ transform: translateX(-100%); }
  100%{ transform: translateX(100%); }
}

/* ===== RESULT ===== */
.result{
  margin-top: 20px;
}

.notice{
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text-secondary);
  animation: slideUp 0.3s var(--ease);
}

.notice strong{
  color: var(--accent);
  font-weight: 600;
}

.notice--error{
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.notice--error strong{
  color: #7f1d1d;
}

.notice a{
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s var(--ease);
}

.notice a:hover{
  border-color: var(--text);
}

.links{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.links a{
  padding: 10px 16px;
  background: var(--bg-pure);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  transition: all 0.2s var(--ease);
}

.links a:hover{
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-pure);
}

/* ===== FOOTER ===== */
.footer{
  margin-top: 20px;
  padding-bottom: 40px;
}

.footer__inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== CODE ===== */
code{
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px){
  .hero{
    padding: 48px 0 32px;
  }
  
  .hero h1{
    font-size: 28px;
  }
  
  .hero__desc{
    font-size: 15px;
  }
  
  .hero__stats{
    grid-template-columns: 1fr;
    max-width: 280px;
  }
  
  .card{
    padding: 24px;
    border-radius: var(--radius-xl);
  }
  
  .grid{
    grid-template-columns: 1fr;
  }
  
  .rangeRow{
    grid-template-columns: 1fr;
  }
  
  .actions{
    flex-direction: column;
  }
  
  .actions .btn{
    width: 100%;
  }
  
  .topbar__meta{
    display: none;
  }
  
  .footer__inner{
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px){
  .container{
    padding: 0 16px;
  }
  
  .card{
    padding: 20px;
  }
  
  .dropzone{
    padding: 32px 16px;
  }
}
