@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-main: #0d0d0d;
  --bg-card: #141414;
  --bg-card-hover: #1c1c1c;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --text-sub: #666666;
  --accent-red: #B83A3A;
  --accent-red-hover: #9C2E2E;
  --accent-red-glow: rgba(184, 58, 58, 0.2);
  --border-color: #222222;
  --border-glow: rgba(184, 58, 58, 0.15);
  
  --font-sans: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444444;
}

/* Base layout & Hero Section */
.ag-hero-container {
  background-color: var(--bg-main); 
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: flex-start;
  padding: 0 10%; 
  position: relative;
  overflow: hidden;
}

/* Ambient glow in background */
.ag-hero-container::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(184, 58, 58, 0.08) 0%, rgba(0,0,0,0) 70%);
  z-index: 1;
  pointer-events: none;
  filter: blur(40px);
}

.ag-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.ag-identity {
  font-size: 16px;
  font-weight: 300; /* 명품 로고처럼 시크하고 얇게 */
  text-transform: uppercase;
  letter-spacing: 4px; /* 자간을 넓혀서 압도적인 공간감 연출 */
  color: #666666; /* 메인 60% 블랙 배경에 묻어나는 서브 30% 그레이 */
  margin-bottom: 32px;
  display: inline-block;
  border-left: 2px solid var(--accent-red);
  padding-left: 10px;
}

.ag-title-group {
  max-width: 800px;
  margin-bottom: 32px;
}

.ag-title-top {
  font-size: 28px;
  font-weight: 300; 
  color: #555555;
  line-height: 1.4;
  margin-bottom: 12px;
}

.ag-title-main {
  font-size: 56px;
  font-weight: 800; 
  color: var(--text-main);
  line-height: 1.3;
  letter-spacing: -1.5px;
}

.ag-sub-copy {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 650px;
  margin-bottom: 48px;
}

.ag-highlight {
  color: var(--accent-red);
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.ag-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-red);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  padding: 18px 36px;
  border-radius: 6px; 
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--accent-red-glow);
  cursor: pointer;
  border: 1px solid transparent;
}

.ag-cta-button:hover {
  background-color: var(--accent-red-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(184, 58, 58, 0.4);
}

/* Dictionary section */
.ag-section {
  padding: 100px 10%;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
}

.ag-section-header {
  margin-bottom: 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}

.ag-section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.ag-section-desc {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 8px;
}

/* Filter controls */
.ag-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.ag-filter-btn {
  background-color: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ag-filter-btn:hover, .ag-filter-btn.active {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
  border-color: var(--accent-red);
}

.ag-search-wrapper {
  position: relative;
  max-width: 400px;
  width: 100%;
}

.ag-search-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 20px;
  padding-right: 40px;
  border-radius: 8px;
  font-size: 15px;
  transition: var(--transition);
}

.ag-search-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(184, 58, 58, 0.1);
}

/* API Grid & Cards */
.ag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.ag-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.ag-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.ag-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-red-glow);
}

.ag-card:hover::before {
  transform: scaleX(1);
}

.ag-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.ag-card-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-red);
  letter-spacing: 1px;
}

.ag-card-difficulty {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: #222222;
  padding: 2px 8px;
  border-radius: 4px;
}

.ag-card-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ag-card-description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.ag-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.ag-tag {
  font-size: 12px;
  background-color: #1a1a1a;
  color: #ccc;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #282828;
}

.ag-tag.highlight {
  color: var(--accent-red);
  border-color: rgba(184, 58, 58, 0.3);
  background-color: rgba(184, 58, 58, 0.05);
}

.ag-card-actions {
  display: flex;
  gap: 12px;
}

.ag-btn-secondary {
  flex: 1;
  text-align: center;
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.ag-btn-secondary:hover {
  background-color: #222222;
  border-color: #444444;
}

/* Detail Modal */
.ag-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.ag-modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  animation: modalFadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px var(--accent-red-glow);
}

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

.ag-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.ag-modal-close:hover {
  color: var(--text-main);
}

.ag-modal-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.ag-modal-category {
  color: var(--accent-red);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.ag-modal-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Code area */
.ag-code-box {
  background-color: #080808;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.ag-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 8px;
}

.ag-code-lang {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
}

.ag-btn-copy {
  background: none;
  border: none;
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.ag-btn-copy:hover {
  color: var(--text-main);
}

.ag-code-content {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #e0e0e0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Wizard / blueprint Section */
.ag-wizard {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.ag-wizard::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(184, 58, 58, 0.03) 0%, rgba(0,0,0,0) 50%);
  pointer-events: none;
}

.ag-wizard-step {
  display: none;
}

.ag-wizard-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.ag-wizard-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 30px 0;
}

@media (max-width: 600px) {
  .ag-wizard-options {
    grid-template-columns: 1fr;
  }
}

.ag-wizard-option {
  background-color: #1a1a1a;
  border: 1px solid #282828;
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.ag-wizard-option:hover, .ag-wizard-option.selected {
  border-color: var(--accent-red);
  background-color: #221212;
}

.ag-wizard-option h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.ag-wizard-option p {
  font-size: 13px;
  color: var(--text-muted);
}

.ag-wizard-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.ag-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--accent-red);
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.ag-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Responsive elements */
@media (max-width: 768px) {
  .ag-hero-container { padding: 80px 6%; }
  .ag-title-top { font-size: 20px; }
  .ag-title-main { font-size: 36px; }
  .ag-sub-copy { font-size: 15px; margin-bottom: 36px; }
  .ag-cta-button { font-size: 16px; padding: 16px 28px; width: 100%; box-sizing: border-box; }
  .ag-section { padding: 60px 6%; }
  .ag-section-header { flex-direction: column; align-items: flex-start; }
  .ag-modal-content { padding: 24px; }
}

/* UNLABOR 실전 빌드업 CSS */
.ag-explore-section {
  background-color: #0d0d0d;
  color: #ffffff;
  padding: 120px 10%;
  box-sizing: border-box;
  min-height: 100vh;
}

.ag-explore-section .ag-section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 60px;
  letter-spacing: -1px;
}

.ag-explore-section .ag-section-title span {
  color: var(--accent-red);
}

.ag-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.ag-explore-card {
  background-color: #161616;
  border: 1px solid #262626;
  border-radius: 6px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.ag-explore-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
  box-shadow: 0 10px 30px rgba(184, 58, 58, 0.08);
}

.ag-card-num {
  font-size: 14px;
  font-weight: 300;
  color: #555555;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.ag-card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.ag-card-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 40px;
}

.ag-card-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.ag-explore-card:hover .ag-card-link {
  color: var(--accent-red);
}

@media (max-width: 1024px) {
  .ag-card-grid { grid-template-columns: 1fr; gap: 20px; }
  .ag-explore-section { padding: 80px 6%; }
}

