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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #0f0a05, #1a1208, #120e05);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.7;
}

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

/* ===== ヘッダー ===== */
header { text-align: center; padding: 24px 0 16px; }

h1 {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.9rem;
    color: #aaa;
}

/* ===== スタート画面 ===== */
.start-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
}

.start-desc {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 24px;
    line-height: 1.8;
}

.start-emojis {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 1.4rem;
}

.start-emojis span {
    opacity: 0.8;
}

.start-btn {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 16px 48px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.start-note {
    font-size: 0.75rem;
    color: #888;
    margin-top: 12px;
}

/* ===== プログレスバー ===== */
.progress-bar {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 20px;
}

/* ===== 質問カード ===== */
.question-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    animation: fadeInUp 0.4s ease;
}

.question-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.question-text {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 28px;
    line-height: 1.6;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(245, 158, 11, 0.15);
    border-radius: 16px;
    padding: 16px 20px;
    color: #e0e0e0;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Noto Sans JP', sans-serif;
    text-align: left;
}

.choice-btn:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    transform: translateX(4px);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

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

/* ===== 分析中アニメーション ===== */
.analyzing-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
}

.sparkle-animation {
    font-size: 4rem;
    animation: sparklePulse 1.5s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes sparklePulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.2) rotate(5deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(-5deg); opacity: 1; }
    75% { transform: scale(1.25) rotate(3deg); opacity: 0.7; }
}

.analyzing-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.analyzing-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.analyzing-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.analyzing-dots span:nth-child(2) { animation-delay: 0.2s; }
.analyzing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.analyzing-sub {
    font-size: 0.85rem;
    color: #888;
}

/* ===== 結果セクション ===== */
.result-section {
    animation: fadeInUp 0.5s ease;
}

.result-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.result-label {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.result-emoji {
    font-size: 4.5rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
}

.result-name {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.result-subtitle {
    font-size: 0.95rem;
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-description {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 24px;
    text-align: left;
}

/* 特徴リスト */
.result-traits-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    margin-bottom: 12px;
}

.result-traits-box h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #fbbf24;
}

.result-traits {
    list-style: none;
    font-size: 0.85rem;
    color: #ccc;
}

.result-traits li {
    padding: 4px 0;
}

.result-traits li::before {
    content: "★ ";
    color: #f59e0b;
}

/* アドバイスボックス */
.result-advice-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    margin-bottom: 12px;
}

.result-advice-box h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #fbbf24;
}

.result-advice-box p {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.7;
}

/* 相性ボックス */
.result-compatibility-box {
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    margin-bottom: 12px;
}

.result-compatibility-box h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #fbbf24;
}

.result-compatibility-box p {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.7;
}

/* AI深層分析ボックス */
.ai-analysis-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
    margin-bottom: 4px;
    animation: fadeInUp 0.5s ease;
}

.ai-analysis-box h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-analysis-box p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.8;
}

/* ===== アクションボタン ===== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.action-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 8px;
    color: #e0e0e0;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

.action-btn:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.btn-x {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-line {
    background: rgba(6, 199, 85, 0.12);
    border-color: rgba(6, 199, 85, 0.35);
    color: #06c755;
}

.btn-line:hover {
    background: rgba(6, 199, 85, 0.22);
}

.btn-copy {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
}

.btn-retry {
    width: 100%;
}

.share-buttons {
    margin-bottom: 8px;
}

/* ===== 履歴セクション ===== */
.history-section {
    margin-top: 32px;
    animation: fadeInUp 0.5s ease;
}

.history-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fbbf24;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.history-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-name {
    font-weight: 700;
    color: #fbbf24;
}

.history-subtitle {
    font-size: 0.75rem;
    color: #aaa;
}

.history-date {
    font-size: 0.7rem;
    color: #666;
    flex-shrink: 0;
}

/* ===== トースト ===== */
.toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(245, 158, 11, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: bottom 0.3s ease;
    z-index: 100;
    white-space: nowrap;
}

.toast.show {
    bottom: 30px;
}

/* ===== フッター ===== */
footer {
    text-align: center;
    padding: 24px 0;
    font-size: 0.75rem;
    color: #666;
}

.copyright {
    margin-top: 4px;
}

/* ===== アニメーション ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== レスポンシブ ===== */
@media (max-width: 400px) {
    h1 { font-size: 1.5rem; }
    .action-buttons { grid-template-columns: 1fr; }
    .question-text { font-size: 1rem; }
    .result-name { font-size: 1.5rem; }
    .result-emoji { font-size: 3.5rem; }
}
