/**
 * Shard - 世界レベルのカスタムスタイルシート
 * 最新のデザイントレンドを取り入れた洗練されたスタイル
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;700;900&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  /* メインカラーパレット - モダンで洗練された配色 */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  
  --secondary: #47a3f3;
  --secondary-dark: #1e88e5;
  --secondary-light: #90caf9;
  --secondary-gradient: linear-gradient(135deg, #47a3f3 0%, #1e88e5 100%);
  
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-light: #d1fae5;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  
  --success: #34d399;
  --success-dark: #059669;
  --success-light: #d1fae5;
  
  --warning: #fbbf24;
  --warning-dark: #d97706;
  --warning-light: #fef3c7;
  
  --danger: #f87171;
  --danger-dark: #dc2626;
  --danger-light: #fef2f2;
  
  --dark: #111827;
  --dark-gray: #1f2937;
  --dark-800: #1e293b;
  --dark-700: #334155;
  --dark-600: #475569;
  
  --gray: #4b5563;
  --gray-light: #9ca3af;
  --gray-lighter: #e5e7eb;
  --gray-lightest: #f3f4f6;
  
  --light: #f9fafb;
  --white: #ffffff;
  
  /* グラデーション */
  --gradient-purple-blue: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
  --gradient-blue-teal: linear-gradient(135deg, #38bdf8 0%, #2dd4bf 100%);
  --gradient-teal-lime: linear-gradient(135deg, #2dd4bf 0%, #a3e635 100%);
  --gradient-pink-indigo: linear-gradient(135deg, #ec4899 0%, #6366f1 100%);
  
  /* 3Dエフェクト用のシャドウ */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  
  /* グラスモーフィズム */
  --glass-background: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shine: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  
  /* 間隔 */
  --spacing-unit: 0.25rem;
  --spacing-xs: calc(var(--spacing-unit) * 1);
  --spacing-sm: calc(var(--spacing-unit) * 2);
  --spacing-md: calc(var(--spacing-unit) * 4);
  --spacing-lg: calc(var(--spacing-unit) * 6);
  --spacing-xl: calc(var(--spacing-unit) * 8);
  --spacing-2xl: calc(var(--spacing-unit) * 12);
  --spacing-3xl: calc(var(--spacing-unit) * 16);
  
  /* アニメーション */
  --animation-speed-slow: 0.5s;
  --animation-speed-normal: 0.3s;
  --animation-speed-fast: 0.15s;
  
  /* フォントファミリー */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: 'Fira Code', SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-code: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* フォントサイズ */
  --font-size-xs: 0.85rem;
  --font-size-sm: 1rem;
  --font-size-md: 1.15rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2.25rem;
  --font-size-4xl: 2.75rem;
  --font-size-5xl: 3.5rem;
  --font-size-6xl: 4.5rem;
  
  /* 境界線の半径 */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

/* グローバルスタイル */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  padding-bottom: 0;
}

/* タイポグラフィー */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark);
}

h1, .h1 {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2, .h2 {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3, .h3 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h4, .h4 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
}

h5, .h5 {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

h6, .h6 {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--animation-speed-normal) ease;
}

a:hover {
  color: var(--primary-dark);
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-accent {
  background: var(--gradient-purple-blue);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ボタン */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

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

.btn-block {
  display: block;
  width: 100%;
}

/* ボタンバリアント */
.btn-primary {
  color: var(--white);
  background: var(--primary-gradient);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover, .btn-primary:focus {
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
  color: var(--white);
  background: var(--secondary-gradient);
  border-color: var(--secondary);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.btn-secondary:hover, .btn-secondary:focus {
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.35);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(56, 189, 248, 0.2);
}

.btn-outline-primary {
  color: var(--primary);
  background: transparent;
  border-color: var(--primary);
  box-shadow: none;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  color: var(--white);
  background: var(--primary-gradient);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25);
}

.btn-outline-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.btn-outline-secondary {
  color: var(--secondary);
  background: transparent;
  border-color: var(--secondary);
  box-shadow: none;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
  color: var(--white);
  background: var(--secondary-gradient);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.25);
}

.btn-outline-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(56, 189, 248, 0.2);
}

/* カード */
.card {
  background-color: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
  box-shadow: var(--shadow);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.card-subtitle {
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.card-text {
  margin-bottom: 1.5rem;
  color: var(--gray);
  flex: 1;
}

.card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--lightest-gray);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* コースカードセクション */
.courses-section {
    padding: 5rem 0;
    background-color: #f8fafc;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #1a365d;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
}

.course-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.course-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #2b6cb0;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.course-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a365d;
    line-height: 1.4;
}

.course-description {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.course-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0.5rem;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
}

.course-rating {
    display: flex;
    align-items: center;
}

.rating-stars {
    color: #f59e0b;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.rating-count {
    font-size: 0.75rem;
    color: #718096;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.25rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .courses-section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .course-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .courses-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 0.875rem;
    }
    
    .course-image {
        height: 160px;
    }
    
    .course-content {
        padding: 1.25rem;
    }
    
    .course-title {
        font-size: 1.125rem;
    }
}

/* ナビゲーションバー */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.75rem 0;
  background-color: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  text-decoration: none;
}

.navbar-logo {
  height: 40px;
  width: auto;
  margin-right: 0.75rem;
}

.navbar-menu {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-item {
  margin: 0 0.5rem;
}

.navbar-link {
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 0.375rem;
}

.navbar-link:hover, .navbar-link:focus {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
}

.navbar-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  font-size: 1.5rem;
  color: white;
}

.navbar-toggle:focus {
  outline: none;
}

/* セクション */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-sm {
  padding: 3rem 0;
}

.section-lg {
  padding: 7rem 0;
}

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

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  color: #333;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #12c1ba, #0a8c93);
  border-radius: 2px;
}

.section-title p {
  font-size: 1.125rem;
  color: #666;
  max-width: 700px;
  margin: 1rem auto 0;
}

.section-dark {
  background-color: var(--dark);
  color: white;
}

.section-dark .section-title h2 {
  color: white;
}

.section-dark .section-title h2::after {
  background: white;
}

.section-dark .section-title p {
  color: rgba(255, 255, 255, 0.8);
}

/* 特徴セクション修正 */
.section-bg-gradient {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    padding: 4rem 0;
    position: relative;
    z-index: 1;
    margin: 3rem 0 0 0 !important; /* 上部の余白を調整 */
}

.section-bg-gradient .container {
    position: relative;
    z-index: 2;
}

.decoration-dots {
    position: absolute;
    width: 180px;
    height: 180px;
    background-image: radial-gradient(#fff 2px, transparent 2px);
    background-size: 18px 18px;
    opacity: 0.1;
    pointer-events: none;
}

/* カードガラススタイル修正 */
.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: 0;
}

.card-glass:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: white;
    color: var(--primary);
    position: relative;
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    animation: rotation 10s linear infinite;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.card-glass:hover .feature-icon {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-cards-container {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.feature-card-col {
    display: flex;
    transition: all 0.4s ease;
}

.feature-card-col h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    color: white;
}

.feature-card-col:hover h4 {
    transform: translateY(-5px);
    color: white;
}

.feature-card-col .text-white-50 {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.feature-card-col:hover .text-white-50 {
    opacity: 1;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .feature-cards-container {
        margin-top: 1rem;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    .feature-card-col h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .feature-icon {
        width: 65px;
        height: 65px;
    }
    
    .feature-card-col h4 {
        font-size: 1.2rem;
    }
    
    .feature-card-col .text-white-50 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    #why-shard {
        padding: 3rem 0;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 1.5rem !important;
    }
    
    .feature-card-col h4 {
        font-size: 1.15rem;
    }
    
    .card-glass {
        padding: 0.5rem;
    }
}

/* 特徴セクション - 完全修正版 */
#why-shard {
  margin-bottom: 0 !important;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  z-index: 1;
}

#why-shard *:not(i) {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

#why-shard::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

#why-shard::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

/* バッジの特殊設定 - 最優先 */
#features-badge {
  font-size: 2.8rem !important;
  font-weight: 900 !important;
  padding: 0.8rem 2.5rem !important;
  margin-bottom: 2.5rem !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25) !important;
  display: inline-block !important;
  letter-spacing: 0.8px !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  min-width: 250px !important;
  line-height: 1.4 !important;
  color: var(--primary) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.05) !important;
  transform: scale(1.05) !important;
  transition: all 0.3s ease !important;
}

#why-shard .display-4 {
  font-size: calc(2.2rem + 1.5vw) !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  margin-bottom: 2rem !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  color: white !important;
}

#why-shard .lead {
  font-size: 1.5rem !important;
  line-height: 1.6 !important;
  margin-bottom: 2.8rem !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

#why-shard .feature-card-col h4 {
  font-size: 1.9rem !important;
  font-weight: 800 !important;
  margin-bottom: 1.25rem !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  color: white !important;
}

#why-shard .feature-card-col .text-white-50 {
  font-size: 1.5rem !important;
  line-height: 1.6 !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

.feature-cards-container {
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.feature-card-col {
  display: flex;
  margin-bottom: 1.5rem;
}

.card-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  z-index: 0;
}

.card-glass:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

.feature-icon-wrapper {
  position: relative;
  margin: 1rem auto 1.5rem;
  z-index: 1;
}

.feature-icon {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  background: white;
  color: var(--primary);
  position: relative;
}

.feature-icon i {
  font-size: 2rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.feature-icon::after {
  content: '';
  position: absolute;
  width: 93%;
  height: 93%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  animation: rotation 15s linear infinite;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.card-glass:hover .feature-icon {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.card-glass:hover .feature-icon i {
  transform: scale(1.1);
}

.card-glass .card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.feature-card-col:hover h4 {
  transform: translateY(-5px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.feature-card-col:hover .text-white-50 {
  opacity: 1;
  color: rgba(255, 255, 255, 0.95) !important;
}

.text-white {
  color: #fff !important;
}

.highlight-text {
  position: relative;
  display: inline-block;
  background: linear-gradient(transparent 70%, rgba(255, 255, 255, 0.2) 70%);
  padding: 0 0.5rem;
}

/* iPhoneなどのモバイル対応を強化 */
@media (max-width: 768px) {
  #features-badge {
    font-size: 2.2rem !important;
    padding: 0.7rem 2rem !important;
    min-width: 220px !important;
    transform: scale(1.02) !important;
  }
  
  #why-shard .display-4 {
    font-size: calc(1.9rem + 1.3vw) !important;
    margin-bottom: 1.8rem !important;
  }
  
  #why-shard .lead {
    font-size: 1.3rem !important;
    margin-bottom: 2.2rem !important;
  }
  
  #why-shard .feature-card-col h4 {
    font-size: 1.7rem !important;
  }
  
  #why-shard .feature-card-col .text-white-50 {
    font-size: 1.3rem !important;
  }
  
  .feature-icon {
    width: 70px;
    height: 70px;
  }
  
  .feature-icon i {
    font-size: 1.7rem;
  }
  
  .card-glass .card-body {
    padding: 1.25rem;
  }
}

/* 超小型画面対応 */
@media (max-width: 576px) {
  #why-shard {
    padding: 3rem 0;
  }
  
  #features-badge {
    font-size: 1.8rem !important;
    padding: 0.6rem 1.8rem !important;
    min-width: 200px !important;
    margin-bottom: 2rem !important;
  }
  
  #why-shard .display-4 {
    font-size: calc(1.6rem + 1vw) !important;
    margin-bottom: 1.3rem !important;
  }
  
  #why-shard .lead {
    font-size: 1.2rem !important;
    margin-bottom: 1.8rem !important;
  }
  
  #why-shard .feature-card-col h4 {
    font-size: 1.6rem !important;
  }
  
  #why-shard .feature-card-col .text-white-50 {
    font-size: 1.2rem !important;
  }
  
  .feature-icon {
    width: 65px;
    height: 65px;
  }
  
  .feature-icon i {
    font-size: 1.5rem;
  }
  
  .card-glass .card-body {
    padding: 1.15rem;
  }
}

/* iPhoneなどの非標準サイズ対応 */
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
  #features-badge {
    font-size: 1.8rem !important;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
  
  #why-shard .display-4 {
    font-size: calc(2rem + 1.5vw) !important;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
  
  #why-shard .lead {
    font-size: 1.4rem !important;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
  
  #why-shard .feature-card-col h4 {
    font-size: 1.7rem !important;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
  
  #why-shard .feature-card-col .text-white-50 {
    font-size: 1.3rem !important;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
}

/* セクションとアイコンセクションの関係修正 */
.section-bg-gradient {
  margin-bottom: 0 !important;
  padding-bottom: 6rem !important;
}

.section-bg-gradient + .icon-section {
  margin-top: -2rem !important;
  position: relative !important;
  z-index: 5 !important;
}

/* カードガラス効果の最適化 */
.card-glass {
  background-color: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.section-bg-gradient [data-scroll] {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all 0.6s ease !important;
}

.section-title h2 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.section-title p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* コードブロックのスタイル強化 */
pre[class*="language-"] {
    position: relative;
    max-height: 500px;
    margin: 1.5em 0;
    padding: 1.5em;
    overflow: auto;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Fira Code', monospace;
}

pre:not([class*="language-"]) {
    position: relative;
    max-height: 500px;
    overflow: auto;
    margin: 1.5em 0;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5em;
}

code[class*="language-"] {
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    padding: 0;
    white-space: pre;
    background: none;
}

/* コードブロックのスクロールバー */
pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* コピーボタン */
.copy-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 10;
}

pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.copy-button:active {
    transform: scale(0.95);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    pre[class*="language-"],
    pre:not([class*="language-"]) {
        max-height: 300px;
        padding: 1.2em;
    }
    
    .copy-button {
        opacity: 1;
    }
}

/* 行番号の調整 */
.line-numbers .line-numbers-rows {
    padding-top: 1.5em;
    padding-bottom: 1.5em;
    border-right-color: rgba(255, 255, 255, 0.2);
}

/* 戻るボタン */
.back-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #6366f1;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-button:hover {
    background-color: #4f46e5;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* モバイル対応強化 */
@media (max-width: 768px) {
    pre[class*="language-"],
    pre:not([class*="language-"]) {
        max-height: 300px;
        padding: 1.2em;
        font-size: 0.9em;
    }
    
    .copy-button {
        opacity: 1;
        top: 2px;
        right: 2px;
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .back-button {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 0.8em;
    }
    
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 0.8em;
    }
    
    /* スワイプ対応 */
    pre {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* モバイルでの操作性向上 */
@media (max-width: 576px) {
    /* 操作しやすいボタンサイズに調整 */
    .copy-button, 
    .back-button,
    .scroll-top-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* スワイプを促すアニメーション */
    pre[class*="language-"]::after {
        content: '⟷';
        position: absolute;
        right: 10px;
        bottom: 5px;
        color: rgba(255, 255, 255, 0.5);
        animation: swipeHint 1.5s infinite;
        font-size: 16px;
    }
    
    @keyframes swipeHint {
        0% { opacity: 0.2; transform: translateX(-5px); }
        50% { opacity: 0.8; transform: translateX(5px); }
        100% { opacity: 0.2; transform: translateX(-5px); }
    }
    
    /* iPhone特有の調整 */
    .back-button, .scroll-top-btn {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
    .back-button {
        left: calc(20px + env(safe-area-inset-left, 0px));
    }
    .scroll-top-btn {
        right: calc(20px + env(safe-area-inset-right, 0px));
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    pre[class*="language-"],
    pre:not([class*="language-"]) {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }
}
}