/* Components CSS - Buttons, Cards, Forms, etc. */
/* Using NFT Marketplace design system */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: oklch(from var(--primary) calc(l - 0.05) c h);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.15);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px oklch(0 0 0 / 0.1);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.1);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* Cards */
.feature-card,
.detail-card,
.presale-card,
.stats-card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.1);
  transition: all 0.3s ease;
}

.feature-card:hover,
.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px oklch(0 0 0 / 0.15);
  border-color: oklch(0.488 0.243 264.376 / 0.3);
}

.feature-card {
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3,
.detail-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.feature-card p {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Grids */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* About Section */
.about {
  background: var(--background);
}

/* Tokenomics */
.tokenomics {
  background: var(--secondary);
}

.tokenomics-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.tokenomics-chart {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-container {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--chart-1) 0deg,
    var(--chart-1) 17.14deg,
    var(--chart-2) 17.14deg,
    var(--chart-2) 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.1);
}

.chart-container::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--card);
  border-radius: 50%;
}

.chart-label {
  position: absolute;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  z-index: 10;
  color: var(--foreground);
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}

/* Presale label - 작은 세그먼트 (위쪽) */
.chart-segment.presale .chart-label {
  top: 30%;
  left: 55%;
  transform: translate(-50%, -50%);
}

/* Reserve label - 큰 세그먼트 (가운데) */
.chart-segment.reserve .chart-label {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tokenomics-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.distribution-list,
.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.distribution-item,
.metric-item,
.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.distribution-item:last-child,
.metric-item:last-child,
.stat-item:last-child {
  border-bottom: none;
}

.item-color {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  margin-right: 0.75rem;
}

.item-color.presale {
  background: var(--chart-1);
}

.item-color.reserve {
  background: var(--chart-2);
}

.item-label,
.metric-label,
.stat-label {
  font-weight: 500;
  color: var(--muted-foreground);
}

.item-value,
.metric-value,
.stat-value {
  font-weight: 600;
  color: var(--foreground);
  font-family: var(--font-mono);
}

/* Presale Section */
.presale {
  background: var(--background);
}

.presale-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.presale-card {
  background: var(--card);
  box-shadow: 0 4px 24px oklch(0 0 0 / 0.1);
  border: 1px solid var(--border);
}

.card-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.card-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.price-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.current-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
}

.price-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.refresh-price-btn {
  position: absolute;
  top: -5px;
  right: -10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.refresh-price-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.refresh-price-btn:active {
  transform: scale(0.95);
}

/* Header Title Layout */
.header-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Guide Button */
.guide-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.guide-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.guide-btn:active {
  transform: translateY(0);
}

.guide-icon {
  font-size: 1rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  max-width: 800px;
  max-height: 90vh;
  width: 90%;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.modal-header h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--muted-hover);
  color: var(--foreground);
}

.modal-content {
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.guide-steps {
  padding: 2rem;
}

.step-section {
  margin-bottom: 2rem;
}

.step-section h3 {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.step-group {
  margin-bottom: 1.5rem;
}

.step-group h4 {
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-left: 1rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: 0.75rem;
  border-left: 4px solid var(--primary);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content strong {
  display: block;
  color: var(--foreground);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content p {
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.5;
}

.success-section .step-item {
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.success-section .step-number {
  background: #22c55e;
}

.tips-section {
  background: var(--accent);
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-top: 2rem;
}

.tips-section h3 {
  border-bottom-color: var(--accent-foreground);
  color: var(--accent-foreground);
}

.tip-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tip-list li {
  padding: 0.5rem 0;
  color: var(--accent-foreground);
  position: relative;
  padding-left: 1.5rem;
}

.tip-list li::before {
  content: "💡";
  position: absolute;
  left: 0;
  top: 0.5rem;
}

.tip-list strong {
  color: var(--accent-foreground);
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

.modal-btn-primary, .modal-btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.modal-btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.modal-btn-primary:hover {
  background: #2563eb;
  color: white;
}

.modal-btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.modal-btn-secondary:hover {
  background: var(--secondary-hover);
}

/* Old announcement banner styles removed - replaced with new card design */

.card-body {
  padding: 2rem;
}

/* Forms */
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px oklch(from var(--primary) l c h / 0.2);
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  pointer-events: none;
}

/* Payment Method Tabs */
.payment-method {
  margin-bottom: 1.5rem;
}

.method-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--secondary);
  padding: 0.25rem;
  border-radius: var(--radius);
}

.method-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.method-tab.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.1);
}

.method-tab:hover:not(.active) {
  color: var(--foreground);
}

.tab-icon {
  font-size: 1rem;
}

/* Amount Input */
.amount-input {
  margin-bottom: 1.5rem;
}

.input-group .form-input {
  padding-right: 4rem;
}

/* Tokens Receive */
.tokens-receive {
  margin-bottom: 2rem;
}

.receive-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--secondary);
  border-radius: var(--radius);
  text-align: center;
}

.receive-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
}

.receive-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

/* Transaction Status */
.transaction-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.transaction-status.success {
  background: oklch(0.95 0.05 142);
  border-color: oklch(0.7 0.15 142);
  color: oklch(0.3 0.2 142);
}

.transaction-status.error {
  background: oklch(0.95 0.05 25);
  border-color: oklch(0.7 0.15 25);
  color: oklch(0.4 0.2 25);
}

.transaction-status.loading {
  background: oklch(0.95 0.05 220);
  border-color: oklch(0.7 0.15 220);
  color: oklch(0.4 0.2 220);
}

.status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-icon {
  font-size: 1.25rem;
}

.status-text {
  font-weight: 500;
}

/* Stats Card */
.stats-card {
  background: var(--card);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.05);
}

.stats-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--foreground);
  text-align: center;
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section p {
  color: oklch(from var(--primary-foreground) calc(l - 0.2) c h);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: oklch(from var(--primary-foreground) calc(l - 0.2) c h);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary-foreground);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: oklch(from var(--primary-foreground) calc(l - 0.2) c h);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--primary-foreground);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid oklch(from var(--primary-foreground) calc(l - 0.8) c h);
  text-align: center;
  color: oklch(from var(--primary-foreground) calc(l - 0.3) c h);
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

.disclaimer {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tokenomics-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .chart-container {
    width: 250px;
    height: 250px;
  }
  
  .chart-container::after {
    width: 120px;
    height: 120px;
  }
  
  /* 모바일에서 라벨 크기 조정 */
  .chart-label {
    font-size: 0.75rem;
  }
  
  /* 모바일에서 라벨 위치 미세 조정 */
  .chart-segment.presale .chart-label {
    top: 25%;
    left: 60%;
  }
  
  /* 모바일에서 가이드 버튼 조정 */
  .header-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .guide-btn {
    align-self: flex-end;
    padding: 0.5rem 0.75rem;
    min-width: auto;
    height: auto;
    border-radius: 0.5rem;
    font-size: 0.75rem;
  }
  
  /* 모바일 모달 조정 */
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .guide-steps {
    padding: 1.5rem;
  }
  
  .step-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .step-number {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
  
  .modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .modal-btn-primary, .modal-btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  .presale-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .stat-card {
    width: 100%;
    max-width: 200px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav {
    display: none;
  }
  
  .header-content {
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* New Announcement Section - Clean Card Design */
.announcement-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, 
    oklch(0.98 0.02 240) 0%, 
    oklch(0.99 0.01 180) 100%);
}

.announcement-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px oklch(0 0 0 / 0.08);
  border: 1px solid oklch(0.92 0 0);
  overflow: hidden;
  transition: all 0.3s ease;
  max-width: 600px;
  margin: 0 auto;
}

.announcement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px oklch(0 0 0 / 0.12);
}

.announcement-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(90deg, 
    oklch(0.96 0.02 240), 
    oklch(0.97 0.01 200));
  border-bottom: 1px solid oklch(0.94 0 0);
}

.announcement-icon {
  font-size: 1.25rem;
  animation: pulse 2s infinite;
  color: oklch(0.55 0.15 250);
}

.announcement-title {
  font-size: 1rem;
  font-weight: 600;
  color: oklch(0.25 0 0);
  margin: 0;
  flex: 1;
}

.announcement-close {
  background: transparent;
  border: none;
  color: oklch(0.6 0 0);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.announcement-close:hover {
  background: oklch(0 0 0 / 0.1);
  color: oklch(0.35 0 0);
}

.announcement-content {
  padding: 1rem 1.5rem 1.25rem;
}

.announcement-text {
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  color: oklch(0.4 0 0) !important;
  margin: 0 !important;
  text-align: left !important;
  white-space: pre-line !important;
}

/* Blink effect for special announcements */
.announcement-text.blink {
  animation: announceBlinkText 2s ease-in-out infinite;
}

@keyframes announceBlinkText {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.6; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.announcement-section.hidden {
  display: none;
}

/* Mobile responsive design */
@media (max-width: 768px) {
  .announcement-section {
    padding: 1.5rem 0;
  }
  
  .announcement-header {
    padding: 0.875rem 1rem;
    gap: 0.5rem;
  }
  
  .announcement-icon {
    font-size: 1.125rem;
  }
  
  .announcement-title {
    font-size: 0.9rem;
  }
  
  .announcement-close {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1rem;
  }
  
  .announcement-content {
    padding: 0.875rem 1rem 1rem;
  }
  
  .announcement-text {
    font-size: 0.875rem;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .announcement-header {
    padding: 0.75rem 0.875rem;
  }
  
  .announcement-content {
    padding: 0.75rem 0.875rem 0.875rem;
  }
  
  .announcement-text {
    font-size: 0.8125rem;
  }
}

/* 공지사항 히스토리 기능 스타일 */
.announcement-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.announcement-history-btn {
  background: linear-gradient(135deg,
    oklch(0.55 0.15 250),
    oklch(0.6 0.12 260));
  border: none;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.announcement-history-btn:hover {
  background: linear-gradient(135deg,
    oklch(0.5 0.18 250),
    oklch(0.55 0.15 260));
  transform: translateY(-1px);
  box-shadow: 0 2px 8px oklch(0.55 0.15 250 / 0.3);
}

.announcement-history-btn:active {
  transform: translateY(0);
}

/* 히스토리 모달창 스타일 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: oklch(0 0 0 / 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: all 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px oklch(0 0 0 / 0.15);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(1);
  transition: all 0.3s ease;
}

.modal-overlay.hidden .modal-content {
  transform: scale(0.95);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: linear-gradient(90deg,
    oklch(0.96 0.02 240),
    oklch(0.97 0.01 200));
  border-bottom: 1px solid oklch(0.94 0 0);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: oklch(0.25 0 0);
}

.modal-close {
  background: transparent;
  border: none;
  color: oklch(0.6 0 0);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: oklch(0.9 0 0);
  color: oklch(0.4 0 0);
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(80vh - 100px);
  overflow-y: auto;
}

/* 히스토리 로딩 상태 */
.history-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid oklch(0.9 0 0);
  border-top: 3px solid oklch(0.55 0.15 250);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 히스토리 리스트 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  background: oklch(0.98 0 0);
  border: 1px solid oklch(0.94 0 0);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.history-item:hover {
  background: oklch(0.96 0.01 240);
  border-color: oklch(0.9 0.02 240);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.08);
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.history-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: oklch(0.55 0.15 250);
}

.history-time {
  font-size: 0.75rem;
  color: oklch(0.6 0 0);
  padding: 0.125rem 0.5rem;
  background: oklch(0.94 0 0);
  border-radius: 6px;
}

.history-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: oklch(0.3 0 0);
  margin-bottom: 0.5rem;
  white-space: pre-line;
}

.history-effect {
  font-size: 0.75rem;
  color: oklch(0.6 0.12 45);
  background: oklch(0.95 0.03 45);
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
}

/* 히스토리 빈 상태 */
.history-empty {
  text-align: center;
  padding: 2rem;
  color: oklch(0.6 0 0);
}

.history-empty p:first-child {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.history-empty p:last-child {
  font-size: 0.875rem;
  color: oklch(0.7 0 0);
}

/* 히스토리 에러 상태 */
.history-error {
  text-align: center;
  padding: 2rem;
  color: oklch(0.6 0 0);
}

.history-error p {
  margin-bottom: 0.5rem;
}

.retry-btn {
  background: linear-gradient(135deg,
    oklch(0.55 0.15 250),
    oklch(0.6 0.12 260));
  border: none;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.retry-btn:hover {
  background: linear-gradient(135deg,
    oklch(0.5 0.18 250),
    oklch(0.55 0.15 260));
  transform: translateY(-1px);
}

/* 반응형 디자인 */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header,
  .modal-body {
    padding: 1rem;
  }

  .history-item {
    padding: 0.75rem;
  }

  .announcement-controls {
    gap: 0.25rem;
  }

  .announcement-history-btn {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }

  .history-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* 페이지네이션 스타일 - 항상 가로 배치 */
.modal-body .pagination-container {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-top: 1.5rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid oklch(0.94 0 0) !important;
}

.modal-body .pagination-btn {
  background: oklch(0.98 0 0) !important;
  border: 1px solid oklch(0.9 0 0) !important;
  color: oklch(0.4 0 0) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  min-width: 80px !important;
  justify-content: center !important;
}

.modal-body .pagination-btn:hover:not(:disabled) {
  background: oklch(0.95 0.01 240) !important;
  border-color: oklch(0.85 0.02 240) !important;
  color: oklch(0.3 0 0) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px oklch(0 0 0 / 0.1) !important;
}

.modal-body .pagination-btn:disabled {
  background: oklch(0.96 0 0) !important;
  border-color: oklch(0.94 0 0) !important;
  color: oklch(0.7 0 0) !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.modal-body .pagination-info {
  font-size: 0.75rem !important;
  color: oklch(0.6 0 0) !important;
  padding: 0.25rem 0.75rem !important;
  background: oklch(0.96 0 0) !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

/* 모바일에서도 가로 배치 강제 유지 */
@media (max-width: 768px) {
  .modal-body .pagination-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.375rem !important;
  }

  .modal-body .pagination-btn {
    min-width: 70px !important;
    padding: 0.5rem 0.625rem !important;
    font-size: 0.8125rem !important;
  }

  .modal-body .pagination-info {
    font-size: 0.6875rem !important;
    padding: 0.25rem 0.5rem !important;
  }
}

@media (max-width: 480px) {
  .modal-body .pagination-container {
    gap: 0.25rem !important;
  }

  .modal-body .pagination-btn {
    min-width: 60px !important;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .modal-body .pagination-info {
    font-size: 0.625rem !important;
    padding: 0.25rem 0.375rem !important;
  }
}