:root {
    --bg-color: #f0f2f5;
    --container-bg-color: white;
    --primary-text-color: #333;
    --secondary-text-color: #666;
    --history-meta-color: #999;
    --ball-bg-color: #eee;
    --ball-text-color: #333;
    --divider-color: #eee;
    --shadow-color: rgba(0,0,0,0.1);
    --bonus-plus-color: #ccc;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg-color: #1e1e1e;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --history-meta-color: #888;
    --ball-bg-color: #333;
    --ball-text-color: #e0e0e0;
    --divider-color: #333;
    --shadow-color: rgba(255,255,255,0.05);
    --bonus-plus-color: #666;
}

body {
    font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    position: relative;
    background: var(--container-bg-color);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 500px;
    transition: background-color 0.3s;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid var(--divider-color);
    color: var(--primary-text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

h1 {
    margin: 0 0 10px 0;
    color: var(--primary-text-color);
}

.subtitle {
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
}

.numbers-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 2rem 0;
    flex-wrap: wrap;
    min-height: 60px;
}

.ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--ball-bg-color);
    color: var(--ball-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: inset -2px -2px 5px var(--shadow-color);
    transition: transform 0.2s, background-color 0.3s, color 0.3s;
}

.ball:hover {
    transform: scale(1.1);
}

.bonus-ball {
    position: relative;
}

.bonus-ball::before {
    content: '+';
    position: absolute;
    left: -18px;
    color: var(--bonus-plus-color);
    font-size: 1.2rem;
    font-weight: normal;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: filter 0.2s;
}

button:hover {
    filter: brightness(0.9);
}

.btn-generate { background-color: #4CAF50; color: white; }
.btn-copy { background-color: #2196F3; color: white; }
.btn-reset { background-color: #ff5252; color: white; }

.history {
    text-align: left;
    border-top: 1px solid var(--divider-color);
    padding-top: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider-color);
}

.history-numbers { font-weight: bold; color: var(--primary-text-color); }
.history-time { font-size: 0.8rem; color: var(--history-meta-color); }

.delete-history {
    background: none;
    color: var(--history-meta-color);
    padding: 5px;
    font-size: 0.8rem;
}

.delete-history:hover {
    color: #ff5252;
    background: none;
}

.copy-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.copy-notification.show {
    opacity: 1;
}

/* In-line style from HTML */
#historyList p {
    color: var(--history-meta-color) !important;
}