:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --container-bg: #ffffff;
    --btn-bg: #ffffff;
    --btn-border: #dee2e6;
    --btn-text: #212529;
    --input-bg: #ffffff;
    --hr-color: #e9ecef;
    --accent-color: #4a90e2;
}

[data-theme='dark'] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --container-bg: #1e1e1e;
    --btn-bg: #2d2d2d;
    --btn-border: #404040;
    --btn-text: #e0e0e0;
    --input-bg: #2d2d2d;
    --hr-color: #333333;
}

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

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
}

.theme-selector {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.theme-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Service Navigation */
.service-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.nav-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--container-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.nav-btn.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

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

.card {
    background: var(--container-bg);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.action-btn, .option-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin: 1rem 0.5rem;
    transition: transform 0.2s;
}

.option-btn {
    display: inline-block;
    background: #6c757d;
}

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

/* Lotto Numbers */
#numbers-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.number-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Animal AI UI */
#webcam-container, #image-preview-container {
    margin: 2rem auto;
    max-width: 300px;
    border-radius: 20px;
    overflow: hidden;
}

#label-container {
    margin-top: 2rem;
    text-align: left;
}

.prediction-bar-container {
    margin-bottom: 1rem;
}

.prediction-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.bar-wrapper {
    height: 18px;
    background: #eee;
    border-radius: 9px;
    overflow: hidden;
}

.bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* Sections */
.contact-section, .comments-section {
    margin-top: 5rem;
    text-align: left;
}

hr {
    border: 0;
    border-top: 1px solid var(--hr-color);
    margin-bottom: 2.5rem;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--btn-border);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    border-radius: 12px;
    border: none;
    background: #333;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

[data-theme='dark'] .submit-btn {
    background: #eee;
    color: #333;
}
