:root {
    /* Light Mode */
    --bg-gradient: linear-gradient(45deg, #fbc2eb, #a6c1ee);
    --container-bg: rgba(255, 255, 255, 0.2);
    --nav-bg: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --ball-bg: #ffffff;
    --ball-text: #333333;
    --button-bg: #ffffff;
    --button-text: #333333;
    --toggle-btn-bg: rgba(255, 255, 255, 0.3);
    --bar-bg: rgba(255, 255, 255, 0.2);
    --bar-fill: #ffffff;
}

[data-theme='dark'] {
    /* Dark Mode */
    --bg-gradient: linear-gradient(45deg, #2c3e50, #000000);
    --container-bg: rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(0, 0, 0, 0.8);
    --text-color: #f1f1f1;
    --ball-bg: #444444;
    --ball-text: #ffffff;
    --button-bg: #333333;
    --button-text: #ffffff;
    --toggle-btn-bg: rgba(0, 0, 0, 0.5);
    --bar-bg: rgba(255, 255, 255, 0.1);
    --bar-fill: #4fc3f7;
}

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    transition: background 0.5s ease;
    scroll-behavior: smooth;
}

/* Navigation Bar */
.top-nav {
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 1;
}

.container {
    text-align: center;
    background: var(--container-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    transition: all 0.5s ease;
    width: 90%;
    max-width: 800px;
    margin: 40px 0;
}

.main-header {
    margin-bottom: 30px;
}

.main-header h1 {
    font-size: 3em;
    margin: 0;
    color: var(--text-color);
}

.main-header p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Animal Test Styles */
.animal-test-section {
    margin-bottom: 40px;
}

.tool-description {
    text-align: left;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-color);
    line-height: 1.6;
}

.tool-description h3 {
    margin-top: 0;
}

.upload-container {
    margin-bottom: 30px;
}

.upload-label {
    display: block;
    cursor: pointer;
}

#image-preview-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    margin: 0 auto;
    border: 3px dashed var(--text-color);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

#image-preview-container:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

#image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

#loading-spinner {
    color: var(--text-color);
    font-weight: bold;
    margin: 10px 0;
}

.prediction-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.prediction-label {
    width: 80px;
    text-align: right;
    font-weight: bold;
    color: var(--text-color);
}

.prediction-bar {
    flex-grow: 1;
    height: 20px;
    background: var(--bar-bg);
    border-radius: 10px;
    overflow: hidden;
}

.prediction-fill {
    height: 100%;
    background: var(--bar-fill);
    transition: width 0.3s ease;
}

.prediction-percent {
    width: 50px;
    text-align: left;
    color: var(--text-color);
    font-size: 0.9em;
}

/* Lotto & Others */
.lotto-section h2 {
    color: var(--text-color);
}

.lotto-numbers-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.lotto-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--ball-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--ball-text);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.secondary-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--toggle-btn-bg);
    color: var(--text-color);
    cursor: pointer;
}

.about-section {
    color: var(--text-color);
    line-height: 1.6;
}

.divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 40px 0;
}

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

#theme-btn {
    background: var(--toggle-btn-bg);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--text-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.contact-form input, .contact-form textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: var(--container-bg);
    color: var(--text-color);
}

.submit-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--button-bg);
    color: var(--button-text);
    font-weight: bold;
    cursor: pointer;
}

.comments-section {
    margin-top: 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

/* Footer */
.site-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 0.9em;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
}
