/* components.css - Компоненты для MORTAL KOMBAT */

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.modal-content {
    padding: 32px;
}

.modal-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.6;
}

/* ============================================
   WALLET OPTIONS
   ============================================ */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.wallet-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(247, 147, 26, 0.1), transparent);
    transition: left 0.5s;
}

.wallet-option:hover::before {
    left: 100%;
}

.wallet-option:hover {
    border-color: rgba(247, 147, 26, 0.5);
    background: rgba(247, 147, 26, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 147, 26, 0.15);
}

.wallet-option:active {
    transform: translateY(0);
}

.wallet-option-info {
    flex: 1;
}

.wallet-option-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.wallet-option-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.wallet-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    position: relative;
}

.wallet-status::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.wallet-status.not-detected {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.wallet-status.connecting {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   MODAL FOOTER
   ============================================ */
.modal-footer {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    max-width: 300px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #f7931a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #ffffff;
}

.loading-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Loading spinner для кнопок */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-content {
        padding: 20px;
    }

    .wallet-option {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 16px;
    }

    .modal-content {
        padding: 16px;
    }

    .wallet-options {
        gap: 12px;
    }

    .wallet-option {
        padding: 12px;
    }

    .wallet-option-name {
        font-size: 16px;
    }

    .wallet-option-desc {
        font-size: 13px;
    }
}