/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1em;
    margin-bottom: 10px;
    opacity: 0.95;
}

.description {
    font-size: 1em;
    opacity: 0.9;
}

/* ステップインジケーター */
.step-indicator {
    display: flex;
    justify-content: space-between;
    padding: 30px 20px;
    background: #f8f9fa;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #dee2e6;
    transform: translateY(-50%);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 0.85em;
    color: #6c757d;
    text-align: center;
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

/* ステップコンテンツ */
.step-content {
    padding: 40px 20px;
    min-height: 400px;
}

.step-content.hidden {
    display: none;
}

.step-content h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

/* 選択ボタングリッド */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.selection-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    color: #333;
}

.selection-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.selection-btn:active {
    transform: translateY(-2px);
}

.selection-btn .icon {
    font-size: 2.5em;
}

.selection-btn .label {
    font-weight: 600;
}

/* 選択情報表示 */
.selected-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.selected-label {
    font-weight: 600;
    color: #667eea;
    margin-right: 10px;
}

.selected-value {
    color: #333;
    font-size: 1.1em;
}

/* 提案内容 */
.proposal-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.proposal-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.proposal-item h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.proposal-item p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.proposal-item ul {
    margin-left: 20px;
    margin-top: 10px;
}

.proposal-item li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.price-estimate {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 600;
    color: #856404;
}

/* サマリーコンテンツ */
.summary-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.summary-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-item h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

/* LINE誘導 */
.line-guide {
    text-align: center;
}

.line-guide h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
}

.instruction-list {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 30px;
    background: #f8f9fa;
    padding: 25px 25px 25px 45px;
    border-radius: 10px;
}

.instruction-list li {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 1.05em;
}

/* 画像表示コンテナ */
.image-display-container {
    text-align: center;
}

.image-save-instruction {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #ffc107;
}

.instruction-highlight {
    font-size: 1.15em;
    font-weight: 600;
    color: #856404;
    margin: 0;
    line-height: 1.6;
}

.generated-image-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.generated-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.generated-image:active {
    transform: scale(0.98);
}

.save-help-text {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.save-help-text p {
    margin-bottom: 10px;
    color: #333;
}

.save-help-text ul {
    list-style: none;
    padding: 0;
}

.save-help-text li {
    background: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-align: left;
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.next-step-box {
    background: #d4edda;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #28a745;
}

.next-step-box p {
    margin: 0;
    color: #155724;
    line-height: 1.6;
}

/* ボタンスタイル */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-primary,
.btn-save,
.btn-line,
.btn-back {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-save {
    background: #28a745;
    color: white;
}

.btn-save:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-line {
    background: #06c755;
    color: white;
}

.btn-line:hover {
    background: #05b04b;
    transform: translateY(-2px);
}

.btn-back {
    background: #6c757d;
    color: white;
    margin-top: 20px;
}

.btn-back:hover {
    background: #5a6268;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* フッター */
.footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
}

.footer p {
    margin: 5px 0;
}

/* トップに戻るボタン */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top .arrow {
    font-size: 24px;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 2em;
    }

    .button-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .step-indicator {
        padding: 20px 10px;
    }

    .step-label {
        font-size: 0.75em;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    .step-content {
        padding: 30px 15px;
    }

    .step-content h2 {
        font-size: 1.4em;
    }

    .instruction-list {
        padding: 20px 20px 20px 35px;
    }

    .instruction-highlight {
        font-size: 1.05em;
    }

    .generated-image-wrapper {
        padding: 15px;
    }

    .save-help-text ul {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .button-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .step-label {
        font-size: 0.7em;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top .arrow {
        font-size: 20px;
    }
}
