/* --- 全体的なスタイル --- */
:root {
    --primary-color: #007bff; /* SUNAOのブランドカラーに合わせて調整してください */
    --secondary-color: #f0f8ff;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --border-color: #ddd;
    --accent-color: #ffc107;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    text-align: center;
    line-height: 1.6;
}

#game-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* --- 画面制御 --- */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* --- 共通コンポーネント --- */
h1, h2, h3 {
    color: var(--primary-color);
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; border-left: 5px solid var(--primary-color); padding-left: 10px; text-align: left;}

p {
    font-size: 1rem;
    text-align: left;
}

img.main-visual {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.button {
    display: block;
    width: 80%;
    max-width: 300px;
    margin: 15px auto;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

.button-secondary {
    background: #f8f9fa;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* --- TOP/導入画面 --- */
#top-screen .catch-copy {
    font-size: 1.1rem;
    margin: 20px 0;
    padding: 0 10px;
    text-align: center;
}

/* --- 質問画面 --- */
#progress-container {
    width: 100%;
    background-color: var(--light-gray);
    border-radius: 10px;
    margin-bottom: 20px;
}

#progress-bar {
    width: 0%;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 10px;
    transition: width 0.3s ease-in-out;
}

#question-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

#question-text {
    font-size: 1.2rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.choice-button {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* --- ローディング画面 --- */
.loader {
    border: 8px solid var(--light-gray);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-text {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* --- 診断結果画面 --- */
#result-screen {
    padding: 0 10px;
}

.result-type-name {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.result-section {
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.result-section p {
    margin-top: 0;
}

.recipe-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
}

.recipe-item {
    flex-basis: 48%;
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.share-button {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
}

.twitter-button { background-color: #1DA1F2; }
.line-button { background-color: #00B900; }

/* --- レスポンシブ対応 --- */
@media (max-width: 600px) {
    body {
        background-color: #fff;
    }
    #game-container {
        margin: 0;
        padding: 15px;
        border-radius: 0;
        box-shadow: none;
    }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    p { font-size: 0.9rem; }
    .button { padding: 12px 15px; font-size: 1rem; }
    .recipe-container { flex-direction: column; }
}