/* pension.css */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --jo-color: #6c757d;
    --digit-1-color: #ff6b6b;
    --digit-2-color: #4ecdc4;
    --digit-3-color: #45b7d1;
    --digit-4-color: #96ceb4;
    --digit-5-color: #ffeead;
    --digit-6-color: #d4a5a5;
}

body {
    background-color: #f0f2f5;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.25rem;
    color: #34495e;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
}

/* Recent Draws */
.draw-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.draw-row:last-child {
    border-bottom: none;
}

.draw-no {
    width: 80px;
    font-weight: 700;
    color: #718096;
}

.pension-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pension-ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.jo-ball {
    background-color: #636e72;
}

.jo-label {
    font-weight: bold;
    margin-right: 10px;
    color: #636e72;
}

.digit-color-1 {
    background-color: #e84393;
}

.digit-color-2 {
    background-color: #0984e3;
}

.digit-color-3 {
    background-color: #00b894;
}

.digit-color-4 {
    background-color: #fdcb6e;
}

.digit-color-5 {
    background-color: #6c5ce7;
}

.digit-color-6 {
    background-color: #b2bec3;
}

/* Charts */
.chart-container {
    height: 300px;
}

/* Selector */
.pension-selector h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.selector-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.selector-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pos-label {
    width: 60px;
    font-weight: bold;
    color: #4a5568;
}

.ball-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pension-ball.interactive {
    cursor: pointer;
    background-color: white;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    transition: all 0.2s;
}

.pension-ball.interactive:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.pension-ball.interactive.include {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.pension-ball.interactive.exclude {
    background-color: #e53e3e !important;
    color: white !important;
    border-color: #e53e3e !important;
    text-decoration: line-through;
}

.selector-legend {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    font-size: 0.95rem;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pension-ball.mini {
    width: 20px;
    height: 20px;
    display: inline-flex;
    font-size: 0.7rem;
}

.usage-instructions {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f7ff;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.usage-instructions h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.usage-instructions ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Range Inputs shared style */
.range-inputs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #f1f5f9;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.range-inputs input {
    border: none;
    background: transparent;
    width: 60px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

.range-inputs input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.diff-no {
    margin-left: 5px;
    font-weight: 700;
    color: #2d3748;
}

/* Chart Settings Specifics */
.chart-settings {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

#refresh-chart-btn {
    margin-left: 10px;
    padding: 2px 10px;
    font-size: 0.8rem;
    border-radius: 15px;
    background-color: var(--primary-color);
    color: white;
}

/* AI Settings */
.ai-settings {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-row label {
    font-weight: 700;
    color: #4a5568;
    font-size: 0.9rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs input {
    width: 100px;
    padding: 8px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    text-align: center;
}

.range-inputs .unit {
    color: #718096;
    font-size: 0.85rem;
}

.weight-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weight-control input[type="range"] {
    flex: 1;
    cursor: pointer;
}

#weight-val {
    font-weight: 700;
    color: var(--primary-color);
    width: 30px;
    text-align: right;
}

.generation-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#game-count {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background-color: #357abd;
}

.link-btn {
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer {
    text-align: center;
    margin-top: 50px;
    padding-bottom: 40px;
}