:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --primary-color: #4a90e2;
    --text-color: #333;
    --sub-text: #666;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --ball-placeholder: #ddd;
    --ball-placeholder-text: #999;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --primary-color: #64b5f6;
    --text-color: #f0f0f0;
    --sub-text: #aaa;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --ball-placeholder: #444;
    --ball-placeholder-text: #777;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    position: relative;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    width: 90%;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

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

#theme-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

header p {
    color: var(--sub-text);
    margin-top: 0.5rem;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.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;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ball.placeholder {
    background-color: var(--ball-placeholder);
    color: var(--ball-placeholder-text);
    box-shadow: none;
}

/* Lotto Ball Colors */
.ball-1 { background-color: #fbc400; } /* 1-10 */
.ball-11 { background-color: #69c8f2; } /* 11-20 */
.ball-21 { background-color: #ff7272; } /* 21-30 */
.ball-31 { background-color: #aaa; }    /* 31-40 */
.ball-41 { background-color: #b0d840; } /* 41-45 */

.generate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    background-color: #357abd;
}

.generate-btn:active {
    transform: translateY(0);
}

.contact-section {
    margin-top: 3rem;
    text-align: left;
}

.contact-section hr {
    border: 0;
    border-top: 1px solid var(--ball-placeholder);
    margin-bottom: 2rem;
}

.contact-section h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--ball-placeholder);
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    box-sizing: border-box;
}

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

.submit-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #999;
}
