/* ==================== Главное меню ==================== */
body {
    background: #0f0f0f;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* ==================== Экраны ==================== */
.screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== Главное меню ==================== */
.logo {
    font-size: 64px;
    margin-bottom: 16px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    margin-bottom: 40px;
    font-size: 16px;
}

/* ==================== Кнопки ==================== */
.btn-lg {
    width: 100%;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-lg:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #333;
    color: #fff;
}

.btn-secondary:hover {
    background: #444;
}

.icon {
    font-size: 22px;
}

/* ==================== Камера ==================== */
.camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.overlay-border {
    width: 70%;
    height: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.overlay-text {
    position: absolute;
    bottom: 20%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==================== Статус ==================== */
.status-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #888;
    font-size: 14px;
    margin-bottom: 12px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Результаты ==================== */
.result-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 8px 0;
}

.result-label {
    color: #888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    margin-top: 12px;
}

.result-confidence {
    color: #4f46e5;
    font-size: 14px;
    margin-top: 12px;
}

.no-result .result-icon {
    font-size: 40px;
}

/* ==================== Кнопки в группе ==================== */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.button-group .btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

/* ==================== Адаптивность ==================== */
@media (max-height: 600px) {
    .logo { font-size: 48px; }
    h1 { font-size: 24px; }
    .subtitle { margin-bottom: 24px; }
    .btn-lg { padding: 14px 24px; font-size: 16px; }
}
