:root {
    --bg-color: #f0f0f0;
    --container-bg: white;
    --text-color: #333;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #f0f0f0;
}

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

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

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-link {
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    background-color: rgba(0,0,0,0.05);
}

.tab-link.active {
    border-bottom: 3px solid #007bff;
    color: #007bff;
}

.tab-content {
    animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

.action-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
}

#webcam-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

#webcam-container canvas {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#label-container {
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

#label-container div {
    margin: 5px 0;
}

.top-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
}

#lang-selector {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: var(--container-bg);
    color: var(--text-color);
}

#generate-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
}

#menu-display {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.menu-item {
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    background-color: #28a745;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: popIn 0.3s ease-out;
}

.contact-section {
    margin-top: 2rem;
    text-align: left;
}

.contact-section h3 {
    text-align: center;
    margin-bottom: 1rem;
}

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

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: var(--container-bg);
    color: var(--text-color);
    box-sizing: border-box;
}

#contact-form textarea {
    height: 100px;
    resize: vertical;
}

#form-submit {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    background-color: #6c757d;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

#form-submit:hover {
    background-color: #5a6268;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}