/*
 * Hephaestusによる診断神殿の美の法典 Ver 2.0 (真・完全無欠・自己完結版)
 */

/* ============================================= */
/* 0. 診断全体の器とスタート画面                 */
/* ============================================= */
.gacha-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px 35px 40px 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}
.action-button-container {
    text-align: center;
    margin-top: 30px;
}
#start-screen .commentary-section {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}
.omamori-button { /* 既存のスタイルを流用 */
    display: inline-flex; align-items:center; justify-content:center; gap:10px; padding: 15px 40px; font-size: 1.2em; font-weight: bold; color: #fff; background-color: var(--accent-color); border-radius: 50px; text-decoration: none; transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(255,121,0, 0.2); border: none; cursor: pointer;
}
.omamori-button:hover { background-color: #dd6b20; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,121,0, 0.3); }


/* ============================================= */
/* 1. 質問画面                                 */
/* ============================================= */
#progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid #cbd5e0;
}
#progress-bar {
    height: 25px;
    background-color: var(--secondary-color);
    text-align: right;
    color: white;
    font-weight: bold;
    line-height: 25px;
    transition: width 0.3s ease-in-out;
    padding-right: 12px;
    box-sizing: border-box;
    white-space: nowrap;
}
#question-text {
    font-size: 1.6em;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.7;
    color: #2d3748;
    font-weight: bold;
}
#answers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
#answers-list .feature-button {
    width: 100%;
    text-align: left;
    padding: 18px 25px;
    font-size: 1.1em;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    font-weight: bold;
    transition: all 0.2s ease;
    border-radius: 12px;
    cursor: pointer;
}
#answers-list .feature-button:hover {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
    transform: none; /* 他のボタンから継承した可能性のあるtransformを打ち消す */
}


/* ============================================= */
/* 2. ローディング画面                         */
/* ============================================= */
#loading-screen {
    text-align: center;
    padding: 60px 20px;
}
#loading-screen h3 {
    margin-top: 25px;
    color: var(--primary-color);
    font-size: 1.5em;
}
#loading-screen p {
    color: #718096;
    font-size: 1.1em;
}
#loading-screen .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #0055a5;
    border-radius: 50%;
    width: 60px;
    height: auto;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================= */
/* 3. 結果画面                                 */
/* ============================================= */
#result-screen h3.result-intro {
    text-align: center;
    font-size: 1.4em;
    color: #4a5568;
    margin: 0 0 5px 0;
}
#result-title {
    text-align: center;
    font-size: 2.5em;
    color: var(--primary-color);
    margin: 5px 0 10px 0;
    font-weight: bold;
}
#result-subtitle {
    text-align: center;
    font-size: 1.3em;
    color: #2d3748;
    margin: 0 0 30px 0;
    font-weight: bold;
    padding-bottom: 20px;
    border-bottom: 2px dashed #e2e8f0;
}
.result-section {
    background-color: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid var(--secondary-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

.result-section h4 {
    color: var(--primary-color);
    border-bottom: 2px solid #eaf2fa;
    padding-bottom: 10px;
    margin: 0 0 15px 0;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    font-weight: bold;
}
.result-section h4 i {
    margin-right: 12px;
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}
.result-section p {
    line-height: 1.8;
    margin: 0;
    font-size: 1.05em;
}
#score-display-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}
@media(max-width: 600px) {
    #score-display-area { grid-template-columns: 1fr; }
}
#chart-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}
#score-details { font-size: 1.1em; }
#score-details p {
    margin: 12px 0;
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #2d3748;
}
.rank { font-size: 1.6em; margin-right: 15px; width: 30px; text-align: center;}
.rank-S { color: #ff4500; }
.rank-A { color: #ff8c00; }
.rank-B { color: #0055a5; }
.rank-C { color: #718096; }
.rank-D { color: #a0aec0; }

/* 共有エリア */
#sns-share-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}
#sns-share-area .feature-button {
    font-size: 1em;
    padding: 12px 20px;
    border: none;
    color: #fff;
    text-decoration: none;
    min-width: 140px;
    transition: transform 0.2s, opacity 0.2s;
    border-radius: 8px;
}
#sns-share-area .feature-button:hover { transform: scale(1.05); opacity: 0.9; }

#retry-btn { background-color: #718096; }
#retry-btn:hover { background-color: #4a5568; }

/* ============================================= */
/* 4. 対話（コメント）の装飾                   */
/* ============================================= */
.commentary-section { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #e2e8f0; }
.commentary{min-height:90px; display:flex;align-items:flex-start;gap:15px;margin-bottom:20px;}.commentary:last-child{margin-bottom:0;}.commentary img{width:50px;height:auto;flex-shrink:0;}.commentary .bubble{padding:12px 18px;border-radius:18px;position:relative;line-height:1.7;font-size:1.05em;width:100%;}.chisamaru-comment .bubble{background-color:#ebf8ff;color:#2c5282;}.chisamaru-comment .bubble::before{content:'';position:absolute;top:15px;left:-8px;width:0;height:0;border:9px solid transparent;border-right-color:#ebf8ff;}.correct-comment{flex-direction:row-reverse;}.correct-comment .bubble{background-color:#f7fafc;color:#4a5568;}.correct-comment .bubble::before{content:'';position:absolute;top:15px;right:-8px;width:0;height:0;border:9px solid transparent;border-left-color:#f7fafc;}