/* ================================================
   Anemone Blog - Header Common Styles
   ヘッダー・ナビゲーション・三角ロゴの共通スタイル
   ================================================ */

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 9999;
  background: linear-gradient(90deg,
    #ffd700 0%,
    #4ecdc4 25%,
    #ff6b9d 50%,
    #9b59b6 75%,
    #ffd700 100%);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s ease-out;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ========== HEADER BAR ========== */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.header-bar.scrolled {
  background: rgba(0, 0, 0, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* ========== TEXT NAVIGATION ========== */
.text-nav {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-nav > a,
.text-nav .nav-disabled {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  position: relative;
  padding-bottom: 0.3rem;
}

.text-nav > a:hover {
  color: rgba(255, 255, 255, 1);
  letter-spacing: 0.35em;
}

.text-nav > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #ffd700, #4ecdc4);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-nav > a:hover::after {
  width: 100%;
}

/* Active page - 中央 */
.text-nav > a.active {
  color: rgba(255, 255, 255, 1);
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  letter-spacing: 0.3em;
  margin-right: -0.3em; /* letter-spacingの視覚的補正 */
}

.text-nav > a.active::after {
  width: 100%;
  background: linear-gradient(90deg, #ffd700, #4ecdc4);
}

/* Right side navigation group */
.nav-right {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* Non-active links - 右側 */
.text-nav > a:not(.active) {
  position: absolute;
  right: 2rem;
}

.text-nav .nav-disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
  pointer-events: none;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ========== ANEMONE TRIANGLE LOGO ========== */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.anemone-logo {
  display: flex;
  align-items: baseline;
  cursor: pointer;
  overflow: hidden;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.anemone-logo .triangle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.anemone-logo .full-text {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Expanded state */
.anemone-logo.expanded .triangle {
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.15em;
  text-shadow:
    0 0 15px rgba(255, 215, 0, 0.4),
    0 0 30px rgba(78, 205, 196, 0.2);
}

.anemone-logo.expanded .full-text {
  max-width: 200px;
  opacity: 1;
  margin-left: -0.15em;  /* 三角形とつなげる */
  color: rgba(255, 255, 255, 0.95);
  text-shadow:
    0 0 15px rgba(255, 215, 0, 0.4),
    0 0 30px rgba(78, 205, 196, 0.2);
}

/* Hover effect */
.anemone-logo:hover .triangle {
  color: rgba(255, 255, 255, 0.9);
  text-shadow:
    0 0 12px rgba(255, 215, 0, 0.3),
    0 0 20px rgba(78, 205, 196, 0.15);
}

.anemone-logo.expanded:hover .triangle,
.anemone-logo.expanded:hover .full-text {
  color: rgba(255, 255, 255, 1);
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.5),
    0 0 35px rgba(78, 205, 196, 0.3),
    0 0 50px rgba(255, 107, 157, 0.2);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
  /* Header */
  .header-bar {
    height: 60px;
  }

  .text-nav {
    padding: 0 1.5rem;
  }

  /* Navigation */
  .text-nav a.active {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
  }

  .text-nav a:not(.active) {
    right: 1.5rem;
    font-size: 0.75rem;
  }

  .nav-right {
    gap: 1rem;
  }

  .text-nav .nav-disabled {
    font-size: 0.7rem;
  }

  /* Triangle Logo - モバイルでも表示 */
  .nav-center {
    display: block;
  }

  .anemone-logo {
    font-size: 0.9rem; /* スマホでは少し小さめ */
  }

  .anemone-logo .triangle {
    font-size: 1rem;
  }

  .anemone-logo .full-text {
    font-size: 0.85rem;
  }
}

/* ========== LANGUAGE SELECTOR ========== */
#language-selector {
  position: absolute;
  right: 2rem;
  z-index: 100;
}

#lang-select {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  padding-right: 2.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 10px;
}

#lang-select:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

#lang-select:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 1);
}

#lang-select option {
  background: rgba(0, 0, 0, 0.95);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 300;
}

.lang-link {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 300;
  transition: all 0.2s ease;
  position: static;
  padding: 0;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  display: inline-block;
  flex-shrink: 0;
}

.lang-link::after {
  display: none;
}

.lang-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.lang-link.active {
  color: rgba(255, 255, 255, 1);
  font-weight: 500;
}

.lang-separator {
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
  display: inline-block;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}
