:root {
    /* Dark Mode (Default) */
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #ffffff;
    --text-secondary: #aaaaaa;
    --border-color: #333333;
    --button-bg: #007bff;
    --button-hover: #0056b3;
    --history-bg: #2a2a2a;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    
    /* Lotto Colors */
    --lotto-1: #fbc400; /* 1-10: Yellow */
    --lotto-11: #69c8f2; /* 11-20: Blue */
    --lotto-21: #ff7272; /* 21-30: Red */
    --lotto-31: #aaa;    /* 31-40: Gray */
    --lotto-41: #b0d840; /* 41-45: Green */
}

body.light-mode {
    --bg-color: #f5f5f5;
    --container-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #eeeeee;
    --button-bg: #3498db;
    --button-hover: #2980b9;
    --history-bg: #f9f9f9;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 500px;
    background-color: var(--container-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

#theme-toggle:hover {
    background-color: var(--history-bg);
}

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

.placeholder {
    color: var(--text-secondary);
    font-style: italic;
    align-self: center;
}

.number-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.primary-btn {
    width: 100%;
    background-color: var(--button-bg);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    margin-bottom: 2rem;
}

.primary-btn:active {
    transform: scale(0.98);
}

.history-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

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

.form-group {
    margin-bottom: 0.8rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--history-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--button-bg);
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.secondary-btn {
    width: 100%;
    background-color: transparent;
    border: 1px solid var(--button-bg);
    color: var(--button-bg);
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: var(--button-bg);
    color: white;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.text-btn:hover {
    text-decoration: underline;
}

footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
