@charset "UTF-8";

/* Import component styles */
@import url('./components/header.css');
@import url('./components/nav.css');
@import url('./components/card.css');
@import url('./components/scroll-card.css');
@import url('./components/parchment.css');
@import url('./components/button.css');
@import url('./components/table.css');
@import url('./components/footer.css');
@import url('./components/dictionary.css');
@import url('./components/board-detail.css');
@import url('./components/board-write.css');
@import url('./components/pagination.css');
@import url('./components/autocomplete.css');
@import url('./components/notification.css');
@import url('./components/message-modal.css');
@import url('./components/alert-modal.css');
@import url('./components/policy-modal.css');

/* Reset & Basic Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Screen Guide Color: #251d17 */
  background-color: #251d17;
  color: #cccccc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

a {
  text-decoration: none;
  color: #cccccc;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #382B22;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Main Content */
main {
  padding: 30px 40px;
  background-color: #382B22;
  position: relative;
}

/* 양쪽 금색 다크 판타지 띠 */
main::before,
main::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background:
    /* 각인 패턴 */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='40' viewBox='0 0 12 40'%3E%3Cg fill='none' stroke='%23d4a84b' stroke-width='0.5' opacity='0.4'%3E%3Cpath d='M6,0 L6,40'/%3E%3Ccircle cx='6' cy='10' r='3'/%3E%3Ccircle cx='6' cy='30' r='3'/%3E%3Cpath d='M2,20 L10,20'/%3E%3C/g%3E%3C/svg%3E"),
    /* 금속 그라데이션 */
    linear-gradient(90deg,
      #2a1f15 0%,
      #4a3520 15%,
      #8b6914 30%,
      #d4a84b 50%,
      #8b6914 70%,
      #4a3520 85%,
      #2a1f15 100%);
  background-size: 12px 40px, 100% 100%;
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(212, 168, 75, 0.3),
    0 0 12px rgba(0, 0, 0, 0.8);
  z-index: 10;
}

main::before {
  left: 0;
  border-right: 1px solid #1a1208;
}

main::after {
  right: 0;
  border-left: 1px solid #1a1208;
}

/* 모바일 main 반응형 */
@media (max-width: 768px) {
  main {
    padding: 20px 15px;
  }

  main::before,
  main::after {
    display: none;
  }
}

/* Top 버튼 */
.top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 0;
}

.top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.top-btn-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: all 0.2s ease;
}

.top-btn:hover .top-btn-img {
  transform: scale(1.1);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 15px rgba(191, 160, 95, 0.4));
}

.top-btn:active .top-btn-img {
  transform: scale(0.95);
}

/* 모바일 Top 버튼 */
@media (max-width: 768px) {
  .top-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.flex {
  display: flex;
}

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

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

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.gap-3 {
  gap: 24px;
}

/* Color utilities */
.text-primary {
  color: #bfa05f;
}

.text-warning {
  color: #ffcc00;
}

.text-muted {
  color: #888;
}

.text-success {
  color: #2ecc71;
}

.text-danger {
  color: #d0021b;
}

.text-info {
  color: #4a90e2;
}

/* Legacy class support for backwards compatibility */
.board-table {
  /* Use .table instead, but keep for compatibility */
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 12px;
}

/* Global Image Preview Tooltip */
.image-preview {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  background: rgba(40, 30, 20, 0.95);
  padding: 6px;
  border: 2px solid #bfa05f;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 320px;
  transition: opacity 0.2s ease;
  display: none;
}

.image-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

body.is-modal-open {
  overflow: hidden;
  touch-action: none;
}
