/* Variables CSS */
:root {
    --primary-color: #19184e;
    --accent-color: #ca2026;
    --white-color: #FFFFFF;
    --gray-color: #B5b5b5;
    --black-color: #000000;
    --neon-blue: #00ffff;
    --neon-green: #00ff88;
    --cyber-purple: #8a2be2;
    --dark-bg: #0a0a0f;
}

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    color: var(--white-color);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Fondo con rejilla cibernética */
.cyber-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--primary-color);
}

/* Contenedor principal */
.main-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sección de Validación (Izquierda - 60%) */
.validation-section {
    flex: 0 0 60%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.validation-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--neon-blue), transparent);
    box-shadow: 0 0 20px var(--neon-blue);
}

/* Header de sección */
.section-header {
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
}

.title-glow {
    color: var(--white-color);
    text-shadow: 0 0 20px var(--accent-color);
    display: block;
}

.title-subtitle {
    color: var(--white-color);
    font-size: 1.8rem;
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--neon-green);
    font-size: 0.9rem;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--neon-green);
}

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

/* Pestañas de método */
.method-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 30px;
    background: rgba(25, 24, 78, 0.3);
    border-radius: 10px;
    padding: 5px;
    backdrop-filter: blur(10px);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 5px 20px rgba(202, 32, 38, 0.3);
}

.tab i {
    font-size: 1.5rem;
    color: var(--gray-color);
    transition: all 0.3s ease;
}

.tab.active i {
    color: var(--white-color);
    text-shadow: 0 0 10px var(--white-color);
}

.tab span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-color);
    transition: all 0.3s ease;
}

.tab.active span {
    color: var(--white-color);
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab.active .tab-indicator {
    transform: scaleX(1);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Área de contenido */
.content-area {
    flex: 1;
    position: relative;
}

.input-method {
    display: none;
    animation: fadeInUp 0.5s ease;
}

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

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

/* Entrada numérica */
.input-container {
    max-width: 400px;
}

.input-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.cyber-input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.cyber-input {
    width: 100%;
    padding: 20px;
    background: rgba(25, 24, 78, 0.3);
    border: 2px solid var(--gray-color);
    border-radius: 10px;
    color: var(--white-color);
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cyber-input::placeholder {
    color: var(--gray-color);
}

.cyber-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(202, 32, 38, 0.3);
    background: rgba(25, 24, 78, 0.5);
}

.input-scan-line {
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    transition: left 0.3s ease;
}

.cyber-input:focus + .input-scan-line {
    left: 100%;
}

/* Botón de validar */
.validate-btn {
    background: linear-gradient(135deg, var(--accent-color), #a01a1f);
    border: none;
    color: var(--white-color);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.validate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(202, 32, 38, 0.4);
}

.validate-btn:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.validate-btn:hover .btn-glow {
    left: 100%;
}

/* Contenedor de escáner */
.scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.scanner-frame {
    position: relative;
    width: 300px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.qr-frame {
    width: 250px;
    height: 250px;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: scanMove 2s linear infinite;
}

.barcode-line {
    animation: barcodeScan 1.5s linear infinite;
}

@keyframes scanMove {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes barcodeScan {
    0%, 100% { top: 10%; }
    50% { top: 90%; }
}

/* Indicadores de esquina para código de barras */
.corner-indicators {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--neon-blue);
}

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

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

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

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

/* Target QR */
.qr-target {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
}

.qr-corners {
    position: relative;
    width: 100%;
    height: 100%;
}

.qr-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid var(--neon-green);
}

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

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

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

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

.qr-scan-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-image: 
        linear-gradient(var(--neon-green) 1px, transparent 1px),
        linear-gradient(90deg, var(--neon-green) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.6;
    animation: gridPulse 2s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.scanner-instruction {
    color: var(--gray-color);
    font-size: 1rem;
    text-align: center;
    margin: 0;
}

.scanner-toggle {
    background: rgba(25, 24, 78, 0.5);
    border: 2px solid var(--neon-blue);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.scanner-toggle:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.scanner-toggle.active {
    background: var(--neon-green);
    color: var(--black-color);
    border-color: var(--neon-green);
}

/* Video de cámara */
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer de sección */
.section-footer {
    margin-top: auto;
    padding-top: 30px;
}

.help-links {
    display: flex;
    gap: 30px;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Sección de Resultados (Derecha - 40%) */
.results-section {
    flex: 0 0 40%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.result-state {
    display: none;
    flex: 1;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.result-state.active {
    display: flex;
}

/* Estado inicial */
.hologram-container {
    position: relative;
    margin-bottom: 30px;
}

.hologram-card {
    width: 200px;
    height: 120px;
    background: rgba(25, 24, 78, 0.3);
    border: 2px solid var(--neon-blue);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hologram-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.1) 2px,
        rgba(0, 255, 255, 0.1) 4px
    );
    animation: hologramMove 3s linear infinite;
}

@keyframes hologramMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

.card-placeholder i {
    font-size: 3rem;
    color: var(--neon-blue);
    opacity: 0.6;
}

.waiting-text {
    color: var(--gray-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.data-stream {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 200px;
}

.stream-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    animation: streamFlow 2s ease-in-out infinite;
}

.stream-line:nth-child(2) {
    animation-delay: 0.5s;
}

.stream-line:nth-child(3) {
    animation-delay: 1s;
}

@keyframes streamFlow {
    0%, 100% { opacity: 0.3; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Estado de carga */
.loading-animation {
    margin-bottom: 30px;
}

.cyber-loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.loader-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.loader-ring:nth-child(1) {
    width: 100px;
    height: 100px;
    border-top-color: var(--accent-color);
    animation-duration: 2s;
}

.loader-ring:nth-child(2) {
    width: 80px;
    height: 80px;
    top: 10px;
    left: 10px;
    border-right-color: var(--neon-blue);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.loader-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 20px;
    left: 20px;
    border-bottom-color: var(--neon-green);
    animation-duration: 1s;
}

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

.loading-text {
    color: var(--neon-blue);
    font-size: 1.1rem;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Estado válido */
.validation-header {
    margin-bottom: 30px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge.valid {
    background: linear-gradient(135deg, var(--neon-green), #00cc66);
    color: var(--black-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.status-badge.invalid {
    background: linear-gradient(135deg, var(--accent-color), #ff1a1a);
    color: var(--white-color);
    box-shadow: 0 0 30px rgba(202, 32, 38, 0.5);
}

/* Tarjeta de usuario */
.user-card {
    background: rgba(25, 24, 78, 0.4);
    border: 2px solid var(--neon-blue);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.2);
}

.user-photo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
}

.user-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white-color);
}

.photo-border-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: conic-gradient(var(--neon-blue), var(--neon-green), var(--neon-blue));
    z-index: -1;
    animation: borderRotate 3s linear infinite;
}

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

.user-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(181, 181, 181, 0.2);
}

.info-field:last-child {
    border-bottom: none;
}

.field-label {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.field-value {
    color: var(--white-color);
    font-size: 1rem;
    font-weight: 600;
}

.access-level {
    background: var(--neon-green);
    color: var(--black-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Estado inválido */
.error-display {
    text-align: center;
    margin-bottom: 30px;
}

.error-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    animation: errorPulse 2s ease-in-out infinite;
}

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

.error-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.error-message {
    color: var(--gray-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.error-code {
    background: rgba(202, 32, 38, 0.2);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Botón nueva validación */
.new-validation-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--neon-blue));
    border: 2px solid var(--neon-blue);
    color: var(--white-color);
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    justify-content: center;
}

.new-validation-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
    background: linear-gradient(135deg, var(--neon-blue), var(--primary-color));
}

.new-validation-btn.retry {
    background: linear-gradient(135deg, var(--accent-color), #ff4444);
    border-color: var(--accent-color);
}

.new-validation-btn.retry:hover {
    background: linear-gradient(135deg, #ff4444, var(--accent-color));
    box-shadow: 0 10px 30px rgba(202, 32, 38, 0.4);
}

/* Efectos de fondo */
.cyber-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, var(--neon-blue), transparent),
                      radial-gradient(2px 2px at 40px 70px, var(--neon-green), transparent),
                      radial-gradient(1px 1px at 90px 40px, var(--accent-color), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    opacity: 0.3;
}

@keyframes particleFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -200px); }
}

.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    animation: scanLinesMove 10s linear infinite;
}

@keyframes scanLinesMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .validation-section,
    .results-section {
        flex: none;
    }
    
    .validation-section {
        padding: 30px 20px;
    }
    
    .results-section {
        padding: 30px 20px;
        min-height: 50vh;
    }
    
    .validation-section::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .title-subtitle {
        font-size: 1.4rem;
    }
    
    .method-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab {
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 15px;
    }
    
    .scanner-frame {
        width: 250px;
        height: 150px;
    }
    
    .qr-frame {
        width: 200px;
        height: 200px;
    }
    
    .user-card {
        padding: 20px;
    }
    
    .info-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .validation-section,
    .results-section {
        padding: 20px 15px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .scanner-frame,
    .qr-frame {
        width: 200px;
        height: 120px;
    }
    
    .cyber-input {
        padding: 15px;
        font-size: 1rem;
    }
    
    .validate-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Animaciones de entrada */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.validation-section {
    animation: slideInLeft 0.8s ease;
}

.results-section {
    animation: slideInRight 0.8s ease;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.tab:focus,
.validate-btn:focus,
.scanner-toggle:focus,
.new-validation-btn:focus {
    outline: 2px solid var(--neon-blue);
    outline-offset: 2px;
}

.cyber-input:focus {
    outline: none;
}

/* Estados de carga específicos */
.processing {
    pointer-events: none;
    opacity: 0.7;
}

.processing .validate-btn {
    background: var(--gray-color);
    cursor: not-allowed;
}

/* Efectos hover mejorados */
.tab,
.validate-btn,
.scanner-toggle,
.new-validation-btn {
    will-change: transform;
}

/* Optimización de rendimiento */
.hologram-card,
.cyber-loader,
.photo-border-glow {
    will-change: transform;
    backface-visibility: hidden;
}

/* Estilos adicionales para efectos dinámicos */
@keyframes particleFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

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

@keyframes globalScan {
    0% { top: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) translateX(0); }
    100% { transform: translateY(-100px) translateX(50px); }
}

.shake-animation {
    animation: shake 0.6s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.reset-animation {
    animation: resetPulse 0.5s ease-in-out;
}

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

.code-detected {
    animation: detectionFlash 1s ease-in-out;
}

@keyframes detectionFlash {
    0%, 100% { border-color: var(--neon-blue); }
    50% { border-color: var(--neon-green); box-shadow: 0 0 30px var(--neon-green); }
}

.switching {
    opacity: 0.5;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-color), #ff4444);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(202, 32, 38, 0.3);
}

.error-notification.show {
    transform: translateX(0);
}

.low-performance * {
    animation-duration: 0.1s !important;
}

.paused-animations * {
    animation-play-state: paused !important;
}

.sound-success .pulse-dot {
    background: var(--neon-green);
    box-shadow: 0 0 20px var(--neon-green);
}

.sound-error .pulse-dot {
    background: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

.sound-detection .pulse-dot {
    background: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
}