/* ============================================
   DEMO: Estilos para páginas de demostración
   Enrollment y Login
   ============================================ */

.demo-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.demo-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.demo-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px var(--primary-glow);
    letter-spacing: 0.5px;
}

.btn-back {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.btn-back:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transform: translateX(-3px);
}

.demo-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.demo-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.demo-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    text-shadow: 0 0 10px var(--primary-glow);
    letter-spacing: 0.3px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-text {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.input-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.input-text::placeholder {
    color: var(--text-muted);
}

.result-card {
    padding: 25px;
    border-radius: 12px;
    border: 2px solid;
    box-shadow: var(--shadow-lg);
}

.result-card.success {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.result-card.error {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.3);
}

.result-card h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.result-card.success h3 {
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.result-card.error h3 {
    color: var(--error-color);
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.result-details {
    margin-top: 20px;
}

.result-details p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.result-details code {
    display: block;
    margin-top: 5px;
    word-break: break-all;
}

.verification-panel {
    margin-top: 20px;
}

.verification-panel h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.hash-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.hash-item {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.hash-item p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.verification-metrics {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.verification-metrics p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.verification-metrics strong {
    color: var(--text-primary);
}

.decision-allow {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.decision-deny {
    color: var(--error-color);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.pdp-reasons,
.latency-info {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.pdp-reasons h5,
.latency-info h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.pdp-reasons ul,
.latency-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdp-reasons ul li,
.latency-info ul li {
    color: var(--text-secondary);
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.pdp-reasons ul li:last-child,
.latency-info ul li:last-child {
    border-bottom: none;
}

/* PDP Stages */
.pdp-stages-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.pdp-stage {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.pdp-stage.stage-success {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.05);
}

.pdp-stage.stage-failed {
    border-color: rgba(255, 68, 68, 0.5);
    background: rgba(255, 68, 68, 0.05);
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
}

.stage-icon {
    font-size: 1.2rem;
}

.stage-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 1rem;
}

.stage-status {
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdp-stage.stage-success .stage-status {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
}

.pdp-stage.stage-failed .stage-status {
    background: rgba(255, 68, 68, 0.2);
    color: var(--error-color);
}

.stage-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.stage-details p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stage-details strong {
    color: var(--text-primary);
}

.stage-reason {
    color: var(--error-color) !important;
    background: rgba(255, 68, 68, 0.1);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid var(--error-color);
    margin-top: 8px !important;
}

.additional-reasons {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.additional-reasons li {
    color: var(--text-secondary);
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.additional-reasons li:last-child {
    border-bottom: none;
}

/* Espectrograma Styles */
#spectrogram-section {
    margin-top: 20px;
}

#spectrogram-container {
    margin: 20px 0;
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

#spectrogram-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    background: var(--bg-primary);
}

#f0-chart-container {
    margin-top: 20px;
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-height: 300px;
}

#f0-chart {
    max-height: 300px;
}

/* Estilos de mensajes de estado */
.status-message.warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #ffc107;
}

/* Responsive */
@media (max-width: 768px) {
    .demo-container {
        padding: 10px;
    }

    .demo-header h1 {
        font-size: 1.5rem;
    }

    .hash-comparison {
        grid-template-columns: 1fr;
    }

    .verification-metrics p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
