body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f7fafc;
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 20px;
    color: #2d3748;
}

.container {
    width: 100%;
    max-width: 650px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

#user-status {
    font-size: 0.85rem;
    color: #a0aec0;
}

.quiz-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: opacity 0.3s;
}

.q-number {
    display: inline-block;
    background: #3182ce;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

h2 { font-size: 20px; margin-bottom: 20px; line-height: 1.5; }

/* 4択ボタン */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .options { grid-template-columns: 1fr; } }

.options button {
    padding: 15px; font-size: 16px; font-weight: bold;
    background: #fff; border: 2px solid #edf2f7; border-radius: 12px;
    cursor: pointer; transition: all 0.2s;
}

.options button:hover:not(:disabled) { border-color: #3182ce; background: #ebf8ff; }
.correct-choice { background: #3182ce !important; color: white !important; border-color: #2b6cb0 !important; }
.wrong-choice { background: #e53e3e !important; color: white !important; border-color: #c53030 !important; }

/* 記述・入力エリア */
.input-area { display: flex; flex-direction: column; gap: 15px; }
.writing-input, #nickname-input, #number-select {
    padding: 15px; font-size: 18px; border: 2px solid #edf2f7; border-radius: 12px; outline: none;
}

.submit-btn, #profile-save-btn {
    padding: 15px; font-size: 18px; background: #38a169; color: white;
    border: none; border-radius: 12px; cursor: pointer; font-weight: bold;
}

/* 表示制御用 */
.hidden { display: none; }
.hidden-content { display: none; }

.result-box { margin-top: 20px; padding: 15px; border-radius: 10px; border-left: 5px solid; }

/* ボタンを並べる設定 */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .button-group { flex-direction: column; }
}

/* 「送信のみ」ボタンの色を少し変える場合（任意） */
.secondary-btn {
    background: #4a5568 !important; /* グレー系 */
}

/* トースト通知のスタイル */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e53e3e; /* 警告の赤色 */
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10000; /* 最前面に表示 */
    font-weight: bold;
    transition: opacity 0.5s, top 0.5s;
    opacity: 0;
}

/* 表示時の状態 */
.toast.show {
    opacity: 1;
    top: 40px;
}

/* 非表示用クラス（JSで制御） */
.hidden { display: none; }