/**
 * Proof of Work Challenge Modal Styles
 * Style: Technical/Honest - Shows real computation data
 */

/* Modal Container */
.pow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pow-modal.visible {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.pow-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.pow-modal-content {
    position: relative;
    background: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.pow-modal.visible .pow-modal-content {
    transform: scale(1);
}

/* Header */
.pow-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #2d2d44;
}

.pow-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pow-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.pow-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Body */
.pow-body {
    padding: 24px;
}

.pow-description {
    font-size: 14px;
    color: #a0a0b0;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

/* Progress Bar */
.pow-progress-container {
    margin-bottom: 20px;
}

.pow-progress-bar {
    height: 8px;
    background: #2d2d44;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pow-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #22c55e 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

.pow-progress-fill.pow-error {
    background: #ef4444;
}

.pow-progress-text {
    font-size: 13px;
    color: #a0a0b0;
    text-align: center;
}

.pow-progress-text.pow-error {
    color: #ef4444;
}

/* Stats Grid */
.pow-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.pow-stat {
    text-align: center;
}

.pow-stat-label {
    display: block;
    font-size: 11px;
    color: #6b6b80;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pow-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #22c55e;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Hash Display */
.pow-hash-display {
    background: #0d0d1a;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    padding: 12px 16px;
}

.pow-hash-label {
    display: block;
    font-size: 11px;
    color: #6b6b80;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pow-hash-value {
    display: block;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #a0a0b0;
    word-break: break-all;
}

.pow-hash-zeros {
    color: #22c55e;
    font-weight: 600;
}

.pow-hash-rest {
    color: #6b6b80;
}

/* Footer */
.pow-footer {
    padding: 16px 24px;
    border-top: 1px solid #2d2d44;
    text-align: center;
}

.pow-footer-text {
    font-size: 12px;
    color: #6b6b80;
}

/* Success State */
.pow-success .pow-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.pow-icon-success svg {
    color: white;
}

.pow-success-stats {
    background: #0d0d1a;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    padding: 16px;
}

.pow-success-stat {
    margin-bottom: 16px;
}

.pow-success-label {
    display: block;
    font-size: 11px;
    color: #6b6b80;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pow-success-hash {
    display: block;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #22c55e;
    background: #0a1f0a;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #22c55e33;
}

.pow-success-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pow-success-item {
    text-align: center;
}

.pow-success-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.pow-footer-success {
    color: #22c55e;
}

/* Animation for computing */
@keyframes pow-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pow-progress-fill {
    animation: pow-pulse 1.5s ease-in-out infinite;
}

/* Compact Modal for Quick Validation */
.pow-modal-compact {
    max-width: 380px;
}

.pow-modal-compact .pow-body {
    padding: 20px 24px;
}

.pow-modal-compact .pow-description {
    display: none;
}

/* Quick Validation Progress */
.pow-progress-quick {
    background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
    animation: none;
}

.pow-success-text {
    color: #22c55e;
}

/* Validating Icon Animation */
.pow-icon-validating {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.pow-icon-validating svg {
    animation: pow-spin 1.5s linear infinite;
}

@keyframes pow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .pow-modal-content {
        margin: 16px;
        width: calc(100% - 32px);
    }

    .pow-header {
        padding: 16px 20px;
    }

    .pow-body {
        padding: 20px;
    }

    .pow-stats {
        gap: 12px;
    }

    .pow-stat-value {
        font-size: 14px;
    }

    .pow-hash-value {
        font-size: 11px;
    }
}
