/* DX診断ツール フロントエンド CSS */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-start: #0f172a;
    --bg-end: #1e1b4b;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

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

html,
body {
    min-height: 100%;
    width: 100%;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

/* スタート画面 */
.start-section {
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.feature h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.consent {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.consent-checkbox {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ボタン */
.btn {
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
}

/* プログレスバー */
.progress-container {
    margin-bottom: 32px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* 質問 */
.question-section {
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.3rem;
    margin-bottom: 28px;
    line-height: 1.8;
    font-weight: 500;
}

/* 回答オプション */
.options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    padding: 18px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

.option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(8px);
}

.option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.option-radio {
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option.selected .option-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.option.selected .option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.option-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* 結果画面 */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

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

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--score) * 1%), rgba(255, 255, 255, 0.1) calc(var(--score) * 1%));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: scoreIn 1s ease-out;
}

@keyframes scoreIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.score-inner {
    width: 160px;
    height: 160px;
    background: var(--bg-start);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.level-badge {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 24px;
    font-weight: 600;
    margin-top: 24px;
    font-size: 1.2rem;
}

.level-beginner {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.level-intermediate {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.level-advanced {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.level-expert {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* レーダーチャート */
.radar-section {
    margin: 50px 0;
}

.radar-section h2 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.radar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.radar-chart {
    width: 320px;
    height: 320px;
}

/* カテゴリスコア */
.category-scores {
    display: grid;
    gap: 16px;
}

.category-score-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 18px 24px;
}

.category-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-name {
    font-weight: 600;
    font-size: 1rem;
}

.category-points {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.category-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 5px;
    transition: width 1s ease;
}

/* アドバイス */
.advice-section {
    margin-top: 50px;
}

.advice-section h2 {
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.advice-cards {
    display: grid;
    gap: 16px;
}

.advice-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 24px;
    border-left: 4px solid var(--primary);
}

.advice-card h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.advice-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* フォーム */
.form-section {
    margin-top: 50px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--card-border);
}

.form-section h2 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.form-section>p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label .required {
    color: var(--danger);
    margin-left: 4px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--card-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-submit {
    text-align: center;
    margin-top: 24px;
}

/* 完了 */
.complete-section {
    text-align: center;
    padding: 40px 0;
}

.complete-score {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: inline-block;
}

.complete-score-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.complete-score-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.complete-icon {
    font-size: 5rem;
    margin-bottom: 24px;
}

.complete-section h2 {
    color: var(--success);
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.complete-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.cta-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-top: 40px;
}

.cta-box h3 {
    color: var(--warning);
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-cta {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.3);
}

/* フォーム強調 */
.report-highlight {
    text-align: center;
    margin-bottom: 24px;
}

.report-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.report-highlight h2 {
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.report-highlight p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.report-highlight strong {
    color: var(--warning);
}

.report-benefits {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
}

.benefit {
    color: var(--success);
    font-size: 0.95rem;
    padding: 6px 0;
}

.email-highlight {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.2rem;
}

.privacy-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 12px;
}

.email-note {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 24px 0;
}

.email-note p {
    color: var(--accent);
    margin: 0;
}

.email-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
}

.newsletter-note {
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .features {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 24px;
    }

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

    .buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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