:root {
    --bg-color: #0b0f1a;
    --text-color: #ffffff;
    --card-bg: #12182a;
    --ad-bg: #1c2233;
    --header-text: #ffffff;
    --btn-lock: #333333;
    --btn-lock-active: #ff4444;
    --ball-text: #ffffff;
}

[data-theme="light"] {
    --bg-color: #f0f2f5;
    --text-color: #1c1e21;
    --card-bg: #ffffff;
    --ad-bg: #e4e6eb;
    --header-text: #0b0f1a;
    --btn-lock: #cccccc;
    --btn-lock-active: #ff4444;
    --ball-text: #ffffff;
}

body {
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', sans-serif;
    transition: background 0.3s, color 0.3s;
}

/* 상단 */
.header {
    text-align: center;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    color: var(--header-text);
}

/* 테마 토글 버튼 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--text-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* 광고 영역 */
.ad-box {
    margin: 10px auto;
    width: 90%;
    max-width: 700px;
    height: 90px;
    background: var(--ad-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border-radius: 10px;
    transition: background 0.3s;
}

/* 컨테이너 */
.container {
    max-width: 700px;
    margin: auto;
    padding: 10px;
}

/* 줄 */
.row {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.3s;
}

/* 번호 영역 */
.numbers {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 17px;
    color: var(--ball-text);
}

/* 색상 */
.ball:nth-child(1){background:#fbc400;color:black;}
.ball:nth-child(2){background:#69c8f2;}
.ball:nth-child(3){background:#ff7272;}
.ball:nth-child(4){background:#aaa;}
.ball:nth-child(5){background:#b0d840;}
.ball:nth-child(6){background:#c996ff;}

/* 애니메이션 */
.roll {
    animation: roll 0.5s ease;
}

@keyframes roll {
    0% { transform: translateY(-40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* 버튼 영역 */
.actions {
    display: flex;
    justify-content: space-between;
}

button {
    flex: 1;
    margin: 3px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* 재추첨 */
.regen {
    background: #1e90ff;
    color: white;
}

.regen:hover {
    box-shadow: 0 0 10px #1e90ff;
}

/* 고정 */
.lock {
    background: var(--btn-lock);
    color: var(--text-color);
}

.lock.active {
    background: var(--btn-lock-active);
    color: white;
}

/* 전체 버튼 */
.main-btn {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #ffd400;
    color: black;
    font-size: 16px;
    border-radius: 10px;
}

.main-btn:hover {
    box-shadow: 0 0 12px #ffd400;
}

/* CTA 영역 */
.cta {
    margin-top: 20px;
    text-align: center;
    color: #aaa;
    font-size: 13px;
}
