/* 基本設定 */
:root {
    --primary: #00C4FF;
    --primary-light: #66E0FF;
    --bg-dark: #0A0F1C;
    --card-bg: rgba(26, 35, 58, 0.55);
    --card-border: rgba(255, 255, 255, 0.08);
    --section-spacing: 4rem;  /* 6rem から 4rem に変更 */
    --card-spacing: 1.2rem;   /* 1.7rem から 1.2rem に変更 */
}

/* 全体レイアウト */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: var(--section-spacing) 0;
    position: relative;
}

/* タイポグラフィの調整 */
h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
    margin: 0 0 1.5rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.8rem;
    font-weight: 600;
}

h2 {
    font-size: 1.9rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 2rem;  /* 3rem から 2rem に変更 */
}

h3 {
    font-size: 1.4rem;
    font-weight: 400;
}

/* カードグリッドの共通スタイル */
.problems-grid,
.solutions-grid,
.value-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--card-spacing);
    margin: 2rem 0;
    place-items: center; /* グリッドアイテムを中央寄せ */
}

/* ガラスカードの調整 */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    padding: 1.5rem;   /* 2rem から 1.5rem に変更 */
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
    width: 100%; /* カードの幅を最大に */
    max-width: 400px; /* 最大幅を制限 */
    text-align: center; /* テキストを中央寄せ */
}

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

/* セクション間の区切り */
section::before,
section::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 80px;  /* 120px から 80px に変更 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='rgba(255,255,255,0.04)' d='M0,32L48,37.3C96,43,192,53,288,58.7C384,64,480,64,576,58.7C672,53,768,43,864,42.7C960,43,1056,53,1152,58.7C1248,64,1344,64,1392,64L1440,64L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E");
    pointer-events: none;
}

section::before {
    top: 0;
    transform: rotate(180deg);
}

section::after {
    bottom: 0;
}

/* アクセントテキストとボタン */
.accent {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    color: transparent;
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: #000;
    padding: 1.2rem 2.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 0 12px var(--primary);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px var(--primary);
}

/* ヒーローセクション */
.hero {
    min-height: 90vh;  /* 100vh から 90vh に変更 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 0;   /* 4rem から 3rem に変更 */
    position: relative;
    overflow: hidden;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(26, 35, 58, 0.2) 20%,
        rgba(10, 15, 28, 1) 80%
    );
}

/* オーブエフェクト */
.orb {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
}

.orb1 {
    background: var(--primary);
    top: 20%;
    left: 20%;
    animation: float1 18s ease-in-out infinite;
}

.orb2 {
    background: var(--primary-light);
    top: 60%;
    right: 20%;
    animation: float2 24s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-100px, 50px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(100px, -50px); }
}

/* ヒーローコンテンツ */
.hero .wrap {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    margin-bottom: 1rem;
    font-size: 3.2rem;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-light);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
}

.hero .description {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* ヒーロー部分のレスポンシブ対応 */
@media (max-width: 820px) {
    :root {
        --section-spacing: 3rem;  /* 4rem から 3rem に変更 */
        --card-spacing: 1rem;     /* 1.2rem から 1rem に変更 */
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.2rem; }

    .wrap {
        padding: 0 1rem;
        width: 90%; /* コンテナの幅を調整 */
        margin: 0 auto;
    }

    .problems-grid,
    .solutions-grid,
    .value-grid,
    .features-grid {
        grid-template-columns: 1fr; /* モバイルでは1列に */
        width: 100%;
    }

    .glass-card {
        padding: 1.2rem;
        margin: 0 auto; /* カードを中央に */
        width: calc(100% - 2rem); /* 余白を考慮した幅 */
    }

    section::before,
    section::after {
        height: 40px;  /* モバイルではさらに小さく */
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .hero .description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .orb {
        width: 160px;
        height: 160px;
    }
}

/* 追加：極小デバイス対応 */
@media (max-width: 480px) {
    .wrap {
        width: 95%;
        padding: 0 0.5rem;
    }

    .glass-card {
        padding: 1.2rem;
    }
}

/* ROIシミュレーションスタイル */
.roi-card {
    padding: 2rem;
}

.roi-input {
    margin-bottom: 2rem;  /* 3rem から 2rem に変更 */
}

.roi-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
}

.form-group .unit {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    color: var(--primary-light);
    font-size: 0.9rem;
}

/* 結果表示エリア */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.result-item {
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.result-label {
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.result-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
}

.savings .result-value {
    color: var(--primary);
}

/* ROIシミュレーション改善スタイル */
.simulation-container {
    display: grid;
    gap: 2rem;  /* 3rem から 2rem に変更 */
    padding: 1.5rem;  /* 2rem から 1.5rem に変更 */
}

.simulation-input h3,
.simulation-result h3 {
    color: var(--primary-light);
    margin-bottom: 2rem;
    text-align: center;
}

.input-wrap {
    position: relative;
    margin-bottom: 1.5rem;
}

/* 結果カード */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.result-card.highlight {
    background: rgba(0, 196, 255, 0.1);
    border-color: var(--primary);
}

.result-label {
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.result-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    color: transparent;
}

.result-period {
    font-size: 0.8rem;
    opacity: 0.7;
}

.result-detail {
    font-size: 0.9rem;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* プライシングセクション */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--card-spacing);
    margin: 1.5rem 0 3rem;  /* 2rem 0 4rem から変更 */
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;  /* 1.5rem から 1rem に変更 */
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-header {
    margin-bottom: 2rem;
    text-align: center;
}

.plan-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    display: block;
}

.plan-header h3 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

.plan-range {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 共通価格表示 */
.common-price {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 196, 255, 0.1);
    border-radius: 0.5rem;
}

.common-price .amount {
    font-size: 2.4rem;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    color: transparent;
}

.common-price .period {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 特徴リスト */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: "✓";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.feature-list li.disabled {
    opacity: 0.5;
}

.feature-list li.disabled::before {
    content: "×";
    color: rgba(255, 255, 255, 0.3);
}

/* 初期費用表示 */
.setup-fee {
    text-align: center;
    margin: 1rem 0;
}

.setup-fee .label {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
}

.setup-fee .value {
    font-size: 1.2rem;
    color: var(--primary-light);
}

.campaign-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* 統一されたCTA */
.pricing-cta {
    text-align: center;
    margin-top: 2rem;  /* 3rem から 2rem に変更 */
}

.cta-button.large {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ROIシミュレーションセクションのスタイル調整 */
.roi .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.roi-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.simulation-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* 入力フォームのスタイル改善 */
.simulation-input {
    width: 100%;
}

.roi-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-container, .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 3.5rem 0.8rem 1rem; /* 単位用の余白を確保 */
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
    text-align: right;
}

.form-group .unit {
    position: absolute;
    right: 1rem;
    color: var(--primary-light);
    font-size: 0.9rem;
    pointer-events: none;
}

/* 結果表示の改善 */
.simulation-result {
    width: 100%;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-card {
    padding: 1.5rem;
    text-align: center;
}

.result-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0.5rem 0;
    padding: 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* レスポンシブ対応 */
@media (max-width: 820px) {
    .roi-card {
        padding: 1.5rem;
    }

    .roi-form {
        grid-template-columns: 1fr;
    }

    .form-group input {
        font-size: 0.9rem;
        padding: 0.8rem 3rem 0.8rem 1rem;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 1.4rem;
    }
}

/* デモ申し込みセクションのスタイル */
.demo {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(
        135deg,
        rgba(26, 35, 58, 0.8),
        rgba(10, 15, 28, 0.9)
    );
}

.demo .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.demo p {
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.demo .cta-button.large {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
    margin: 0 auto;
}

/* レスポンシブ対応 */
@media (max-width: 820px) {
    .demo {
        padding: 3rem 1rem;
    }

    .demo p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* 入力制限の追加 */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}