/* Swiper */
site-swiper {
  display: block;
  margin: 2rem auto;
  width: 100%;
  overflow: hidden;
  position: relative;
}
site-swiper .swiper {
  width: 100%;
  height: 100%;
  position: relative;
}
site-swiper .swiper-wrapper {
  display: flex;
}
site-swiper .swiper-slide {
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
}
site-swiper .swiper-button-next:after, 
site-swiper .swiper-button-prev:after {
  font-size: 14px !important;
}
site-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
site-swiper .swiper-button-next,
site-swiper .swiper-button-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: none;
  cursor: pointer;
  opacity: 0.8;
}
site-swiper .swiper-button-next { 
  margin-top: 0;
  right: 8px; 
}
site-swiper .swiper-button-prev { 
  margin-top: 0;
  left: 8px; 
}
site-swiper .swiper-pagination {
  z-index: 2;
}
site-swiper .swiper-slide img {
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,123,255,0.08);
}

/* Modal */
.site-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45) !important;
  display: none;
  z-index: 9998;
}
.site-modal-content {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 2rem 1.5rem;
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: none;
  z-index: 9999;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  min-width: 500px;
}
.site-modal-content.small {
  min-width: 300px;
}
.site-modal-content .modal-body {
  margin-top: 40px;
}

/* Tabs */
site-tabs .tab-names {
  display: flex;
  border-bottom: 1.5px solid #e3f0ff;
  margin-bottom: 0;
  gap: 0.5rem;
}
site-tabs .tab-name {
  min-width: 80px;
  text-align: center;
  padding: 0.5em 1.2em;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2.5px solid transparent;
  transition: all 0.3s ease;
}
site-tabs .tab-name:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}
site-tabs .tab-name.active {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2.5px solid rgba(255, 255, 255, 0.8);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
site-tabs .tab-contents {
  min-height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 1.2rem 1rem;
  color: rgba(255, 255, 255, 0.9);
}
site-tabs .tab-content {
  display: none;
}
site-tabs .tab-content.active {
  display: block;
}

/* Toast */
site-toast {
  position: fixed;
  bottom: 32px;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
site-toast .site-toast-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
site-toast .site-toast {
  background: #222;
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 1em;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  pointer-events: auto;
}
site-toast .site-toast.show {
  opacity: 1;
  transform: translateY(0);
}
site-toast .site-toast-success { 
  background: rgba(28, 210, 25, 0.3); 
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
site-toast .site-toast-error { 
  background: rgba(211, 47, 47, 0.3); 
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
site-toast .site-toast-warning { 
  background: rgba(251, 192, 45, 0.3); 
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #222; 
}
site-toast .site-toast-info { 
  background: rgba(2, 136, 209, 0.3); 
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Accordion */
site-accordion {
  display: block;
  margin: 1.5em 0;
}
site-accordion .accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
site-accordion .accordion-title {
  padding: 1em;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.3s ease;
}
site-accordion .accordion-title:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
site-accordion .accordion-content.collapse:not(.show) {
  display: none;
}
site-accordion .accordion-content.collapsing {
  height: 0;
  overflow: hidden;
  transition: height .35s ease;
}
site-accordion .accordion-body {
  padding: 1em;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

/* Guide Section */
.guide-section:last-child {
  border-bottom: none;
}

.guide-section h3 {
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.guide-section h4 {
  margin: 1.5rem 0 0.8rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Countdown */
site-countdown {
  display: block;
  margin: 2rem auto;
  text-align: center;
}
site-countdown .countdown-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
site-countdown .countdown-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  min-width: 80px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
site-countdown .countdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 16px;
  pointer-events: none;
  animation: shimmer 2s linear infinite;
}
site-countdown .countdown-item.updated {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}
site-countdown .countdown-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: 'Monaco', 'Menlo', monospace;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
site-countdown .countdown-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
site-countdown .countdown-message {
  font-size: 1.5rem;
  font-weight: 600;
  color: #764ba2;
  padding: 2rem;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 1.5s ease-in-out infinite alternate;
}
@keyframes pulse {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  site-countdown .countdown-container {
    gap: 1rem;
  }
  site-countdown .countdown-item {
    min-width: 70px;
    padding: 1rem 0.8rem;
  }
  site-countdown .countdown-value {
    font-size: 2rem;
  }
  site-countdown .countdown-label {
    font-size: 0.8rem;
  }
  site-countdown .countdown-message {
    font-size: 1.2rem;
    padding: 1.5rem;
  }
  
  site-tabs .tab-name {
    min-width: 60px;
    padding: 0.6em 0.8em;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .site-modal-content {
    max-width: 95vw;
    max-height: 85vh;
    padding: 1.5rem 1rem;
    margin: 10px;
  }
  
  site-toast {
    bottom: 20px;
    left: 10px;
    right: 10px;
  }
  
  site-toast .site-toast {
    font-size: 0.9rem;
    padding: 10px 20px;
    max-width: calc(100vw - 20px);
  }
  
  site-accordion .accordion-title {
    padding: 1.2em 1em;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  site-swiper .swiper-button-next,
  site-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
  }
  
  site-swiper .swiper-button-next:after, 
  site-swiper .swiper-button-prev:after {
    font-size: 16px !important;
  }
}

/* 포커스 시 애니메이션 비활성화 (접근성) */
@media (prefers-reduced-motion: reduce) {
  site-scroll-reveal,
  site-parallax,
  site-scroll-typewriter,
  .scroll-indicator-container,
  .typewriter-cursor {
    animation: none !important;
    transition: none !important;
  }
  
  site-parallax {
    transform: none !important;
  }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
  site-tabs .tab-name {
    border: 2px solid;
  }
  
  site-accordion .accordion-title {
    border: 1px solid;
  }
  
  .site-modal-backdrop {
    background: rgba(0,0,0,0.8) !important;
  }
}

/* 터치 디바이스를 위한 호버 효과 제거 */
@media (hover: none) {
  site-tabs .tab-name:hover,
  site-accordion .accordion-title:hover,
  .example-card:hover {
    background: inherit;
    transform: none;
  }
}

/* 활성 상태 개선 */
site-tabs .tab-name:active {
  transform: translateY(1px);
  background: rgba(255, 255, 255, 0.15);
}

site-accordion .accordion-title:active {
  background: rgba(255, 255, 255, 0.2);
}

/* 로딩 상태 스타일 */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 사용법 가이드 스타일 */
.usage-guide {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    border-left: 4px solid rgba(76, 175, 80, 0.8);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.step-number {
    background: #4CAF50;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content h4 {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    font-size: 18px;
}

.step-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

/* 기능 카드 그리드 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(76, 175, 80, 0.8);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h4 {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 18px;
    margin-bottom: 12px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .usage-guide {
        gap: 15px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
}

/* 프리모드 스와이퍼 애니메이션 */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes pulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.6;
  }
}

/* 패럴럭스 모드 네온 펄스 애니메이션 */
@keyframes neonPulse {
  0%, 100% { 
    box-shadow: 0 0 5px rgba(255, 0, 110, 0.4), 0 0 10px rgba(255, 0, 110, 0.3), 0 0 15px rgba(255, 0, 110, 0.2);
  }
  50% { 
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.6), 0 0 20px rgba(255, 0, 110, 0.5), 0 0 30px rgba(255, 0, 110, 0.4);
  }
}

/* scroll-interactions.html 페이지 전용 스타일 */
.scroll-interactions-page {
  background: #f8f9fa !important;
}

.scroll-interactions-page::before,
.scroll-interactions-page::after {
  display: none !important;
}

/* 텍스트 색상 예외처리 */
.scroll-interactions-page .scroll-demo-section h1:not([style*="color"]),
.scroll-interactions-page .scroll-demo-section h2:not([style*="color"]),
.scroll-interactions-page .scroll-demo-section h3:not([style*="color"]),
.scroll-interactions-page .scroll-demo-section li:not([style*="color"]),
.scroll-interactions-page .scroll-demo-section span:not([style*="color"]):not(.token):not([class*="token"]),
.scroll-interactions-page .scroll-demo-section strong:not([style*="color"]),
.scroll-interactions-page .scroll-demo-section small:not([style*="color"]),
.scroll-interactions-page .demo-spacer p:not([style*="color"]) {
  color: #333 !important;
  text-shadow: none !important;
}
.scroll-interactions-page .scroll-demo-section p,
.scroll-interactions-page .scroll-demo-section h4 {
  text-shadow: none !important;
}

/* floating-usage-btn 어두운 스타일 */
.scroll-interactions-page .floating-usage-btn {
  background: rgba(51, 51, 51, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.scroll-interactions-page .floating-usage-btn:hover {
  background: rgba(51, 51, 51, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}