:root {
  --bg-color: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --step-done: #10b981;
}

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

body {
  font-family: 'Pretendard', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Blobs */
.background-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background-color: rgba(59, 130, 246, 0.4);
  animation-delay: 0s;
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background-color: rgba(16, 185, 129, 0.3);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 50%;
  width: 400px;
  height: 400px;
  background-color: rgba(139, 92, 246, 0.3);
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 1s ease-out;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(to right, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.law-reference {
  margin-top: 15px;
}

.law-reference a {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  transition: all 0.3s ease;
}

.law-reference a:hover {
  background: rgba(16, 185, 129, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.content-wrapper {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

/* Stepper Section */
.stepper-section {
  flex: 1;
  position: relative;
}

.stepper-container {
  display: flex;
  flex-direction: column;
  position: relative;
}

.stepper-container::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 24px;
  width: 2px;
  background: var(--glass-border);
  z-index: 1;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  padding: 15px 0;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.step-item:hover {
  opacity: 1;
  transform: translateX(10px);
}

.step-item.active {
  opacity: 1;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 2px solid var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.step-item.active .step-circle {
  border-color: var(--accent-color);
  background: var(--accent-color);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.step-content {
  padding-top: 12px;
}

.step-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

/* Details Section */
.details-section {
  flex: 1.2;
  position: sticky;
  top: 40px;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-panel.animate {
  animation: panelPop 0.5s ease forwards;
}

@keyframes panelPop {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 20px;
}

.step-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-hover);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.panel-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.detail-group {
  margin-bottom: 30px;
}

.detail-group:last-child {
  margin-bottom: 0;
}

.detail-group h3 {
  font-size: 1.1rem;
  color: var(--accent-hover);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-group p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
}

.document-list {
  list-style: none;
}

.document-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 12px 12px 35px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.document-list li:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.document-list li::after {
  content: '보기 ➔';
  font-size: 0.8rem;
  color: var(--accent-hover);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.document-list li:hover::after {
  opacity: 1;
}

.document-list li::before {
  content: '📄';
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 1.1rem;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  color: #ef4444;
}

.modal-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-hover);
}

.document-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.doc-placeholder {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.doc-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.8;
}

.doc-placeholder h4 {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: var(--text-primary);
}

.mock-document {
  background: #ffffff;
  width: 100%;
  max-width: 350px;
  height: 400px;
  margin: 0 auto 20px;
  border-radius: 4px;
  padding: 30px 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.mock-line {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  width: 100%;
}

.mock-line.title {
  height: 18px;
  background: #94a3b8;
  width: 60%;
  margin: 0 auto 20px;
}

.mock-line.short {
  width: 40%;
}

.mock-stamp {
  position: absolute;
  bottom: 40px;
  right: 30px;
  width: 50px;
  height: 50px;
  border: 3px solid #ef4444;
  border-radius: 50%;
  opacity: 0.7;
}

.doc-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.download-btn {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  width: 100%;
}

.download-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
  }
  
  .stepper-container {
    margin-bottom: 40px;
  }
  
  .details-section {
    position: static;
    width: 100%;
  }
}
