:root {
    --bg-color: #f8f9fa;
    --container-bg: #ffffff;
    --text-color: #333;
    --circle-bg: #eee;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --accent-color: #6a11cb;
    --border-color: #eee;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --circle-bg: #333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --border-color: #333;
}

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

.container {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px var(--shadow-color);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#lang-toggle, .header-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.85em;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--bg-color);
    transition: all 0.2s;
}

#lang-toggle:hover, .header-link:hover {
    filter: brightness(0.9);
}

#theme-toggle {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

h1 {
    font-size: 2.2em;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    margin-bottom: 30px;
    opacity: 0.7;
    font-weight: 300;
}

#all-sets-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background-color: rgba(0,0,0,0.02);
}

body.dark-mode #all-sets-container {
    background-color: rgba(255,255,255,0.02);
}

.lotto-set {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--container-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform 0.2s;
}

.lotto-set:hover {
    transform: translateX(5px);
}

.set-label {
    font-weight: 800;
    font-size: 0.9em;
    color: var(--accent-color);
    margin-right: 15px;
    white-space: nowrap;
}

.set-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    flex-grow: 1;
}

.number-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    font-weight: bold;
    color: #222;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}

#generate-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

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

/* 스크롤바 커스텀 */
#all-sets-container::-webkit-scrollbar {
    width: 6px;
}
#all-sets-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
#all-sets-container::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 480px) {
    .lotto-set {
        flex-direction: column;
        gap: 10px;
    }
    .set-label {
        margin-right: 0;
    }
}

.contact-section {
    margin-top: 40px;
    text-align: left;
}

.contact-section hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin-bottom: 30px;
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95em;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

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

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

#submit-btn {
    width: 100%;
    background: var(--text-color);
    color: var(--container-bg);
    border: none;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#submit-btn:hover {
    opacity: 0.9;
}

/* Animal Test Styles */
#test-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#webcam-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 4px 15px var(--shadow-color);
}

#webcam-container canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 20px;
}

#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

#result-container {
    width: 100%;
    margin-top: 20px;
}

.prediction-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.label-name {
    width: 60px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: right;
}

.bar-container {
    flex-grow: 1;
    height: 15px;
    background-color: var(--circle-bg);
    border-radius: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent-color);
    transition: width 0.2s;
}

.percentage {
    width: 40px;
    font-size: 0.85em;
    font-weight: bold;
    color: var(--accent-color);
}
