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

:root {
    --primary-color: #ffd93d;
    --primary-dark: #f5c518;
    --secondary-color: #ffb4d1;
    --accent-color: #a8e6cf;
    --success-color: #95e1d3;
    --bg-gradient: linear-gradient(135deg, #fff9c4 0%, #ffd93d 50%, #ffb4d1 100%);
    --text-dark: #4a4a4a;
    --text-light: #7a7a7a;
    --bg-light: #fffef7;
    --border-color: #fff9e6;
    --shadow: 0 4px 6px -1px rgba(255, 217, 61, 0.2), 0 2px 4px -1px rgba(255, 217, 61, 0.15);
    --shadow-lg: 0 10px 15px -3px rgba(255, 217, 61, 0.3), 0 4px 6px -2px rgba(255, 217, 61, 0.2);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* スクリーン切り替え */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スタート画面 */
.hero {
    background: var(--bg-gradient);
    color: white;
    padding: 60px 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.hero-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.intro-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
}

.intro-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.pattern-preview {
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 12px;
}

.pattern-preview h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.pattern-card {
    background: #fffef9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid #fff5cc;
}

.pattern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pattern-emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.pattern-card p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.test-info {
    margin: 30px 0;
    padding: 20px;
    background: #fffef7;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

.test-info p {
    margin: 8px 0;
    color: var(--text-dark);
    font-weight: 500;
}

.test-info i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* ボタン */
.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: var(--shadow);
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-share {
    background: var(--secondary-color);
    color: white;
}

.btn-share:hover {
    background: #db2777;
}

/* 診断画面 */
.progress-bar {
    background: #e5e7eb;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: var(--bg-gradient);
    height: 100%;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.question-container {
    background: white;
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
    line-height: 1.6;
    color: var(--text-dark);
}

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

.btn-answer {
    padding: 20px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-answer i {
    font-size: 1.5rem;
}

.btn-answer:nth-child(1) i {
    color: #ff6b9d;
}

.btn-answer:nth-child(2) i {
    color: #ffa500;
}

.btn-answer:nth-child(3) i {
    color: #a0a0a0;
}

.btn-answer:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    background: #fffef7;
}

.btn-answer:active {
    transform: scale(0.98);
}

/* 戻るボタン */
.back-button-container {
    margin-top: 30px;
    text-align: center;
}

.btn-back {
    padding: 12px 30px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: white;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-back:hover {
    border-color: var(--primary-color);
    color: var(--text-dark);
    background: var(--bg-light);
}

.btn-back i {
    font-size: 0.9rem;
}

/* 結果画面 */
.result-hero {
    background: var(--bg-gradient);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.result-hero h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
}

.result-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.result-emoji {
    font-size: 5rem;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

#result-type-name {
    font-size: 2rem;
    font-weight: 700;
}

.result-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.result-section {
    margin-bottom: 40px;
}

.result-section:last-of-type {
    margin-bottom: 30px;
}

.result-section h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-description {
    font-size: 1.1rem;
    line-height: 1.8;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 30px;
}

.characteristics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.characteristic-item {
    padding: 15px 20px;
    background: #e8f8f5;
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.characteristic-item i {
    color: var(--accent-color);
    margin-top: 3px;
}

.message {
    padding: 25px;
    background: #ffebf5;
    border-left: 4px solid var(--secondary-color);
    border-radius: 10px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.solutions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.solution-item {
    padding: 20px;
    background: #fffef7;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.solution-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: 700;
    margin-right: 10px;
}

.solution-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.solution-desc {
    color: var(--text-light);
    line-height: 1.6;
}

/* スコアバー */
.scores-section {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
}

.score-bar {
    margin-bottom: 20px;
}

.score-bar:last-child {
    margin-bottom: 0;
}

.score-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.score-type {
    color: var(--text-dark);
}

.score-percentage {
    color: var(--primary-color);
    font-weight: 600;
}

.score-bar-bg {
    background: white;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd93d 0%, #95e1d3 100%);
    border-radius: 10px;
    transition: width 1s ease-out;
    width: 0%;
}

.score-bar.top .score-bar-fill {
    background: linear-gradient(90deg, #ffd93d 0%, #ffb4d1 100%);
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.action-buttons .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

/* フッター */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .intro-content {
        padding: 25px;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .pattern-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .question-container {
        padding: 30px 20px;
        min-height: 350px;
    }
    
    .question-text {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }
    
    .btn-answer {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .result-content {
        padding: 25px;
    }
    
    #result-type-name {
        font-size: 1.5rem;
    }
    
    .result-emoji {
        font-size: 4rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        min-width: unset;
    }
}