/* カスタムCSS */
:root {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
}



body {
    font-family: "メイリオ", Meiryo, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;

    line-height: 1.6;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s both;
}

.fade-in-delay-4 {
    animation: fadeIn 1s ease-out 1.2s both;
}

.fade-in-delay-5 {
    animation: fadeIn 1s ease-out 1.5s both;
}

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

/* スクロール時のアニメーション */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ナビゲーション */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #60a5fa;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* データタイプカード */
.data-type-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.data-type-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.data-type-card.active {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

/* プログレスバー */
.progress-bar {
    transition: width 1s ease-in-out;
}

/* レスポンシブ画像 */
img {
    max-width: 100%;
    height: auto;
}

/* ホバーエフェクト */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* カスタムボタン */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* セクション間隔 */
section {
    scroll-margin-top: 80px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .grid {
        gap: 1rem;
    }
}

/* スクロールバーカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* フォーカス状態 */
button:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* 印刷対応 */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ダークモード対応（将来の拡張用） */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --bg-light: #1f2937;
    }
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高コントラスト対応 */
@media (prefers-contrast: high) {
    .data-type-card {
        border: 2px solid var(--text-dark);
    }
    
    .btn-primary {
        border: 2px solid white;
    }
}