/* ------------- リセット・基本設定 ------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --secondary-color: #2c3e50;
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --success-color: #27ae60;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --focus-shadow: rgba(231, 76, 60, 0.3);
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: url('../img/bg1.png');
    background-size: 800px auto;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* ------------- ヘッダー画像 ------------- */
.header-image {
    width: 800px;
    height: auto;
    margin: 0 auto;
    display: block;
}

@media (max-width: 800px) {
    .header-image {
        width: 100%;
    }
}

/* ------------- ロゴ ------------- */
.site-logo {
    text-align: center;
    margin: 2rem auto;
    max-width: 200px;
    transition: all 0.3s ease;
}

.site-logo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

@media (max-width: 600px) {
    .site-logo {
        max-width: 150px;
        margin: 1rem auto;
    }
}

@media (max-width: 800px) {
    body {
        background-size: 100% auto;
    }
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none;
}

/* ------------- クイズセクション ------------- */
#choices-container {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.choice-btn {
    background-color: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem;
    text-align: left;
    transition: all 0.3s;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .choice-btn {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

.choice-btn.correct {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.choice-btn.incorrect {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

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

#score-display {
    margin-top: 1.5rem;
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
}

#judgment {
    text-align: center;
    font-size: 3rem;
    margin: 1rem 0;
    font-weight: bold;
    transition: color 0.3s ease;
}

#judgment.correct {
    color: #27ae60;
}

#judgment.incorrect {
    color: #e74c3c;
}

@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

#judgment.correct,
#judgment.incorrect {
    animation: pop 0.3s ease-out forwards;
}

#timer-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
    height: 6px;
}

#timer-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width linear;
    border-radius: 4px;
    box-shadow: 0 1px 2px var(--shadow-color);
}

/* ------------- サイト説明・SNS・アフィリエイト ------------- */
.description {
    text-align: center;
    display: none;
}

.description h1 {
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    font-size: 2.2rem;
    padding-bottom: 1rem;
    letter-spacing: 0.05em;
}

.description h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.description p {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.description p:last-child {
    margin-bottom: 0;
}

.share-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.share-text {
    margin-bottom: 1rem;
    text-align: center;
    color: var(--secondary-color);
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button.x-twitter {
    background-color: #000000;
}

.share-button.facebook {
    background-color: #4267B2;
}

.share-button.line {
    background-color: #00B900;
}

#result-section {
    text-align: center;
}

#result-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#result-section p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.result-share {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ------------- 情報源・商品一覧 ------------- */
.references-title {
    color: var(--primary-color);
    text-align: center;
    font-size: 2rem;
    margin: 2rem 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.1em;
}

.references-list {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 2rem 0 3rem;
    list-style: disc;
}

.references-list .product-item {
    list-style: none;
    margin-left: -1rem;
}

.references-list li {
    margin: 1.5rem 0;
}

.references-list li.product-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.other-sources li {
    margin: 0.25rem 0;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.references-list a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.references-list a:hover {
    text-decoration: underline;
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: var(--primary-dark);
}

/* ------------- アフィリエイト ------------- */
.affiliate-section {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.affiliate-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.affiliate-items {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.affiliate-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow-color);
}

/* ------------- ボタン ------------- */
.button-center {
    text-align: center;
    margin: 2rem 0;
}

.action-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    overflow: hidden;
}

.action-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.action-button:focus {
    box-shadow: 0 0 0 3px var(--focus-shadow);
}

/* ------------- 商品一覧(references.html専用) ------------- */
.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: 1rem;
}

.product-image {
    max-width: 100px;
    height: auto;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 1.1em;
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 1em;
    color: #555;
}

.other-sources {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.other-sources li {
    margin: 0.5rem 0;
}

.other-sources a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1em;
}

.other-sources a:hover {
    text-decoration: underline;
}

/* ------------- アクセスカウンター ------------- */
.counter {
    text-align: center;
    margin-top: 2rem;
}

.counter-text {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

#access-counter {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ------------- 情報源リンク ------------- */
.references-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.references-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.references-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ------------- 利用規約リンク ------------- */
.terms-link {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

.terms-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.terms-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ------------- レスポンシブ ------------- */
@media (max-width: 600px) {
    .container {
        margin: 1rem auto;
    }
    h1 {
        font-size: 2rem;
    }
    .section {
        padding: 1.5rem;
    }
    .choice-btn {
        font-size: 1rem;
        padding: 0.8rem;
    }
    .affiliate-section h2 {
        font-size: 1.2rem;
    }
}
