/* かぼ鯖 - カスタムスタイル */

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

.big {
    font-size: 40px;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--theme-text, #333);
    background: var(--theme-bg, #f9fafb);
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-red: #d32f2f;        /* 深紅 */
    --primary-orange: #ff6f00;      /* 橙色 */
    --warm-brown: #8d6e63;          /* 栗色 */
    --forest-green: #2e7d32;        /* 深緑 */
    --gold-yellow: #fbc02d;         /* 金色 */
    --navy-blue: #1565c0;           /* 濃紺 */
    --charcoal: #424242;            /* 炭色 */
    --cream-white: #fafafa;         /* 生成り */
    --soft-gray: #f5f5f5;           /* 薄鼠 */
}

/* ナビゲーション */
.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--primary-orange);
    background-color: rgba(255, 111, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* モバイルメニュー */
.mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ヒーローセクション */
.hero-section {
    background: url(../img/header.png) center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

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

@keyframes fadeInDelay {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* CTAボタン */
.cta-button {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 特徴カード */
.feature-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 和風装飾要素 */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-yellow), transparent);
    margin: 40px auto;
    width: 100px;
    border-radius: 2px;
}

/* スクロールエフェクト */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 和風パターン背景 */
.japanese-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 111, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(211, 47, 47, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(251, 192, 45, 0.05) 50%, transparent 70%);
}

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

.hover-lift:hover {
    transform: translateY(-5px);
}

/* グラデーションテキスト */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Staff */
.staff-avatar {
    border-color: var(--staff-border-color, #f97316);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-red));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .cta-button {
        padding: 14px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .nav-link {
        padding: 12px 16px;
        display: block;
        border-radius: 6px;
        margin: 4px 0;
    }
}


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

/* フォーカススタイル */
.cta-button:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* 印刷スタイル */
@media print {
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .cta-button,
    .mobile-menu-btn {
        display: none !important;
    }
}

/* フェードイン効果 */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Theme */
:root {
    --theme-bg: #f9fafb;
    --theme-surface: #ffffff;
    --theme-text: #1f2937;
    --theme-text-soft: #4b5563;
    --theme-border: rgba(0, 0, 0, 0.1);
    --theme-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --theme-header-bg: rgba(255, 255, 255, 0.92);
    --theme-mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --theme-toggle-bg: #ffffff;
    --theme-toggle-hover: #f3f4f6;
}

body[data-theme="dark"] {
    --theme-bg: #0f172a;
    --theme-surface: #111827;
    --theme-text: #f9fafb;
    --theme-text-soft: #d1d5db;
    --theme-border: rgba(148, 163, 184, 0.22);
    --theme-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
    --theme-header-bg: rgba(15, 23, 42, 0.88);
    --theme-mobile-menu-bg: rgba(17, 24, 39, 0.96);
    --theme-toggle-bg: #1f2937;
    --theme-toggle-hover: #374151;
}

body[data-theme="dark"],
body[data-theme="dark"].bg-gray-50,
body[data-theme="dark"].bg-gray-100,
body[data-theme="dark"].bg-white {
    background-color: var(--theme-bg) !important;
    color: var(--theme-text) !important;
}

.mobile-menu {
    background: var(--theme-mobile-menu-bg);
    border-color: var(--theme-border);
}

.feature-card {
    background: var(--theme-surface);
    box-shadow: var(--theme-shadow);
    border-color: var(--theme-border);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 9999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-toggle-bg);
    color: var(--theme-text);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.theme-actions .mobile-menu-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

.theme-toggle:hover {
    background: var(--theme-toggle-hover);
    transform: translateY(-1px);
}

.theme-toggle-label {
    font-size: 14px;
    font-weight: 600;
}

body[data-theme="dark"] .theme-toggle .fa-sun,
body:not([data-theme="dark"]) .theme-toggle .fa-moon {
    display: none;
}

body[data-theme="dark"] .hero-overlay {
    background: linear-gradient(45deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0.48));
}

body[data-theme="dark"] header,
body[data-theme="dark"] .mobile-menu,
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-gray-50,
body[data-theme="dark"] .bg-gray-100 {
    background-color: var(--theme-surface) !important;
}

body[data-theme="dark"] main,
body[data-theme="dark"] section,
body[data-theme="dark"] article,
body[data-theme="dark"] aside {
    color: var(--theme-text);
}

body[data-theme="dark"] header {
    background-color: var(--theme-header-bg) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--theme-border);
}

body[data-theme="dark"] .bg-yellow-50 {
    background-color: rgba(251, 191, 36, 0.12) !important;
}

body[data-theme="dark"] .bg-red-100,
body[data-theme="dark"] .bg-orange-100,
body[data-theme="dark"] .bg-amber-100,
body[data-theme="dark"] .bg-yellow-100,
body[data-theme="dark"] .bg-green-100,
body[data-theme="dark"] .bg-cyan-100,
body[data-theme="dark"] .bg-blue-100,
body[data-theme="dark"] .bg-indigo-100,
body[data-theme="dark"] .bg-purple-100 {
    background-color: rgba(148, 163, 184, 0.14) !important;
}

body[data-theme="dark"] .bg-gray-200,
body[data-theme="dark"] .bg-gray-300 {
    background-color: #334155 !important;
}

body[data-theme="dark"] .hover\:bg-gray-100:hover,
body[data-theme="dark"] .hover\:bg-gray-300:hover {
    background-color: #334155 !important;
}

body[data-theme="dark"] .border,
body[data-theme="dark"] .border-gray-400,
body[data-theme="dark"] .border-gray-700,
body[data-theme="dark"] .border-yellow-400 {
    border-color: var(--theme-border) !important;
}

body[data-theme="dark"] .shadow,
body[data-theme="dark"] .shadow-md,
body[data-theme="dark"] .shadow-lg,
body[data-theme="dark"] .hover\:shadow-md:hover,
body[data-theme="dark"] .hover\:shadow-xl:hover {
    box-shadow: var(--theme-shadow) !important;
}

body[data-theme="dark"] .text-gray-800,
body[data-theme="dark"] .text-gray-700,
body[data-theme="dark"] .text-gray-600,
body[data-theme="dark"] .text-gray-500,
body[data-theme="dark"] .text-white {
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .text-gray-400 {
    color: var(--theme-text-soft) !important;
}

body[data-theme="dark"] .text-yellow-800,
body[data-theme="dark"] .text-yellow-700,
body[data-theme="dark"] .text-amber-700,
body[data-theme="dark"] .text-indigo-700,
body[data-theme="dark"] .text-cyan-700,
body[data-theme="dark"] .text-green-700,
body[data-theme="dark"] .text-orange-700 {
    color: #fde68a !important;
}

body[data-theme="dark"] .text-orange-50,
body[data-theme="dark"] .text-green-50,
body[data-theme="dark"] .text-cyan-50,
body[data-theme="dark"] .text-indigo-50,
body[data-theme="dark"] .text-pink-50,
body[data-theme="dark"] .text-amber-50 {
    color: #ffffff !important;
}

body[data-theme="dark"] .correct {
    background-color: rgba(132, 204, 22, 0.18) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .wrong {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .nav-link {
    color: var(--theme-text-soft);
}

body[data-theme="dark"] .nav-link:hover {
    color: #fdba74;
    background-color: rgba(249, 115, 22, 0.16);
}

body[data-theme="dark"] footer {
    background: #020617 !important;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
    background: #0f172a;
    color: var(--theme-text);
    border-color: var(--theme-border);
}

body[data-theme="dark"] option {
    background: #0f172a;
    color: var(--theme-text);
}

body[data-theme="dark"] a:not(.cta-button):not(.nav-link):not(.theme-toggle) {
    color: #fdba74;
}

body[data-theme="dark"] .card,
body[data-theme="dark"] #questionArea > div,
body[data-theme="dark"] #manage,
body[data-theme="dark"] #about {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.98)) !important;
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
}

body[data-theme="dark"] .hero-bg {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.82), rgba(239, 68, 68, 0.72)) !important;
}

body[data-theme="dark"] .bg-gradient-to-r {
    box-shadow: var(--theme-shadow);
}

body[data-theme="dark"] .from-red-500.to-orange-500,
body[data-theme="dark"] .from-green-500.to-emerald-500,
body[data-theme="dark"] .from-indigo-500.to-blue-500,
body[data-theme="dark"] .from-cyan-500.to-sky-500,
body[data-theme="dark"] .from-yellow-500.to-amber-500,
body[data-theme="dark"] .from-purple-500.to-pink-500 {
    filter: saturate(0.9) brightness(0.92);
}

body[data-theme="dark"] .bg-blue-600,
body[data-theme="dark"] .bg-green-600,
body[data-theme="dark"] .bg-indigo-600,
body[data-theme="dark"] .bg-cyan-600,
body[data-theme="dark"] .bg-orange-600,
body[data-theme="dark"] .bg-yellow-500,
body[data-theme="dark"] .bg-red-500,
body[data-theme="dark"] .bg-blue-500,
body[data-theme="dark"] .bg-amber-600,
body[data-theme="dark"] .bg-amber-700,
body[data-theme="dark"] .bg-cyan-700,
body[data-theme="dark"] .bg-green-700,
body[data-theme="dark"] .bg-blue-700,
body[data-theme="dark"] .bg-indigo-700,
body[data-theme="dark"] .bg-orange-700 {
    filter: brightness(0.95);
}

@media (max-width: 768px) {
    .theme-actions {
        gap: 8px;
    }

    .theme-toggle {
        min-width: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .theme-actions .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }

    .theme-toggle-label {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .theme-toggle {
        min-width: 42px;
        height: 42px;
        padding: 0 12px;
    }

    .theme-toggle-label {
        display: none;
    }
}

