@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f0f2f5;
    --text-color: #333;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --container-bg: #ffffff;
}

[data-theme='dark'] {
    --primary-color: #64b5f6;
    --secondary-color: #81c784;
    --background-color: #1a1a1a;
    --text-color: #f0f0f0;
    --white: #2c2c2c;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --container-bg: #2c2c2c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%239C92AC" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--container-bg);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.container {
    text-align: center;
    padding: 2.5rem;
    background-color: var(--container-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 20px var(--shadow-color), 0 6px 6px var(--shadow-color);
    width: 90%;
    max-width: 600px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.number-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.number-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.generate-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.generate-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.5);
}

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

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-section, .comment-section {
    text-align: left;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--shadow-color);
    border-radius: 0.4rem;
    background-color: var(--white);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

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

.submit-btn {
    width: 100%;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(80, 227, 194, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 227, 194, 0.5);
}

/* Animal Test Styles */
.description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

.animal-test-section {
    margin-bottom: 2.5rem;
}

.test-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.option-btn {
    background: var(--container-bg);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.option-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.webcam-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    border-radius: 1rem;
    overflow: hidden;
}

.webcam-container canvas {
    border-radius: 1rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    max-width: 100%;
}

.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 1rem;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    background-color: var(--shadow-color);
}

.upload-label {
    font-weight: 600;
    color: var(--primary-color);
}

#image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.5rem;
}

.test-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.label-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 60px;
    font-weight: 600;
}

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

.bar-inner {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.5s ease;
}

.bar-percent {
    width: 50px;
    text-align: right;
    font-size: 0.9rem;
}
