/* Variables */
:root {
  --primary: #d946ef;
  --accent: #06b6d4;
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --light-text: #f1f5f9;
  --muted-text: #cbd5e1;
  --border: rgba(217, 70, 239, 0.2);
  --glow: 0 0 20px rgba(217, 70, 239, 0.3);
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 
    0 4px 15px rgba(217, 70, 239, 0.4),
    0 0 20px rgba(217, 70, 239, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 
    0 8px 25px rgba(217, 70, 239, 0.5),
    0 0 30px rgba(6, 182, 212, 0.3);
}

#back-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

#back-to-top i {
  font-size: 1rem;
  animation: bounceUp 2s ease-in-out infinite;
}

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

#back-to-top .back-to-top-text {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'M PLUS Rounded 1c', 'Zen Maru Gothic', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  background-attachment: fixed;
  color: var(--light-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 
    0 0 10px rgba(255, 105, 180, 0.4),
    0 0 20px rgba(255, 105, 180, 0.3),
    0 0 30px rgba(216, 180, 254, 0.3),
    0 0 40px rgba(216, 180, 254, 0.2),
    0 0 50px rgba(200, 150, 255, 0.15);
}

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(255, 153, 230, 0.6)) drop-shadow(0 0 25px rgba(204, 102, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 25px rgba(255, 153, 230, 0.8)) drop-shadow(0 0 35px rgba(204, 102, 255, 0.6)); }
}

h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #d946ef 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Heading Underline */
.heading-underline {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #d946ef 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heading-underline::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #FFB3D9 0%, #D4B5FF 50%, #B3E5FC 100%);
  border-radius: 3px;
  opacity: 0.6;
  transform: rotate(-1deg);
}

/* Text Highlight */
.text-highlight {
  background: linear-gradient(90deg, rgba(255, 179, 217, 0.3) 0%, rgba(212, 181, 255, 0.3) 100%);
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  position: relative;
  display: inline-block;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--light-text);
}

p {
  color: var(--muted-text);
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Cute Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  position: relative;
  animation: spin 2s linear infinite;
}

.loading-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 30px rgba(217, 70, 239, 0.5);
}

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

.loading-bar {
  width: 250px;
  height: 8px;
  background: rgba(217, 70, 239, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  margin: 0 auto 1rem;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, #d946ef 0%, #06b6d4 100%);
  border-radius: 1rem;
  animation: loadProgress 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.8);
}

@keyframes loadProgress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.loading-text {
  color: var(--light-text);
  font-size: 1.2rem;
  font-weight: 600;
  animation: fadeTextInOut 2s ease-in-out infinite;
}

@keyframes fadeTextInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Header / Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: none;
  padding: 1.5rem 0;
  overflow: visible;
}

/* Progress Heart - Kawaii Heart at the end */
#progress-heart {
  position: absolute;
  bottom: 0;
  left: var(--header-progress, 0%);
  font-size: 14px;
  color: #FF69B4;
  transform: translateX(-50%) translateY(30%);
  z-index: 10;
  transition: left 0.15s ease-out;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(255, 105, 180, 0.9))
          drop-shadow(0 0 8px rgba(255, 105, 180, 0.6))
          drop-shadow(0 0 12px rgba(186, 85, 211, 0.4));
}

#progress-heart.visible {
  opacity: 1;
  animation: heartBeat 1s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% {
    transform: translateX(-50%) translateY(30%) scale(1);
    color: #FF69B4;
  }
  25% {
    transform: translateX(-50%) translateY(30%) scale(1.3);
    color: #FF1493;
  }
  50% {
    transform: translateX(-50%) translateY(30%) scale(1);
    color: #DA70D6;
  }
  75% {
    transform: translateX(-50%) translateY(30%) scale(1.2);
    color: #FF69B4;
  }
}

/* Header Bottom Glow Line - Rounded End */
header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--header-progress, 0%);
  height: 5px;
  background: linear-gradient(90deg, 
    #FFB6C1 0%,      /* ライトピンク */
    #FF69B4 15%,     /* ホットピンク */
    #DA70D6 30%,     /* オーキッド */
    #BA55D3 45%,     /* ミディアムオーキッド */
    #87CEEB 60%,     /* スカイブルー */
    #7FFFD4 75%,     /* アクアマリン */
    #FFDAB9 90%,     /* ピーチパフ */
    #FFB6C1 100%);   /* ライトピンク */
  background-size: 300% 100%;
  animation: headerRainbow 4s ease infinite;
  border-radius: 0 10px 10px 0;
  box-shadow: 
    0 0 8px rgba(255, 105, 180, 0.8),
    0 0 16px rgba(186, 85, 211, 0.6),
    0 0 24px rgba(135, 206, 235, 0.4);
  transition: width 0.15s ease-out;
}

@keyframes headerRainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #f0abfc 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(217, 70, 239, 0.5));
}

nav a {
  margin-left: 2rem;
  font-weight: 600;
  color: #f1f5f9;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

nav a:hover {
  color: #22d3ee;
  text-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 8rem 2rem;
  text-align: center;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.hero::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.5) 0%, rgba(30, 41, 59, 0.5) 50%, rgba(51, 65, 85, 0.5) 100%);
  z-index: -1;
  pointer-events: none;
}

#background-video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: -2;
}

#background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-content {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(217, 70, 239, 0.3);
  border-radius: 2rem;
  padding: 4rem;
  max-width: 700px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-size: 4rem;
  text-shadow: 
    0 0 10px rgba(255, 105, 180, 0.4),
    0 0 20px rgba(255, 105, 180, 0.3),
    0 0 30px rgba(216, 180, 254, 0.3),
    0 0 40px rgba(216, 180, 254, 0.2),
    0 0 50px rgba(200, 150, 255, 0.15);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.title-line1,
.title-line2 {
  display: inline-block;
}

/* Hide typewriter text initially - JS will reveal */
.typewriter:not(.typewriter-ready),
.subtitle-line:not(.typewriter-ready) {
  visibility: hidden;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.8;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #d946ef 0%, #8b5cf6 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(217, 70, 239, 0.3);
}

.btn-secondary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(217, 70, 239, 0.1);
}

/* Section */
section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

section:not(.hero) {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.5) 100%);
  position: relative;
  z-index: 10;
  overflow: visible;
}

.section-intro {
  text-align: center;
  margin-bottom: 3rem;
}

/* Profile Section */
.profile-wrapper {
  position: relative;
  margin-top: 3rem;
  overflow: visible;
}

.profile-image {
  width: 280px;
  height: 280px;
  border-radius: 1.5rem;
  overflow: visible;
  border: 5px solid transparent;
  background: linear-gradient(var(--dark-card), var(--dark-card)) padding-box,
              linear-gradient(135deg, #d946ef 0%, #06b6d4 50%, #d946ef 100%) border-box;
  box-shadow: 
    0 0 30px rgba(217, 70, 239, 0.5),
    0 0 60px rgba(217, 70, 239, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 20;
  margin: 0 auto 2rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: floatProfile 3s ease-in-out infinite, profileGlow 2s ease-in-out infinite alternate;
}

@keyframes profileGlow {
  0% { box-shadow: 0 0 30px rgba(217, 70, 239, 0.5), 0 0 60px rgba(217, 70, 239, 0.3), 0 20px 60px rgba(0, 0, 0, 0.4); }
  100% { box-shadow: 0 0 40px rgba(217, 70, 239, 0.7), 0 0 80px rgba(6, 182, 212, 0.4), 0 20px 60px rgba(0, 0, 0, 0.4); }
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.2rem;
  display: block;
}

.profile-image:hover {
  animation: none;
  transform: translateY(-5px) scale(1.08);
  box-shadow: 
    0 0 50px rgba(217, 70, 239, 0.8),
    0 0 100px rgba(6, 182, 212, 0.5),
    0 25px 70px rgba(0, 0, 0, 0.5);
}

/* Profile Title Highlight */
.profile-title-highlight {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #d946ef 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0.5rem 0;
  margin-bottom: 1rem !important;
  position: relative;
  animation: titlePulse 2s ease-in-out infinite;
}

.profile-title-highlight .title-icon {
  -webkit-text-fill-color: initial;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(217, 70, 239, 0.5)); }
  50% { filter: drop-shadow(0 0 15px rgba(217, 70, 239, 0.8)); }
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.profile-tooltip {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 1;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 
    0 4px 20px rgba(102, 126, 234, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.05em;
  animation: tooltipPulse 2s ease-in-out infinite, tooltipFloat 3s ease-in-out infinite;
}

.profile-tooltip.always-visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

@keyframes tooltipPulse {
  0%, 100% { 
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3);
  }
  50% { 
    box-shadow: 0 6px 30px rgba(240, 147, 251, 0.7), 0 0 0 3px rgba(255, 255, 255, 0.5);
  }
}

@keyframes tooltipFloat {
  0%, 100% { top: -60px; }
  50% { top: -65px; }
}

.profile-tooltip::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #764ba2;
}

.profile-tooltip::after {
  content: '✨';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  animation: sparkleRotate 2s linear infinite;
}

.profile-image:hover .profile-tooltip {
  animation: tooltipPulse 0.5s ease-in-out infinite, tooltipFloat 1s ease-in-out infinite;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ffd700 100%);
}

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

/* Profile Sparkles */
.profile-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: sparkleFloat 3s ease-in-out infinite;
  opacity: 0;
}

.sparkle:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.sparkle:nth-child(2) {
  top: 10%;
  right: 10%;
  animation-delay: 0.5s;
}

.sparkle:nth-child(3) {
  bottom: 10%;
  left: 10%;
  animation-delay: 1s;
}

.sparkle:nth-child(4) {
  bottom: 10%;
  right: 10%;
  animation-delay: 1.5s;
}

@keyframes sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
  50% { opacity: 1; transform: translateY(-10px) scale(1); }
}

.profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: flex-start;
  margin-top: -80px;
  padding-top: 80px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(217, 70, 239, 0.3);
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(217, 70, 239, 0.1);
}

.profile-content {
  width: 100%;
}

.profile-content h3 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.profile-content p {
  margin-bottom: 1rem;
  color: #e2e8f0;
  line-height: 1.8;
}

.profile-content strong {
  color: var(--primary);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(217, 70, 239, 0.15);
  border: 1px solid var(--primary);
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* CPP Highlight Card */
.cpp-highlight-card {
  margin-top: 1.5rem;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 2px solid var(--primary);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  animation: cpp-glow 3s ease-in-out infinite;
}

.cpp-highlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: cpp-shine 4s ease-in-out infinite;
}

@keyframes cpp-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(217, 70, 239, 0.3); }
  50% { box-shadow: 0 0 30px rgba(217, 70, 239, 0.5), 0 0 40px rgba(6, 182, 212, 0.3); }
}

@keyframes cpp-shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.cpp-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.cpp-icon {
  font-size: 1.8rem;
}

.cpp-title {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
}

.cpp-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-text);
  margin-top: 0.1rem;
}

.cpp-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cpp-badge {
  padding: 0.4rem 0.9rem;
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.3) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 1px solid rgba(217, 70, 239, 0.5);
  border-radius: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.cpp-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 70, 239, 0.3);
}

/* Achievements Section */
.achievements-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(217, 70, 239, 0.2);
}

.achievements-section > strong {
  display: block;
  color: var(--primary);
  margin-bottom: 1rem;
}

.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.achievement-category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.achievement-label {
  font-size: 0.8rem;
  color: var(--muted-text);
  font-weight: 600;
}

.achievement-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.achievement-item {
  padding: 0.3rem 0.7rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(203, 213, 225, 0.3);
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: #e2e8f0;
  transition: all 0.3s ease;
}

.achievement-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.gallery-item {
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(217, 70, 239, 0.3);
  transition: all 0.3s ease;
  background: rgba(30, 41, 59, 0.4);
  position: relative;
  backdrop-filter: blur(10px);
}

.gallery-item:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: var(--glow);
  background: rgba(30, 41, 59, 0.6);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Carousel */
.carousel-container {
  margin-top: 3rem;
}

.carousel-hint {
  text-align: center;
  color: var(--muted-text);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  animation: fadeInOut 2s ease-in-out infinite;
}

.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 70, 239, 0.5) transparent;
}

.carousel::-webkit-scrollbar {
  height: 4px;
}

.carousel::-webkit-scrollbar-thumb {
  background: rgba(217, 70, 239, 0.5);
  border-radius: 2px;
}

.carousel-item {
  flex: 0 0 140px;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(217, 70, 239, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
}

.carousel-item:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  background: rgba(30, 41, 59, 0.6);
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

/* Shorts Grid */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.shorts-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 70, 239, 0.5) transparent;
}

.shorts-carousel::-webkit-scrollbar {
  height: 4px;
}

.shorts-carousel::-webkit-scrollbar-thumb {
  background: rgba(217, 70, 239, 0.5);
  border-radius: 2px;
}

.short-item {
  flex: 0 0 220px;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(217, 70, 239, 0.3);
  transition: all 0.3s ease;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
}

.short-item:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  background: rgba(30, 41, 59, 0.6);
}

.short-embed {
  width: 100%;
  height: 100%;
  border: none;
}

.video-card {
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid rgba(217, 70, 239, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  padding: 0;
  position: relative;
}

.video-card::after {
  content: '見てね💖';
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(217, 70, 239, 0.95);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px) scale(0.8);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.4);
}

/* YouTube thumbnail link (mobile only) */
.video-thumbnail {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumbnail .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(204, 0, 0, 0.9);
  color: white;
  width: 68px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.video-thumbnail .play-button::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.video-thumbnail:hover .play-button {
  transform: translate(-50%, -50%) scale(1.05);
  background: rgba(204, 0, 0, 1);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}
}

.video-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(217, 70, 239, 0.5), 0 10px 40px rgba(0, 0, 0, 0.3);
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-8px) scale(1.02);
}

.video-card:hover::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted-text);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.social-links a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  /* Hide iframe, show thumbnail link on mobile */
  .video-embed-desktop {
    display: none !important;
  }
  
  .video-thumbnail-mobile {
    display: block !important;
  }
  
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .profile-image {
    width: 220px;
    height: 220px;
  }

  .profile-title-highlight {
    font-size: 1.1rem;
  }

  .profile {
    margin-top: -70px;
    padding-top: 70px;
    padding: 1.5rem;
    padding-top: 80px;
  }

  .profile-content h3 {
    font-size: 1.3rem;
  }

  .profile-content p {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .badges {
    gap: 0.5rem;
  }

  .badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  /* CPP Highlight Card - Mobile */
  .cpp-highlight-card {
    padding: 1rem 1.2rem;
  }

  .cpp-icon {
    font-size: 1.5rem;
  }

  .cpp-title {
    font-size: 1rem;
  }

  .cpp-badge {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .achievements-section {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
  }

  .achievement-item {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }

  /* Hide nav links on mobile, keep lang toggle */
  nav a {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .shorts-grid {
    grid-template-columns: 1fr;
  }

  .short-item {
    flex: 0 0 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero {
    padding: 3rem 1rem;
    min-height: 100vh;
  }

  .hero-content {
    padding: 2rem 1.5rem !important;
    border-radius: 1.5rem;
    max-width: 90%;
  }

  .hero h1 {
    font-size: 1.75rem !important;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
  }

  .title-line1,
  .title-line2 {
    display: inline-block;
    white-space: nowrap;
  }

  .hero-subtitle {
    font-size: 0.85rem !important;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  #profile .container {
    padding: 0 0.75rem;
  }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Pricing Section */
#pricing {
  padding: 5rem 0;
}

.pricing-note {
  text-align: center;
  color: var(--muted-text);
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(217, 70, 239, 0.2);
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(217, 70, 239, 0.2);
}

.pricing-card.popular {
  border-color: var(--primary);
  background: rgba(217, 70, 239, 0.1);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.4rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.pricing-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pricing-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.pricing-header h3 {
  font-size: 1.3rem;
  color: #f1f5f9;
  margin: 0;
}

.pricing-price {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-price .price {
  font-size: 2.2rem;
  font-weight: 900;
  color: white;
  display: block;
}

.pricing-price .price-note {
  font-size: 0.85rem;
  color: var(--muted-text);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.pricing-features li {
  padding: 0.35rem 0;
  color: #cbd5e1;
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.5rem;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.pricing-example {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 1rem;
  padding: 0;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* Dropdown Toggle Button */
.example-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: transparent;
  border: none;
  color: var(--muted-text);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.example-toggle:hover {
  color: var(--primary);
  background: rgba(217, 70, 239, 0.1);
}

.example-toggle i {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
}

.pricing-example.open .example-toggle {
  color: var(--primary);
  border-bottom: 1px solid rgba(217, 70, 239, 0.2);
}

.pricing-example.open .example-toggle i {
  transform: rotate(180deg);
}

/* Dropdown Content */
.example-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
}

.pricing-example.open .example-links {
  max-height: 300px;
  padding: 0.8rem 1rem 1rem;
}

.pricing-example .example-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  padding: 0.3rem 0;
}

.pricing-example .example-link:last-child {
  margin-bottom: 0;
}

.pricing-example .example-link:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.pricing-example .example-link .fa-youtube {
  color: #ff0000;
}

.pricing-example .example-link .fa-twitter {
  color: #1da1f2;
}

.pricing-btn {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  
  .pricing-card.popular {
    order: -1;
  }
}

/* Target Audience */
.target-audience {
  margin-top: 4rem;
  text-align: center;
}

.target-audience h3 {
  font-size: 1.8rem;
  color: #f1f5f9;
  margin-bottom: 3rem;
  font-weight: 700;
}

.target-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.target-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(217, 70, 239, 0.3);
  border-radius: 3rem;
  padding: 1.5rem 2rem;
  font-size: 1.05rem;
  color: #e2e8f0;
  transition: all 0.3s ease;
  min-height: 80px;
}

.target-item:hover {
  border-color: var(--primary);
  background: rgba(217, 70, 239, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(217, 70, 239, 0.3);
}

.target-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

/* Other Services */
.other-services {
  margin-top: 3.5rem;
}

.other-services-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(168, 85, 247, 0.15));
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 2rem;
  padding: 2.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.other-services-content .btn {
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 140px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.other-services-icon {
  font-size: 3.5rem;
  flex-shrink: 0;
}

.other-services-text {
  flex-grow: 1;
  text-align: left;
}

.other-services-text h4 {
  font-size: 1.4rem;
  color: #f1f5f9;
  margin: 0 0 0.8rem 0;
  font-weight: 700;
}

.other-services-text p {
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.7;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), var(--glow);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 10001;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 10002;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
  transform: rotate(90deg);
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--light-text);
  font-size: 0.95rem;
}

.required {
  color: #f43f5e;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.9rem 1.2rem;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(217, 70, 239, 0.3);
  border-radius: 12px;
  color: var(--light-text);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1), 0 0 15px rgba(217, 70, 239, 0.3);
  background: rgba(15, 23, 42, 0.95);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted-text);
  opacity: 0.6;
}

.submit-btn {
  margin-top: 1rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  padding: 1rem;
  border-radius: 10px;
  font-weight: 500;
  text-align: center;
  display: none;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
  display: block;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  display: block;
}

/* ========================================
   Typewriter Animation
   ======================================== */

/* Typewriter cursor effect */
.typewriter {
  display: inline-block;
  min-height: 1.2em;
}

.typing-cursor::after {
  content: '▋';
  display: inline-block;
  animation: cursorBlink 0.7s step-end infinite;
  color: var(--primary);
  font-weight: 400;
  margin-left: 2px;
  text-shadow: 
    0 0 10px rgba(217, 70, 239, 0.8),
    0 0 20px rgba(217, 70, 239, 0.5);
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Subtitle typewriter styles */
.hero-subtitle.typewriter-subtitle {
  display: block;
  text-align: center;
}

.subtitle-line {
  display: none;
  min-height: 1.5em;
  line-height: 1.8;
}

.subtitle-line.typing-cursor::after {
  content: '▋';
  display: inline-block;
  animation: cursorBlink 0.7s step-end infinite;
  color: var(--accent);
  font-weight: 400;
  margin-left: 2px;
  font-size: 0.8em;
  text-shadow: 
    0 0 10px rgba(6, 182, 212, 0.8),
    0 0 20px rgba(6, 182, 212, 0.5);
}

/* Title glow animation after typing complete */
.title-line1.typewriter-done:not(.typing-cursor),
.title-line2.typewriter-done:not(.typing-cursor) {
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(255, 105, 180, 0.4),
      0 0 20px rgba(255, 105, 180, 0.3),
      0 0 30px rgba(216, 180, 254, 0.3);
  }
  50% {
    text-shadow: 
      0 0 15px rgba(255, 105, 180, 0.6),
      0 0 30px rgba(255, 105, 180, 0.5),
      0 0 45px rgba(216, 180, 254, 0.4),
      0 0 60px rgba(200, 150, 255, 0.3);
  }
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-content {
    padding: 2rem 1.5rem;
    width: 95%;
    max-height: 95vh;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .target-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .target-item {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }
  
  .other-services-content {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  
  .other-services-text {
    text-align: center;
  }

  .other-services-content .btn {
    width: 100%;
  }
}

/* ==========================================
   Language Toggle Button
   ========================================== */
#lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.35rem 0.5rem;
  color: var(--light-text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#lang-toggle:hover {
  background: rgba(217, 70, 239, 0.15);
  border-color: var(--primary);
}

#lang-toggle:active {
  transform: scale(0.98);
}

#lang-toggle .lang-option {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.4rem;
  border-radius: 15px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

#lang-toggle .lang-option.active {
  opacity: 1;
  background: rgba(217, 70, 239, 0.4);
}

#lang-toggle .lang-option:not(.active):hover {
  opacity: 0.8;
}

#lang-toggle .lang-divider {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
  font-size: 0.8rem;
}

#lang-toggle .lang-flag {
  font-size: 0.85rem;
}

#lang-toggle .lang-code {
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  font-weight: 700;
}

/* Header nav with language toggle */
header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Mobile language toggle */
@media (max-width: 768px) {
  header nav {
    gap: 0;
  }
  
  #lang-toggle {
    /* Keep in header, no fixed position */
  }
}
