:root {
    --bg-gradient-start: #f6d365;
    --bg-gradient-end: #fda085;
    --container-bg: #fff;
    --text-color: #333;
    --shadow-color: rgba(0,0,0,0.1);
    --accent-color: #ff6b6b;
}

body.dark-mode {
    --bg-gradient-start: #2c3e50;
    --bg-gradient-end: #000000;
    --container-bg: #1a1a1a;
    --text-color: #f0f2f5;
    --shadow-color: rgba(255,255,255,0.05);
    --accent-color: #ff8787;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background-image: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    transition: background-image 0.3s ease;
}

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

header h1 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 2.5rem;
}

.subtitle {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 30px;
}

.test-section {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#label-container {
    width: 100%;
    margin-bottom: 20px;
}

.result-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    height: 30px;
    position: relative;
}

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

.bar-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 30px;
}

#loading {
    margin-top: 10px;
    color: var(--text-color);
    font-style: italic;
}

.separator {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid var(--shadow-color);
}

.affiliate-section {
    text-align: left;
}

.affiliate-section h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: bold;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: var(--container-bg);
    color: var(--text-color);
}

#submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    color: var(--text-color);
}

#theme-toggle:hover {
    background-color: var(--shadow-color);
}

/* Lotto Styles */
.lotto-section {
    margin: 30px 0;
}

.lotto-balls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #eee;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.ball.active {
    background-color: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

#lotto-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--accent-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

#lotto-btn:hover {
    transform: scale(1.05);
    background-color: #ff5252;
}

.animal-test-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.animal-test-link:hover {
    background-color: #357abd;
}

/* Animal Test Styles */
.back-link {
    display: block;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

#image-container {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    background: #eee;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#upload-placeholder {
    color: #888;
}

#upload-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--accent-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

#upload-btn:hover {
    transform: scale(1.05);
    background-color: #ff5252;
}

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }
    header h1 {
        font-size: 1.8rem;
    }
}
