:root {
  --primary-color: #1a365d;
  --secondary-color: #0052cc;
  --accent-color: #ebf8ff;
  --text-color: #2d3748;
  --text-light: #718096;
  --bg-color: #f7fafc;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background-color: var(--white);
  height: 80px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.nav ul {
  display: flex;
  gap: 30px;
}

.nav a {
  font-weight: 600;
  color: var(--text-color);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a4365 100%);
  color: var(--white);
  padding: 100px 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.countdown-card {
  background-color: var(--white);
  color: var(--text-color);
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.countdown-label {
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-light);
}

.timer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.timer-item {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--text-light);
}

.timer-item span:first-child {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
}

.exam-date {
  font-weight: 600;
  color: var(--secondary-color);
}

/* Ad Container */
.ad-container {
  margin: 40px auto;
  max-width: 1100px;
  text-align: center;
  min-height: 90px;
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

/* Sections */
.section {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--accent-color);
}

.bg-dark {
  background-color: var(--primary-color);
}

.text-white {
  color: var(--white);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: var(--text-light);
  font-size: 1.1rem;
}

.bg-dark .section-description {
  color: #e2e8f0;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

.bg-dark .section-title::after {
  background-color: var(--white);
}

/* Schedule Grid */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.schedule-item {
  background-color: var(--white);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.schedule-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.badge {
  display: inline-block;
  padding: 5px 15px;
  background-color: #edf2f7;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.badge.highlight {
  background-color: var(--secondary-color);
  color: var(--white);
}

.date {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.schedule-item .details {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Exam Info Grid */
.exam-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.exam-card {
  background-color: var(--white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--secondary-color);
}

.exam-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.subject-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf2f7;
}

.exam-card ul li {
  margin-bottom: 15px;
  padding-left: 20px;
  position: relative;
}

.exam-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.passing-criteria {
  text-align: center;
  padding: 20px;
  background-color: var(--accent-color);
  border-radius: 10px;
  font-size: 1.1rem;
}

/* Trends Section */
.trends-container {
  max-width: 900px;
  margin: 0 auto;
}

.trend-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
}

.trend-header {
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.trend-year {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--secondary-color);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.trend-header h3 {
  font-size: 1.75rem;
  font-weight: 800;
}

.subject-trends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 30px 0;
}

.subject-trend-item h4 {
  color: var(--accent-color);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.subject-trend-item p {
  font-size: 0.95rem;
  opacity: 0.8;
}

.strategy-box {
  background-color: var(--white);
  color: var(--text-color);
  padding: 20px;
  border-radius: 12px;
  font-size: 1rem;
  border-left: 5px solid var(--secondary-color);
}

/* Study Guide Section */
.guide-content {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.text-content h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--accent-color);
}

.text-content h3:first-child {
  margin-top: 0;
}

.text-content p {
  margin-bottom: 15px;
  font-size: 1.05rem;
}

/* Papers Grid & Cards */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.paper-card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.paper-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.paper-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.paper-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-paper, .btn-solution {
  display: block;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}

.btn-paper {
  background-color: var(--accent-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.btn-paper:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-solution {
  background-color: #f7fafc;
  color: var(--text-color);
  border: 1px solid #e2e8f0;
}

.btn-solution:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* FAQ Container */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}

.footer-info p {
  margin-bottom: 10px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: var(--accent-color);
  text-decoration: underline;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Modal */
.modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 600px;
  width: 90%;
}

.solution-modal {
  max-width: 800px;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: var(--white);
  border-radius: 15px;
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  z-index: 10;
}

.modal h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
  padding-right: 30px;
}

.modal h3 {
  font-size: 1.1rem;
  margin: 25px 0 15px;
  color: var(--secondary-color);
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 5px;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 15px;
}

.modal-body p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

/* Answer Grid */
.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.answer-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.answer-item strong {
  color: var(--text-light);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.answer-item span {
  font-weight: 800;
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* Highlights List */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.highlight-item {
  background-color: var(--accent-color);
  padding: 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.highlight-item strong {
  color: var(--secondary-color);
  display: block;
  margin-bottom: 5px;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background-color: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.blog-card-content {
  padding: 25px;
}

.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--accent-color);
  color: var(--secondary-color);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.blog-card h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--primary-color);
}

.blog-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-modal {
  max-width: 800px;
}

.blog-modal .modal-body {
  padding: 20px 0;
}

.blog-post-header {
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.blog-post-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.blog-post-meta {
  color: var(--text-light);
  font-size: 0.9rem;
}

.blog-post-content h4 {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin: 25px 0 10px;
}

.blog-post-content p {
  margin-bottom: 15px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.difficulty-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-left: 10px;
}

.diff-high { background-color: #fff5f5; color: #c53030; }
.diff-mid { background-color: #fffaf0; color: #9c4221; }
.diff-low { background-color: #f0fff4; color: #276749; }

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .nav {
    display: none; /* In a real app, implement a hamburger menu */
  }
  
  .exam-info-grid {
    grid-template-columns: 1fr;
  }
  
  .timer-item span:first-child {
    font-size: 1.75rem;
  }
  
  .subject-trends {
    grid-template-columns: 1fr;
  }
}
