/* Enhanced Face Recognition Kiosk - Bootstrap Responsive CSS */

:root {
    /* Color palette */
    --primary-color: #2196f3;
    --primary-dark: #1976d2;
    --primary-light: #bbdefb;
    --secondary-color: #ff9800;
    --secondary-dark: #f57c00;
    --secondary-light: #ffe0b2;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --info-color: #2196f3;

    /* Light theme colors - HIGH CONTRAST */
    --background-primary: #dadada;
    --background-secondary: #eaeaea;
    --background-tertiary: #fafafa;
    --surface-color: rgba(0, 0, 0, 0.08);
    --surface-hover: rgba(0, 0, 0, 0.12);
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #555555;
    --border-color: rgba(0, 0, 0, 0.15);
    --border-hover: rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.5;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow-x: hidden;
}

/* Responsive height management */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari */
    body {
        min-height: -webkit-fill-available;
    }
}

/* Background Elements */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 12s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--background-primary) 0%,
        var(--background-secondary) 50%,
        var(--background-primary) 100%
    );
    opacity: 0.9;
}

/* Main kiosk container */
.kiosk-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Progress bar */
.progress-container {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--surface-color);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50px;
    transition: width var(--transition-normal);
    width: 25%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    padding: 0.25rem;
    transition: all var(--transition-normal);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.step-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    transition: color var(--transition-normal);
    display: none; /* Hidden on mobile by default */
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-light);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
}

.step.active .step-label {
    color: var(--text-primary);
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.step.completed .step-label {
    color: var(--text-secondary);
}

/* Header */
.kiosk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-indicators {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-color);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    min-height: 44px;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--transition-normal);
}

.indicator.active {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.indicator.active .indicator-dot {
    background: var(--success-color);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.system-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    background: var(--surface-color);
    border-radius: 0.375rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Main content */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.step-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(20px);
    transition: all var(--transition-normal);
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.step-container.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* Mobile responsive step containers */
@media (max-width: 767px) {
    .main-content {
        overflow: visible;
    }

    .step-container {
        position: relative;
        height: auto;
        overflow-y: visible;
    }

    .step-container.active {
        display: flex;
    }

    .step-container:not(.active) {
        display: none;
    }
}

/* Step 1: Face Scan - Responsive Design */
.face-scan-screen {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

@media (min-width: 768px) {
    .face-scan-screen {
        flex-direction: row;
        gap: 2rem;
    }
}

.scan-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

@media (min-width: 768px) {
    .scan-area {
        flex-direction: row;
        gap: 2rem;
    }
}

/* Camera viewport with proper height to cover blue rectangle */
.camera-viewport {
    position: relative;
    width: 100%;
    min-height: 350px;
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color var(--transition-normal);
}

@media (min-width: 768px) {
    .camera-viewport {
        min-height: 450px;
    }
}

@media (min-width: 992px) {
    .camera-viewport {
        min-height: 500px;
    }
}

@media (min-width: 1200px) {
    .camera-viewport {
        min-height: 550px;
    }
}

.camera-viewport:hover {
    border-color: var(--border-hover);
}

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

.gesture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Face detection frame */
.face-detection-frame {
    position: absolute;
    top: 20%;
    left: 20%;
    right: 20%;
    bottom: 20%;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-color);
}

.corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.scan-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.6);
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% {
        top: 10%;
        opacity: 1;
    }
    50% {
        top: 90%;
        opacity: 0.3;
    }
}

/* Quality indicator */
.quality-indicator {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 0.25rem;
    padding: 8px;
    font-size: 11px;
}

.quality-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.quality-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--error-color), var(--warning-color), var(--success-color));
    border-radius: 2px;
    transition: width var(--transition-normal);
    width: 0%;
}

.quality-text {
    color: white;
}

.scan-instructions {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    max-width: 400px;
}

.scan-tips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .scan-tips {
        grid-template-columns: 1fr 1fr;
    }
}

.tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 0.375rem;
}

.tip-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.auto-progress-info {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.auto-timer {
    position: relative;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.timer-circle {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.timer-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: white;
    transition: height 1s linear;
}

.manual-continue {
    text-align: center;
    margin-top: 1rem;
}

.continue-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Step 2: Name Input */
.name-input-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    min-height: 70vh;
}

.input-section {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.recognition-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.name-input-container {
    position: relative;
    margin-bottom: 1rem;
}

.name-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-align: center;
    transition: all var(--transition-normal);
}

.name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.name-input::placeholder {
    color: var(--text-muted);
}

.input-actions {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.name-validation {
    min-height: 1.5rem;
    margin-bottom: 1rem;
}

.confirmation-methods {
    margin-top: 2rem;
}

.method-info {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.confirmation-buttons {
    margin-top: 1rem;
}

.this-is-not-me-section {
    text-align: center;
    margin-top: 2rem;
}

.hint-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Step 3: Comfort & Location */
.comfort-location-screen {
    padding: 2rem;
    overflow-y: auto;
}

.comfort-section {
    margin-bottom: 3rem;
    text-align: center;
}

.comfort-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
}

@media (min-width: 576px) {
    .comfort-options {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.comfort-btn {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.comfort-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.comfort-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
}

.comfort-icon {
    font-size: 2rem;
}

.comfort-label {
    font-weight: 600;
    font-size: 1.125rem;
}

.comfort-description {
    font-size: 0.875rem;
    opacity: 0.8;
}

.comfort-confirmation {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.confirmation-icon {
    font-size: 1.25rem;
}

/* Location Section */
.location-section {
    margin-bottom: 2rem;
    width: 100%;
}

/* Mobile location section adjustments */
@media (max-width: 767px) {
    .location-section {
        margin-bottom: 1rem;
    }

    .location-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

.terminal-location {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.terminal-location h5 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.terminal-location-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .terminal-location-info {
        grid-template-columns: 1fr 1fr;
    }
}

.location-display {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* Mobile specific location display */
@media (max-width: 767px) {
    .location-display {
        flex-direction: column;
        gap: 1rem;
    }

    .location-map {
        order: 2; /* Show map after location info on mobile */
    }

    .location-info {
        order: 1;
    }
}

@media (min-width: 768px) {
    .location-display {
        flex-direction: row;
        gap: 3rem;
    }
}

.location-info {
    flex: 1;
}

.location-map {
    flex: 1;
    height: 250px;
    min-height: 200px;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    position: relative;
}

/* Ensure map is visible on mobile */
@media (max-width: 767px) {
    .location-map {
        height: 200px;
        min-height: 200px;
        width: 100%;
        flex: none;
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .location-map {
        height: 300px;
        min-height: 250px;
    }
}

@media (min-width: 992px) {
    .location-map {
        height: 350px;
    }
}

.location-details {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.location-actions {
    display: flex;
    gap: 0.5rem;
}

/* Manual location input */
.location-input-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.location-input-section h5 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.location-input-container {
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.location-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.location-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.location-input::placeholder {
    color: var(--text-muted);
}

.coordinate-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 576px) {
    .coordinate-inputs {
        flex-direction: row;
    }
}

.coord-group {
    flex: 1;
}

.coord-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.coord-input {
    width: 100%;
    padding: 0.5rem;
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
}

.coord-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.location-input-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.location-search-status {
    min-height: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Navigation buttons */
.navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 2rem;
}

@media (min-width: 576px) {
    .navigation-buttons {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Step 4: Success */
.success-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    min-height: 70vh;
}

.success-animation {
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.success-icon {
    margin-bottom: 1rem;
}

.checkmark-svg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: var(--success-color);
    stroke-miterlimit: 10;
    margin: 0 auto;
    animation: checkmark 0.6s ease-in-out;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--success-color);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
    fill: none;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

.success-title {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.success-summary {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    max-width: 400px;
    width: 100%;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: var(--text-muted);
}

.summary-value {
    color: var(--text-primary);
    font-weight: 500;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 576px) {
    .success-actions {
        flex-direction: row;
        gap: 1rem;
    }
}

.auto-restart-timer {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    min-height: 44px;
    font-size: 1rem;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
    color: white;
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 52px;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 36px;
    min-height: 36px;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface-color);
    color: var(--text-primary);
}

.btn-arrow {
    font-size: 1.25rem;
    line-height: 1;
}

/* Footer */
.kiosk-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.debug-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.debug-item {
    white-space: nowrap;
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
}

/* Notification system */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.notification {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-ring {
    width: 100%;
    height: 100%;
    border: 4px solid var(--surface-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Full-screen centered overlay */
.identification-pending-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.identification-pending-overlay h3 {
    color: rgba(0, 0, 0, 1);
    font-size: 24px;
    margin: 20px 0 10px 0;
    font-weight: 500;
}

.identification-pending-overlay p {
    color: rgba(0, 0, 0, 1);
    font-size: 14px;
    margin: 0 0 30px 0;
}

/* Loader - sliding line for eye movement */
.identification-pending-overlay .loader {
    width: 100%;
    max-width: 100%;
    height: 4.8px;
    display: inline-block;
    position: relative;
    background: rgba(0, 0, 255, 0.15);
    overflow: hidden;
    border-radius: 2px;
}

.identification-pending-overlay .loader::after {
    content: '';
    width: 96px;
    height: 4.8px;
    background: rgba(0, 0, 255, 0.15);
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    animation: hitZak 1s linear infinite alternate;
    border-radius: 2px;
}

@keyframes hitZak {
    0% {
        left: 0;
        transform: translateX(-1%);
    }
    100% {
        left: 100%;
        transform: translateX(-99%);
    }
}

/* Progress bar container */
.identification-pending-overlay .pending-progress {
    width: 100%;
    max-width: 80%;
    height: 4px;
    background: rgba(0, 0, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.identification-pending-overlay .pending-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
    transition: width 0.3s ease-out;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-primary);
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Final submission prompt */
.final-submission-prompt {
    text-align: center;
    margin-top: 1rem;
}

.submission-methods {
    color: var(--text-secondary);
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .step-label {
        display: none;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .camera-viewport {
        min-height: 300px;
    }

    .comfort-btn {
        padding: 1rem 0.5rem;
    }

    .scan-tips {
        grid-template-columns: 1fr;
    }

    .kiosk-header {
        flex-direction: column;
        gap: 1rem;
    }

    .status-indicators {
        justify-content: center;
    }

    .debug-info {
        justify-content: center;
        text-align: center;
    }

    .footer-actions {
        justify-content: center;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) {
    .step-label {
        display: block;
        font-size: 0.75rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .kiosk-header {
        flex-direction: row;
    }
}

/* Desktop optimizations */
@media (min-width: 992px) {
    .comfort-options {
        grid-template-columns: repeat(3, 1fr);
        max-width: 800px;
    }

    .face-scan-screen {
        gap: 3rem;
    }
}

/* Large desktop optimizations */
@media (min-width: 1200px) {
    .comfort-options {
        max-width: 900px;
    }

    .location-map {
        height: 350px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .particle {
        animation: none;
        opacity: 0.3;
    }

    .scan-line {
        animation: none;
        opacity: 0.5;
    }

    .success-animation {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #1a1a1a;
        --text-muted: #333333;
        --border-color: rgba(0, 0, 0, 0.4);
        --border-hover: rgba(0, 0, 0, 0.6);
        --surface-color: rgba(0, 0, 0, 0.1);
        --surface-hover: rgba(0, 0, 0, 0.15);
    }

    .btn {
        border-width: 3px;
    }

    .name-input,
    .location-input,
    .coord-input {
        border-width: 3px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .comfort-btn:hover {
        transform: none;
    }

    .btn:active,
    .comfort-btn:active {
        transform: scale(0.98);
        opacity: 0.8;
    }

    .indicator:hover {
        background: var(--surface-color);
    }

    .camera-viewport:hover {
        border-color: var(--border-color);
    }

    /* Improve scroll behavior on touch devices */
    body {
        -webkit-overflow-scrolling: touch;
    }

    .debug-btn { opacity: 0.6; transition: all 0.3s; }
    .debug-btn.has-face { opacity: 1; color: #00ff00; }
}

/* Print styles */
@media print {
    .kiosk-container {
        display: none;
    }
}

/* Force hardware acceleration for smooth animations */
.step-container,
.notification,
.btn,
.comfort-btn,
.particle {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Make steps look clickable when they are */
.step {
    transition: all 0.3s ease;
    user-select: none;
}

.step.clickable {
    cursor: pointer;
}

.step.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.step.not-allowed {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Visual indicator for completed steps */
.step.completed {
    position: relative;
}

.step.completed::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    color: #28a745;
    font-weight: bold;
    font-size: 0.8rem;
}


/* ===================================
   FEEDBACK STATISTICS STYLING OPTIONS
   =================================== */

/* Option 1: Statistics Cards with Icons */
.feedback-statistics-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(76, 175, 80, 0.1) 100%);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.statistics-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.3);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(33, 150, 243, 0.15);
    border-radius: 50%;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Option 2: Animated Progress Bars */
.feedback-statistics-animated {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-item-animated {
    margin-bottom: 1.5rem;
}

.stat-item-animated:last-child {
    margin-bottom: 0;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-label-animated {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.stat-value-animated {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar-custom {
    height: 20px;
    background: var(--background-secondary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill-custom {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: shimmer 2s infinite;
}

.progress-fill-custom.comfort-level {
    background: linear-gradient(90deg, var(--success-color), #81c784);
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* Option 3: Banner Style (Most Prominent) */
.feedback-statistics-banner {
    margin: 2rem 0;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(33, 150, 243, 0.4);
    position: relative;
    animation: slideInFromBottom 0.8s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.banner-icon {
    font-size: 3rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.banner-stats {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 2rem;
}

.banner-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.banner-number {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.banner-divider {
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
}

.banner-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Option 4: Minimal with Pulse Animation */
.feedback-statistics-pulse {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.pulse-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pulse-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.pulse-stat:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

.pulse-dot.sensors-active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.pulse-dot.sensors-active::before {
    background: var(--primary-color);
}

.pulse-dot.comfort-good {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.pulse-dot.comfort-good::before {
    background: var(--success-color);
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.5);
    }
}

.pulse-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.pulse-text strong {
    color: var(--primary-color);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
}

/* Shared Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design for Statistics */
@media (max-width: 767px) {
    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .banner-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .banner-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .banner-divider {
        width: 60px;
        height: 2px;
    }

    .banner-badge {
        position: static;
        margin-top: 1rem;
        align-self: center;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Additional Enhancement: Make it stand out more in the success screen */
#step4 .feedback-statistics-container,
#step4 .feedback-statistics-animated,
#step4 .feedback-statistics-banner,
#step4 .feedback-statistics-pulse {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

/* Step 1: Idle */
.idle-content {
    text-align: center;
}

.idle-content .logo {
    font-size: 64px;
    margin-bottom: 24px;
}

.idle-content h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.idle-content .instruction {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.idle-content .sub-instruction {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.btn-wake {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border: none;
    color: green;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-wake:hover {
    transform: scale(1.05);
}

.btn-wake .pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid red;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.status {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status .dot.listening {
    background: var(--success-color);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

 .gesture-feedback-container {
                margin: 20px auto;
                max-width: 400px;
            }

.gesture-feedback-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gesture-icon-large {
    font-size: 80px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.gesture-icon-large.detected {
    transform: scale(1.2);
}

.gesture-status {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
    min-height: 24px;
}

.gesture-progress-ring {
    width: 120px;
    height: 120px;
    margin: 20px auto;
    position: relative;
    display: none;
}

.gesture-progress-ring.active {
    display: block;
}

.gesture-progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.gesture-progress-ring .progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.gesture-progress-ring .progress-fill {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.1s ease;
}

.gesture-progress-ring .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
}

.gesture-hint {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hint-item {
    background: var(--surface-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.hint-item.active {
    background: rgba(76, 175, 80, 0.2);
    color: var(--text-primary);
    transform: scale(1.1);
}

.gesture-feedback-card.confirmed {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.gesture-feedback-card.confirmed .gesture-icon-large {
    color: #4CAF50;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 3: Identity Verification Scenarios
   ═══════════════════════════════════════════════════════════════════════════ */

.identity-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 60vh;
}

.identity-scenario {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 20px;
}

.identity-header {
    text-align: center;
    margin-bottom: 24px;
}

.identity-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.identity-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.identity-avatar,
.credentials-icon,
.signup-icon,
.new-user-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.identity-name-display {
    text-align: center;
    margin-bottom: 20px;
}

.identity-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.identity-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.identity-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.identity-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.identity-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.identity-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Confidence Bar */
.identity-confidence {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.confidence-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.confidence-value {
    font-weight: 600;
    color: var(--success-color);
}

/* Disambiguation Candidates */
.disambiguation-candidates {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.candidate-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.candidate-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.candidate-card.selected {
    border-color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.candidate-avatar {
    font-size: 2.5rem;
}

.candidate-info {
    flex: 1;
}

.candidate-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Two-Factor */
.two-factor-content {
    text-align: center;
}

.code-input {
    width: 200px;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 8px;
    font-family: 'JetBrains Mono', monospace;
    padding: 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Credentials & Signup Forms */
.credentials-content,
.signup-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Profile Preview */
.profile-preview-container {
    text-align: center;
    margin-bottom: 16px;
}

.profile-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-preview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Consent Section */
.consent-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.consent-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.consent-item label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
}

/* New User (Legacy) */
.new-user-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.name-input-container {
    display: flex;
    gap: 8px;
}

.name-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s;
}

.name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.name-validation {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    min-height: 24px;
}

.name-validation.valid {
    color: var(--success-color);
}

.name-validation.invalid {
    color: var(--error-color);
}

/* Step 3 Navigation */
.step3-nav {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}


/* Building Viewer */
        /* Building viewer container - needs explicit dimensions */
        .building-column {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 400px;
        }

        .building-container {
            width: 100%;
            height: 400px;
            min-height: 300px;
            border-radius: 16px;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.1);
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .building-container {
                height: 300px;
                min-height: 250px;
            }
        }

        /* Legend overlay for building viewer */
        .building-legend {
            position: absolute;
            bottom: 15px;
            left: 15px;
            background: rgba(0, 0, 0, 0.6);
            padding: 10px 15px;
            border-radius: 8px;
            font-size: 0.75rem;
            color: #888;
            pointer-events: none;
        }

        .building-legend-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 6px;
            color: #aaa;
        }

        .building-legend-gradient {
            width: 80px;
            height: 8px;
            border-radius: 4px;
            background: linear-gradient(to right, #0066ff, #00cc66, #ff3333);
        }

        .building-legend-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 4px;
            font-size: 0.6rem;
        }

        /* Building wrapper for legend positioning */
        .building-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .simulation-toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.9);
            padding: 20px 40px;
            border-radius: 12px;
            z-index: 100;
            display: none;
            text-align: center;
            border: 1px solid #4fc3f7;
        }

        .simulation-toast.active {
            display: block;
            animation: fadeInOut 2s ease;
        }

        @keyframes fadeInOut {
            0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
            20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
            80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
            100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
        }

        .simulation-toast .apt {
            font-size: 1.5rem;
            font-weight: 500;
            color: #4fc3f7;
        }

        .simulation-toast .vote {
            margin-top: 10px;
            color: #888;
        }


.info-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    padding: 16px 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(239, 83, 80, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.banner-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.banner-content {
    flex: 1;
}

.banner-message {
    color: white;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
    display: block;
}

.banner-pulse {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Easy to customize via JavaScript */
.info-banner.success {
    background: linear-gradient(135deg, #66bb6a 0%, #558b2f 100%);
}

.info-banner.warning {
    background: linear-gradient(135deg, #ffa726 0%, #f57c00 100%);
}

.info-banner.info {
    background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
}

/* Responsive Info Banner */
@media (max-width: 768px) {
    .info-banner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        text-align: center;
    }

    .banner-message {
        font-size: 14px;
    }

    .banner-pulse {
        position: static;
        transform: none;
    }
}

/* Main Landing Page Adjustments */
#step1 .row {
    margin-top: 60px; /* Offset for banner */
    padding: 40px 20px 20px;
}

/* Welcome Column */
.welcome-column {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.welcome-content {
    max-width: 80%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

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

/* Welcome Icon */
.welcome-icon {
    font-size: 64px;
    margin-bottom: 24px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Welcome Messages */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Call-to-Action Section */
.cta-section {
    margin: 40px 0;
}

.cta-primary {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.cta-secondary {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.voice-hint {
    background: var(--surface-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.cta-fallback {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Improved Wake Button */
.btn-wake {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.3);
    margin: 0 auto;
    outline: none;
    overflow: hidden;
}

.btn-wake:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(33, 150, 243, 0.4);
}

.btn-wake:active {
    transform: scale(0.98);
}

.btn-wake-pulse {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 3px solid rgba(33, 150, 243, 0.6);
    animation: expandPulse 2s ease-out infinite;
}

@keyframes expandPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.btn-wake-icon {
    font-size: 40px;
    display: block;
    position: relative;
    z-index: 1;
}

.btn-wake-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quick Info Section */
.quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--surface-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: var(--surface-hover);
    transform: translateY(-4px);
}

.info-badge {
    font-size: 28px;
    display: block;
}

.info-item span:last-child {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Building Column */
.building-column {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 0 20px;
}

.building-container {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    animation: scaleIn 0.8s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .welcome-title {
        font-size: 40px;
    }

    .cta-primary {
        font-size: 20px;
    }

    .building-container {
        height: 400px;
    }
}

@media (max-width: 992px) {
    #step1 .row {
        margin-top: 60px;
        flex-direction: column;
    }

    .welcome-column {
        margin-bottom: 40px;
    }

    .building-column {
        min-height: 400px;
    }

    .building-container {
        height: 400px;
    }

    .welcome-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    #step1 .row {
        margin-top: 60px;
        padding: 20px 16px;
    }

    .welcome-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }

    .welcome-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

    .cta-primary {
        font-size: 18px;
    }

    .cta-secondary {
        font-size: 14px;
        flex-direction: column;
        gap: 6px;
    }

    .btn-wake {
        width: 120px;
        height: 120px;
    }

    .btn-wake-icon {
        font-size: 32px;
    }

    .btn-wake-text {
        font-size: 12px;
    }

    .quick-info {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 32px;
        padding-top: 24px;
    }

    .info-item {
        padding: 12px;
        flex-direction: row;
    }

    .info-badge {
        font-size: 24px;
    }

    .building-container {
        height: 300px;
        min-height: 300px;
    }

    .building-column {
        min-height: 300px;
    }
}

/* Tablet specific */
@media (max-width: 576px) {
    .welcome-title {
        font-size: 24px;
    }

    .info-banner {
        padding: 12px 12px;
        gap: 12px;
    }

    .banner-message {
        font-size: 13px;
    }
}