:root {
    --primary-color: #a8dadc;
    --secondary-color: #457b9d;
    --bg-color: #f1faee;
    --card-bg: #ffffff;
    --accent-color: #457b9d;
    --inactive-color: #f0f0f0;
    --text-color: #1d3557;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

h1 {
    color: var(--secondary-color);
    font-weight: bold;
    letter-spacing: 2px;
}

.container {
    max-width: 600px;
    width: 100%;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #666;
}

/* モード切替ボタン */
.mode-buttons {
    display: flex;
    gap: 10px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--secondary-color);
    border-radius: 30px;
    background: white;
    color: var(--secondary-color);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.mode-btn.active {
    background: var(--secondary-color);
    color: white;
}

/* タグチップのスタイル */
.tag-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-chip {
    padding: 8px 18px;
    background: var(--inactive-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid transparent;
}

.tag-chip.active {
    background: var(--primary-color);
    color: var(--secondary-color);
    font-weight: bold;
    border-color: var(--secondary-color);
}

button#gacha-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.4rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 6px 0 #294d63;
    transition: all 0.1s;
    margin-top: 10px;
}

button#gacha-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* メッセージ表示エリア */
#message-area {
    margin-top: 20px;
    text-align: center;
    color: var(--accent-color);
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.results {
    margin-top: 20px;
}

.result-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.item-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 6px;
}

.total-info {
    margin-top: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 15px;
    text-align: center;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--secondary-color);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.item-tag-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: #e0f2f1;
    color: #00796b;
    border-radius: 4px;
    margin-right: 4px;
}
