:root {
    --primary-color: #4a47a3;
    --secondary-color: #706fd3;
    --background-color: #f2f2f2;
    --container-bg: #ffffff;
    --text-color: #333;
    --glow-color: #9c99e9;
    --bar-bg: #e0e0e0;
}

body.dark-theme {
    --primary-color: #9c99e9;
    --secondary-color: #706fd3;
    --background-color: #1a1a2e;
    --container-bg: #16213e;
    --text-color: #e94560;
    --glow-color: #e94560;
    --bar-bg: #0f3460;
}

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

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 600px;
    width: 90%;
    margin: 2rem 0;
    position: relative;
    transition: background-color 0.3s;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

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

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.main-nav a.active, .main-nav a:hover {
    background-color: var(--primary-color);
    color: white;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.input-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background-color: var(--bar-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

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

.input-section {
    display: none;
    margin-bottom: 2rem;
}

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

.drop-zone {
    height: 200px;
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
}

.drop-zone:hover {
    background-color: rgba(74, 71, 163, 0.1);
}

.drop-zone__input {
    display: none;
}

.preview-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
}

#webcam-container canvas {
    border-radius: 10px;
    max-width: 100%;
    margin-top: 1rem;
}

.result-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bar-bg);
    border-radius: 15px;
}

.result-bar-wrapper {
    margin-bottom: 1rem;
    text-align: left;
}

.result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.progress-bar {
    height: 20px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

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

.conclusion-msg {
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Common form styles */
.form-container { margin-top: 3rem; text-align: left; }
.form-container hr { border: 0; border-top: 1px solid var(--primary-color); margin-bottom: 2rem; opacity: 0.3; }
.form-container h3 { color: var(--primary-color); margin-bottom: 1rem; text-align: center; }
.form-container form { display: flex; flex-direction: column; gap: 1rem; }
.form-container input, .form-container textarea { padding: 0.8rem; border: 1px solid var(--primary-color); border-radius: 8px; background-color: var(--container-bg); color: var(--text-color); }
.form-container button[type="submit"] { background-color: var(--secondary-color); color: white; border: none; padding: 0.8rem; border-radius: 8px; cursor: pointer; font-weight: bold; }
.disqus-container { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--primary-color); }
