/* Temporal QR Demo Styles - Adapted for Dark Theme */

/* Demo Container */
.demo-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.demo-title {
    color: var(--gold);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.temporal-demo-area {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.qr-display-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

/* QR Monitor Styles */
.qr-monitor {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.monitor-frame {
    width: 300px;
    height: 260px;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 12px;
    border: 3px solid #333;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.qr-content {
    width: 100%;
    height: 100%;
    background: #fff; /* QR needs white background */
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qr-image {
    width: 140px;
    height: 140px;
    transition: all 0.1s ease; /* Faster transition for rotation */
}

.frame-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid var(--primary);
}

.monitor-stand {
    width: 80px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    margin-top: 10px;
    position: relative;
}

.monitor-stand::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 8px;
    background: #444;
    border-radius: 4px;
}

/* Micro Change Region */
#change-region {
    position: absolute;
    border: 2px dashed var(--danger, #ff4444);
    background: rgba(255, 68, 68, 0.2);
    pointer-events: none;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: none;
}

/* Reassembly Display */
.reassembly-display {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: var(--bg-card); /* Dark background for reassembly */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
}

.reassembly-section {
    width: 100%;
    text-align: center;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
    justify-items: center;
}

.qr-mini-fragment {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    background: rgba(0, 242, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    min-width: 50px;
    transition: all 0.3s ease;
}

.qr-mini-fragment.collected {
    background: rgba(0, 255, 157, 0.1);
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

.mini-fragment-qr {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    filter: invert(1); /* Invert for dark mode if needed, or keep as is */
}

.mini-fragment-text {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-mono);
}

.reorder-arrow {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    margin: 4px 0;
    animation: arrow-pulse 1s ease-in-out infinite;
}

.decrypted-message {
    text-align: center;
    animation: message-reveal 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(8px);
    margin-top: 4px;
}

.final-message {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--success);
    font-family: var(--font-mono);
    padding: 6px 12px;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 4px;
    border: 1px solid var(--success);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
}

/* Biometrics Waiting */
#biometrics-waiting {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 20px;
}

#auth-complete {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.success-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 15px;
}

/* Phone Scanner Styles */
.phone-scanner {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.phone-body {
    width: 160px;
    height: 300px;
    background: #1a1a1a;
    border-radius: 25px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid #444;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.scanner-interface {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.scanner-overlay {
    width: 100px;
    height: 100px;
    position: relative;
    margin-bottom: 20px;
}

.scanner-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.scanner-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.scanner-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.scanner-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.scanner-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    opacity: 0;
}

.mini-qr-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #fff;
    padding: 2px;
    display: none;
}

.mini-qr-image {
    width: 100%;
    height: 100%;
}

.collection-status {
    text-align: center;
    width: 100%;
}

.frame-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.frame-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.frame-dot.collected {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.scan-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Biometric Scanner on Phone */
.biometric-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.biometric-sensor {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    cursor: pointer;
    position: relative;
}

.biometric-sensor i {
    font-size: 1.5rem;
    color: var(--primary);
}

.scan-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
}

/* Timeline */
.timeline-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-title {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.timeline-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.timeline-step.active {
    opacity: 1;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
}

.timeline-step.active .step-number {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px var(--primary);
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--gold);
}

.step-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Animations */
@keyframes arrow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes message-reveal {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
