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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* メイン画像 */
.main-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 40px;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* カード */
.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.form-label.required::after {
    content: ' *';
    color: #dc2626;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.checkbox-item:hover {
    background-color: #f9fafb;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-size: 0.95rem;
}

/* スタートアップグリッド */
.startup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.startup-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.startup-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.startup-card.selected {
    border-color: #667eea;
    background-color: #eef2ff;
}

.startup-logo {
    width: 100%;
    max-width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 12px;
}

.startup-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* アラート */
.alert {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* テーブル */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.table tr:hover {
    background-color: #f9fafb;
}

/* マッチングリスト */
.matching-list {
    list-style: none;
}

.matching-item {
    background: white;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.matching-item h3 {
    color: #1f2937;
    margin-bottom: 12px;
}

.matching-item .meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.matching-item .message {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

/* ステップインジケーター */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    right: 50%;
    height: 2px;
    background-color: #e5e7eb;
    z-index: -1;
}

.step:first-child::before {
    display: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 8px;
}

.step.active .step-number {
    background-color: #667eea;
    color: white;
}

.step.completed .step-number {
    background-color: #10b981;
    color: white;
}

.step.completed::before {
    background-color: #10b981;
}

.step-label {
    font-size: 0.875rem;
    color: #6b7280;
}

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

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.875rem;
    }

    .container,
    .container-narrow {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    .startup-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .startup-card {
        padding: 15px;
    }

    .startup-logo {
        max-width: 100px;
        height: 100px;
    }

    .steps {
        padding: 0;
    }

    .step {
        font-size: 0.75rem;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    .startup-grid {
        grid-template-columns: 1fr;
    }
}

/* ローディング */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ユーティリティ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

/* フッター */
.footer {
    background: #1f2937 !important;
    color: #9ca3af !important;
    text-align: center !important;
    padding: 30px 20px !important;
    margin-top: 60px !important;
    font-size: 0.9rem !important;
    width: 100%;
    clear: both;
}

.footer p {
    margin: 0 !important;
    line-height: 1.8 !important;
    color: #9ca3af !important;
}
