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

:root {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --primary-color: #ffde00;
    --secondary-color: #ff4d4d;
    --accent-color: #00e676;
    --header-p-color: #ccc;
    --noise-opacity: 0.1;
    --card-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --background-color: #f5f5f5;
    --text-color: #1a1a1a;
    --primary-color: #ffd600;
    --secondary-color: #ff4d4d;
    --accent-color: #00c853;
    --header-p-color: #555;
    --noise-opacity: 0.05;
    --card-bg: rgba(0, 0, 0, 0.03);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: var(--noise-opacity);
    pointer-events: none;
    z-index: -1;
}

.container {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    width: 90%;
    padding: 2rem 0;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    color: var(--header-p-color);
}

.tool-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .tool-section {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#generate-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

#generate-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--primary-color), 0 0 30px var(--primary-color);
}

/* Animal Test UI */
.animal-test .description {
    margin-bottom: 2rem;
    color: var(--header-p-color);
}

.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 20px;
    padding: 3rem;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 300px;
    margin: 0 auto;
}

.upload-area:hover {
    background: rgba(255, 222, 0, 0.05);
}

.upload-placeholder .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

#preview-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
}

.progress-bars {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-item span {
    width: 50px;
    font-weight: 600;
}

.progress-bg {
    flex-grow: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

[data-theme="light"] .progress-bg {
    background: rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.5s ease-out;
}

#dog-bar { background: #fbc400; }
#cat-bar { background: #69c8f2; }

#result-text {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 1.5rem;
}

/* Common */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#theme-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
}

#theme-btn:hover {
    background-color: var(--primary-color);
    color: #000;
}

lotto-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.contact-section {
    margin-top: 5rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .contact-section {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

[data-theme="light"] .form-group input, [data-theme="light"] .form-group textarea {
    background: #fff;
    border: 1px solid #ddd;
}

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

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

.submit-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--primary-color);
    color: #000;
}

.comments-section {
    margin-top: 5rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

[data-theme="light"] .comments-section {
    border: 1px solid rgba(0, 0, 0, 0.05);
}
