:root {
    --bg-color: #f0f2f5;
    --container-bg: #ffffff;
    --text-color: #333333;
    --sub-text: #555555;
    --row-bg: #f9f9f9;
    --btn-bg: #4CAF50;
    --btn-hover: #45a049;
    --shadow: rgba(0, 0, 0, 0.1);
    --accent-color: #3f51b5;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --sub-text: #b0b0b0;
    --row-bg: #2d2d2d;
    --btn-bg: #388E3C;
    --btn-hover: #2E7D32;
    --shadow: rgba(0, 0, 0, 0.5);
    --accent-color: #7986cb;
}

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

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: auto;
    color: var(--text-color);
}

h1 { margin-bottom: 1rem; font-size: 1.8rem; }
.description { color: var(--sub-text); margin-bottom: 1.5rem; }

.divider {
    border: 0;
    height: 1px;
    background: var(--shadow);
    margin: 3rem 0;
}

/* Animal Test Styles */
.upload-box {
    background-color: var(--row-bg);
    border: 2px dashed var(--sub-text);
    border-radius: 15px;
    padding: 40px 20px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
.upload-box:hover { background-color: var(--shadow); }
.upload-icon { font-size: 3rem; display: block; margin-bottom: 10px; }

.prediction-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.result-msg {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1rem;
    color: var(--accent-color);
}

.spinner {
    border: 4px solid var(--row-bg);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Lotto Styles */
.result-area {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}
.lotto-row {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--row-bg);
    padding: 10px;
    border-radius: 10px;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}
.row-label { font-weight: bold; color: var(--sub-text); margin-right: 15px; width: 25px; }
.numbers-group { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.yellow { background-color: #fbc400; }
.blue { background-color: #69c8f2; }
.red { background-color: #ff7272; }
.gray { background-color: #aaaaaa; }
.green { background-color: #b0d840; }

.generate-btn {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

/* Form & UI */
.contact-form { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--shadow); text-align: left; }
.contact-form form { display: flex; flex-direction: column; gap: 10px; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--shadow);
    background-color: var(--row-bg); color: var(--text-color); box-sizing: border-box;
}
.contact-form button {
    background-color: var(--sub-text); color: white; border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
