:root {
    --bg-dark: #1a1b26;
    --card-bg: rgba(36, 40, 59, 0.95);
    --primary: #bb9af7;
    --secondary: #7aa2f7;
    --accent: #f7768e;
    --text-main: #c0caf5;
    --btn-bg: #414868;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    padding: 15px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* 背景の装飾 */
.bg-decoration {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(187, 154, 247, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(122, 162, 247, 0.1) 0%, transparent 30%);
    z-index: -1;
    pointer-events: none;
}

.container {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 550px;
    padding: 2rem 1.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(122, 162, 247, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

h1 {
    color: var(--primary);
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    line-height: 1.3;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.icon-area {
    font-size: 4rem;
    margin: 20px 0;
}

/* ボタン共通設定 */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px; /* スマホでの押しやすさ確保 */
    padding: 12px 20px;
    margin: 12px 0;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
    user-select: none;
}

.start-btn {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(187, 154, 247, 0.3);
}

.btn-option {
    background: var(--btn-bg);
    color: var(--text-main);
    justify-content: flex-start;
    text-align: left;
    line-height: 1.4;
    border: 2px solid transparent;
}

/* PCのみホバー有効化 */
@media (hover: hover) {
    .btn-option:hover {
        background: #2f3549;
        border-color: var(--secondary);
        transform: translateX(5px);
    }
}

.btn-option:active {
    background: var(--secondary);
    color: white;
    transform: scale(0.98);
}

.hidden { display: none !important; }

/* プログレスバー */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    margin-bottom: 15px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 10px;
    font-weight: bold;
}

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

/* 結果画面 */
.result-wrapper {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

#result-type {
    font-size: 1.6rem;
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(247, 118, 142, 0.3);
}

.score-area {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
}
#result-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-left: 10px;
}

#result-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(122, 162, 247, 0.1);
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

#result-params {
    list-style: none;
    padding: 0;
    text-align: left;
    font-size: 0.9rem;
    margin: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}
#result-params li {
    margin-bottom: 5px;
}

#result-text {
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: left;
}

.share-btn {
    background: #000;
    color: #fff;
    border: 1px solid #333;
}
.retry-btn {
    background: transparent;
    border: 1px solid var(--btn-bg);
    color: var(--text-main);
}