/* カスタムスタイル */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* ヒーローセクションのアニメーション */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

.hero-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    z-index: 1;
}

/* スクロールアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 画像の遅延読み込み効果 */
.lazy-load {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.lazy-load.loaded {
    opacity: 1;
}

/* カードホバー効果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ボタンアニメーション */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2563EB);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

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

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* 統計カウンター */
.counter {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.counter:hover {
    transform: scale(1.1);
}

/* セクション間のスペーシング */
section {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 2rem 0;
    }
}

/* レスポンシブ画像 */
.responsive-image {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* グラデーション背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* カスタムシャドウ */
.custom-shadow {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* アニメーション遅延 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* スクロールインジケーター */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
}

/* モバイル最適化 */
@media (max-width: 640px) {
    .hero-section h2 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* タブレット最適化 */
@media (min-width: 641px) and (max-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* デスクトップ最適化 */
@media (min-width: 1025px) {
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

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

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

/* 印刷スタイル */
@media print {
    .hero-section,
    nav,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #F9FAFB;
        --text-light: #D1D5DB;
        --bg-light: #1F2937;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Onboarding Steps Animation */
.step-card {
    opacity: 0;
    transform: translateY(30px);
    animation: slide-up 0.8s ease-out forwards;
}

@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.meteor {
    position: absolute;
    top: 0;
    left: 50%;
    height: 2px;
    width: 200px;
    background: linear-gradient(-45deg, #6366f1, rgba(255, 255, 255, 0));
    transform-origin: left;
    transform: rotate(-45deg);
    animation: meteor-fall 5s linear infinite;
}

.meteor:nth-child(2) {
    top: 80px;
    left: 20%;
    animation-delay: 1.8s;
}
.meteor:nth-child(3) {
    top: 20px;
    left: 80%;
    animation-delay: 3.2s;
}
.meteor:nth-child(4) {
    top: 120px;
    left: 90%;
    animation-delay: 4.5s;
}

@keyframes meteor-fall {
    0% {
        transform: translateX(0) rotate(-45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(-500px) rotate(-45deg);
        opacity: 0;
    }
}

/* =================================
  Admin Features Section UI
==================================== */
.admin-feature-card {
    position: relative;
    background-color: white;
    border-radius: 1rem; /* rounded-2xl */
    border: 1px solid #e2e8f0; /* border-slate-200 */
    padding: 1.5rem; /* p-6 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.admin-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.admin-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    padding: 1px;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(37, 99, 235, 0.2), transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1;
}

.admin-feature-card:hover::before {
    opacity: 1;
}

.admin-feature-card > * {
    position: relative;
    z-index: 2;
}

.shine-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem; /* rounded-2xl */
}

.shine-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.4) 50%, transparent 75%);
    animation: shine 5s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(0) skewX(-20deg);
    }
    100% {
        transform: translateX(250%) skewX(-20deg);
    }
}

/* Hero Section Text Shadow */
.hero-text-shadow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Custom Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    transition: all 0.3s ease;
    transform: perspective(1px) translateZ(0);
    border: 2px solid transparent;
}

/* Primary Glow Button */
.btn-primary-glow {
    background-color: #3B82F6; /* bg-primary */
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.btn-primary-glow:hover {
    background-color: #2563EB; /* hover:bg-blue-600 */
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.8);
    transform: scale(1.05);
}

/* Secondary Outline Button */
.btn-secondary-outline {
    background-color: transparent;
    border-color: #3B82F6; /* border-primary */
    color: #F9FAFB;
}

.btn-secondary-outline:hover {
    background-color: #3B82F6; /* hover:bg-primary */
    color: white; /* hover:text-white */
    transform: scale(1.05);
}

/* Hero Section Button */
.magic-button {
    box-shadow: 0 0 0 2px theme('colors.slate.900'), 0 0 0 4px theme('colors.primary.500 / 0.8');
}

/* Magic Card Effects */
.magic-card-container {
    position: relative;
    --mouse-x: 50%;
    --mouse-y: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magic-card-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.magic-card-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 24px; /* 24px */
    background: radial-gradient(
        400px circle at var(--mouse-x) var(--mouse-y),
        rgba(60, 130, 246, 0.2), /* primary color with opacity */
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.magic-card-container:hover::before {
    opacity: 1;
}

.magic-card {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

/* Bento Grid */
.bento-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e2e8f0; /* border-slate-200 */
}

.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border-color: #3b82f6; /* border-primary */
}

.bento-card img {
    transition: transform 0.3s ease;
}

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

/* =================================
  Pricing Section UI
==================================== */
.pricing-card {
  position: relative;
  border-radius: 1.5rem; /* rounded-3xl */
  padding: 2rem; /* p-8 */
  background-color: white;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0; /* border-slate-200 */
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, #38bdf8, #818cf8, #c084fc);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card.highlight::before {
  opacity: 1;
}

.pricing-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pricing-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: #0ea5e9; /* sky-500 */
    color: white;
    font-size: 0.75rem; /* text-xs */
    font-weight: 600; /* font-semibold */
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    border-radius: 9999px; /* rounded-full */
}

.pricing-features {
    flex-grow: 1;
}

/* =================================
  CTA Button UI
==================================== */
.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: white;
    background-color: #2563eb; /* primary color */
    border: none;
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.cta-button:hover {
    background-color: #1d4ed8; /* darker primary */
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(37, 99, 235, 0.3);
}

.cta-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -200%;
    width: 200%;
    height: 100%;
    transform: skewX(-45deg);
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
}

.cta-button:hover::after {
    animation: cta-shine 0.85s ease-out;
}

@keyframes cta-shine {
    0% {
        left: -200%;
    }
    100% {
        left: 150%;
    }
}

/* Features Section SVG Icon Animation */
.feature-item:hover .feature-icon {
    animation: bounce 0.5s;
}

/* Animated Grid Background */
.animated-grid {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: moveGrid 20s linear infinite;
    mask-image: radial-gradient(ellipse 100% 50% at 50% 50%, black, transparent 80%);
}

@keyframes moveGrid {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -30px -30px;
    }
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color);
}

/* Magic CTA Button */
.magic-cta-button {
    position: relative;
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.125rem; /* text-lg */
    font-weight: 700; /* font-bold */
    color: white;
    background-color: #3b82f6; /* bg-blue-600 */
    border: none;
    border-radius: 9999px; /* rounded-full */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.magic-cta-button .shine {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

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

.magic-cta-button:hover .shine {
    left: 150%;
}

.magic-cta-button .text {
    position: relative;
    z-index: 1;
}

/* Footer Logo */
.footer-logo {
    filter: brightness(0) invert(1);
}

/* Screenshot Gallery for Admin Section */
.screenshot-gallery-admin {
    position: relative;
    width: 100%;
    height: 450px; /* Adjusted height for this section */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
}

.screenshot-gallery-admin .gallery-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.screenshot-gallery-admin .gallery-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 600px; /* Adjusted max-width */
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    z-index: 1;
    opacity: 0;
}

.screenshot-gallery-admin .screenshot-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: white;
}

.screenshot-gallery-admin .gallery-item.active {
    transform: translate(-50%, -50%) scale(1);
    z-index: 5;
    opacity: 1;
}

.screenshot-gallery-admin .gallery-item.prev-1 {
    transform: translate(-95%, -50%) scale(0.8) rotateY(40deg);
    z-index: 4;
    opacity: 0.6;
}

.screenshot-gallery-admin .gallery-item.prev-2 {
    transform: translate(-135%, -50%) scale(0.6) rotateY(40deg);
    z-index: 3;
    opacity: 0.3;
}

.screenshot-gallery-admin .gallery-item.next-1 {
    transform: translate(-5%, -50%) scale(0.8) rotateY(-40deg);
    z-index: 4;
    opacity: 0.6;
}

.screenshot-gallery-admin .gallery-item.next-2 {
    transform: translate(35%, -50%) scale(0.6) rotateY(-40deg);
    z-index: 3;
    opacity: 0.3;
}

.screenshot-gallery-admin .gallery-item.hidden-item {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 0;
}

/* --- Contact Form Styles --- */
.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #475569; /* slate-600 */
    border-radius: 0.5rem;
    padding: 1rem;
    color: #f1f5f9; /* slate-100 */
    transition: all 0.2s ease-in-out;
}

.form-input:focus,
.form-input:not(:placeholder-shown) {
    outline: none;
    border-color: #38bdf8; /* sky-400 */
    background-color: rgba(255, 255, 255, 0.08);
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #94a3b8; /* slate-400 */
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    background-color: transparent;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: #38bdf8; /* sky-400 */
    padding: 0 0.25rem;
    background-color: #1e293b; /* slate-800, to mask the input border */
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-input {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #94a3b8;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-input:checked {
    background-color: #38bdf8;
    border-color: #38bdf8;
}

.checkbox-input:checked::after {
    content: '✔';
    position: absolute;
    color: #1e293b;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
}

.checkbox-label {
    color: #cbd5e1; /* slate-300 */
    user-select: none;
}

/* === White Contact Form Styles === */
.contact-form-white .form-group {
    position: relative;
}

.contact-form-white .form-input {
    background-color: white;
    border: 1px solid #D1D5DB; /* gray-300 */
    color: #111827; /* gray-900 */
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.contact-form-white .form-input:not([readonly]):focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.contact-form-white .form-label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #6b7280;
    background-color: transparent; /* 背景を透明に */
    padding: 0 0.25rem;
    margin: 0 0.25rem;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    white-space: nowrap;
}

.contact-form-white .form-input:not(:placeholder-shown) + .form-label,
.contact-form-white .form-input:not([readonly]):focus + .form-label {
    top: 0;
    left: 0.75rem;
    transform: translateY(-50%) scale(0.85);
    color: #1e293b; /* ラベルの文字色を濃くする */
    background-color: #f8fafc; /* 入力欄の背景(slate-50)と同じ色にする */
}

.contact-form-white .checkbox-group {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    overflow: hidden;
}

.contact-form-white .checkbox-group:hover {
    border-color: #3b82f6;
    background-color: #f3f4f6;
}

.contact-form-white .checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    height: 1.25rem;
    width: 1.25rem;
    min-width: 1.25rem;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-right: 0.75rem;
    transition: all 0.2s ease-in-out;
}

.contact-form-white .checkbox-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.contact-form-white .checkbox-input::after {
    content: "";
    position: absolute;
    display: none;
    left: 0.3rem;
    top: 0.05rem;
    width: 0.4rem;
    height: 0.8rem;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.contact-form-white .checkbox-input:checked::after {
    display: block;
}

.contact-form-white .checkbox-label {
    color: #374151;
    font-weight: 500;
    user-select: none;
}