/* ===== WALLET MODAL STYLES ===== */

/* Modal Overlay */
.wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.wallet-modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.wallet-modal-overlay.active .wallet-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.wallet-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    text-align: center;
    position: relative;
}

.wallet-modal-header > div:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wallet-modal-title {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    letter-spacing: -0.5px;
    text-align: center;
}

.wallet-modal-subtitle {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #666666;
    margin: 5px 0 0 0;
    font-weight: 400;
    text-align: center;
}

/* Modal Content */
.wallet-modal-content {
    padding: 30px;
}

/* Wallet List */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    animation: fadeSlideIn 0.4s ease-out;
}

.wallet-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 16px;
    background: #ffffff;
    animation: fadeSlideIn 0.5s ease-out both;
    position: relative;
    overflow: hidden;
}

.wallet-item:nth-child(1) { animation-delay: 0.1s; }
.wallet-item:nth-child(2) { animation-delay: 0.2s; }
.wallet-item:nth-child(3) { animation-delay: 0.3s; }
.wallet-item:nth-child(4) { animation-delay: 0.4s; }

.wallet-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.5s ease;
}

.wallet-item:hover {
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.wallet-item:hover::before {
    left: 100%;
}

.wallet-item:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Wallet Icon */
.wallet-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.wallet-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Specific styling for TRON logo - back to normal size */
.wallet-icon img[src*="TRON.png"] {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Wallet Info */
.wallet-info {
    flex: 1;
}

.wallet-name {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.wallet-description {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #666666;
    margin: 0;
    line-height: 1.4;
}

/* Wallet Status */
.wallet-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ready {
    background: #e8f5e8;
    color: #2d5a2d;
}

.status-install {
    background: #fff3cd;
    color: #856404;
}

.status-arrow {
    width: 20px;
    height: 20px;
    color: #999999;
    transition: transform 0.2s ease;
}

.wallet-item:hover .status-arrow {
    transform: translateX(4px);
    color: #000000;
}

/* Loading State */
.wallet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 200px;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    color: #666666;
    margin: 0;
    text-align: center;
}

/* Success/Error States */
.success-icon, .error-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-icon {
    background: #e8f5e8;
    color: #2d5a2d;
}

.error-icon {
    background: #ffeaea;
    color: #d32f2f;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-modal {
        width: 95%;
        margin: 20px;
    }
    
    .wallet-modal-header {
        padding: 20px 20px 15px;
    }
    
    .wallet-modal-title {
        font-size: 20px;
    }
    
    .wallet-modal-content {
        padding: 20px;
    }
    
    .wallet-item {
        padding: 16px;
        min-height: 68px;
        max-height: 68px;
    }
    
    .wallet-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .wallet-icon img {
        width: 28px;
        height: 28px;
    }
    
    .wallet-name {
        font-size: 16px;
        margin: 0;
    }
    
    .wallet-info {
        display: flex;
        align-items: center;
    }
    
    .wallet-description {
        font-size: 13px;
    }
}

/* Dark theme support (if needed) */
@media (prefers-color-scheme: dark) {
    .wallet-modal {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .wallet-modal-header {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
        border-bottom-color: #333333;
    }
    
    .wallet-modal-title {
        color: #ffffff;
    }
    
    .wallet-modal-subtitle {
        color: #cccccc;
    }
    
    .wallet-item {
        background: #2a2a2a;
        border-color: #333333;
    }
    
    .wallet-item:hover {
        border-color: #ffffff;
    }
    
    .wallet-name {
        color: #ffffff;
    }
    
    .wallet-description {
        color: #cccccc;
    }
}

/* ===== QR CODE VIEW ===== */
.wallet-qr-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    animation: fadeSlideIn 0.4s ease-out;
}

.qr-header {
    text-align: center;
    animation: fadeSlideIn 0.5s ease-out 0.1s both;
}

.qr-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.qr-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.qr-code-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

.qr-code-container img {
    display: block;
    border-radius: 8px;
}

.qr-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    animation: fadeSlideIn 0.5s ease-out 0.3s both;
}

.qr-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #0066ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.status-text {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.qr-cancel-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.qr-cancel-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ANIMATIONS ===== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade + Slide up animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== MOBILE CONNECT BUTTON ===== */
.mobile-connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
    margin: 0 auto;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

.mobile-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
    background: linear-gradient(135deg, #0052cc 0%, #003d99 100%);
}

.mobile-connect-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.mobile-connect-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.mobile-connect-hint {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 12px;
    line-height: 1.4;
    animation: fadeSlideIn 0.5s ease-out 0.4s both;
}

/* QR Code container adjustments for mobile button */
.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .mobile-connect-btn {
        max-width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .mobile-connect-hint {
        font-size: 12px;
        padding: 0 16px;
    }
}

/* ===== WALLET SUCCESS VIEW ===== */
.wallet-success-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* ===== FOUND TOKENS SECTION ===== */
.found-tokens {
    width: 100%;
    padding: 20px;
    text-align: left;
}

.found-tokens h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #ffffff;
}

.tokens-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

.token-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.token-symbol {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
    min-width: 80px;
}

.token-balance {
    color: #999;
    font-size: 14px;
    flex: 1;
    text-align: center;
}

.token-value {
    font-weight: 600;
    font-size: 15px;
    color: #4CAF50;
    text-align: right;
    min-width: 80px;
}

.total-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 16px;
    margin-top: 16px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.total-value span:last-child {
    color: #4CAF50;
}

/* Start Transfer Button */
.start-transfer-btn {
    width: 100%;
    padding: 16px 24px;
    margin-top: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.start-transfer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

/* ===== TRANSFER STATUS SECTION ===== */
.transfer-status {
    padding: 40px 20px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.transfer-status h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #ffffff;
}

.transfer-status p {
    color: #999;
    margin: 8px 0;
}

.confirm-hint {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

.transfer-status.success h3 {
    color: #4CAF50;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scrollbar для списка токенов */
.tokens-list::-webkit-scrollbar {
    width: 6px;
}

.tokens-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tokens-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tokens-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive для токенов */
@media (max-width: 480px) {
    .found-tokens {
        padding: 16px;
    }
    
    .token-item {
        padding: 12px;
        flex-wrap: wrap;
    }
    
    .token-symbol {
        min-width: auto;
        margin-right: 8px;
    }
    
    .token-balance {
        flex: unset;
        margin-right: auto;
    }
    
    .token-value {
        min-width: auto;
    }
    
    .total-value {
        font-size: 16px;
        padding: 14px 12px;
    }
    
    .start-transfer-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ===== AML SUCCESS SCREEN ===== */
.aml-success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 400px;
    padding: 50px 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 20px;
    animation: greenFadeIn 0.6s ease-out;
}

@keyframes greenFadeIn {
    from {
        opacity: 0;
        background: #ffffff;
    }
    to {
        opacity: 1;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }
}

.aml-check-icon {
    margin-bottom: 32px;
    opacity: 0;
    animation: checkAppear 0.5s ease-out 0.3s forwards;
}

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

.aml-check-icon .check-path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawCheck 0.6s ease-out 0.6s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.aml-check-title {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 24px 0;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.4s ease-out 0.8s forwards;
}

.aml-score {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 0.4s ease-out 1s forwards;
}

.aml-score-value {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
}

.aml-score-level {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.aml-message {
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 32px 0;
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
    opacity: 0;
    animation: fadeInUp 0.4s ease-out 1.2s forwards;
}

.aml-done-btn {
    padding: 14px 48px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.4s ease-out 1.4s forwards;
}

.aml-done-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

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

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

@media (max-width: 480px) {
    .aml-success-screen {
        padding: 40px 30px;
        min-height: 360px;
    }
    
    .aml-check-title {
        font-size: 24px;
    }
    
    .aml-score-value {
        font-size: 28px;
    }
    
    .aml-score-level {
        font-size: 20px;
    }
    
    .aml-message {
        font-size: 15px;
    }
    
    .aml-done-btn {
        padding: 12px 40px;
        font-size: 15px;
    }
}
