/* Wallet Unification Visualization */
.wallet-unification {
    width: 100%;
    height: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
}

.unification-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Entity icons */
.entity-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    background: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    color: #1d0c46;
    font-size: 1.5rem;
    overflow: hidden;
    z-index: 3;
    transition: all 0.3s ease;
}

.entity-icon:hover {
    transform: scale(1.1);
}

.user-icon {
    top: 20px;
    left: 20px;
}

.wallet-icon {
    bottom: 20px;
    left: 20px;
}

/* Center unified entity */
.unified-entity {
    width: 0;
    height: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}

/* Connection arrows */
.connection-arrow {
    position: absolute;
    background: #CAA968;
    z-index: 2;
}

.user-connection {
    width: 2px;
    height: 100px;
    top: 80px;
    left: 50px;
    transform: rotate(45deg);
    transform-origin: top left;
}

.wallet-connection {
    width: 2px;
    height: 100px;
    bottom: 80px;
    left: 50px;
    transform: rotate(-45deg);
    transform-origin: bottom left;
}

.data-connection {
    height: 2px;
    width: calc(100% - 200px);
    right: auto;
    left: 50px;
    top: 50%;
}

.vertical-connector {
    position: absolute;
    width: 2px;
    height: 60px;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: #CAA968;
    z-index: 2;
}

/* Data card */
.data-card {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.5s forwards;
    border: 1px solid rgba(29, 12, 70, 0.1);
}

.data-field {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.data-field:last-child {
    margin-bottom: 0;
}

.field-label {
    font-weight: 600;
    color: #1d0c46;
    display: block;
}

.field-value {
    color: #6b5b7a;
}

.wallet-address {
    font-family: monospace;
    background: rgba(29, 12, 70, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    margin-top: 0.2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(29, 12, 70, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(29, 12, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(29, 12, 70, 0); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Touch-friendly interactions for mobile */
@media (max-width: 768px) {
    .entity-icon {
        transition: all 0.2s ease;
    }
    
    .entity-icon:active {
        transform: scale(0.95);
    }
    
    .data-card {
        transition: all 0.2s ease;
    }
    
    .data-card:active {
        transform: translateY(-50%) scale(0.98);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .wallet-unification {
        padding: 0.75rem 0.5rem;
        min-height: 300px;
    }
    
    .unification-container {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
    }
    
    .entity-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .user-icon {
        top: 10px;
        left: 10px;
        position: absolute;
    }
    
    .wallet-icon {
        bottom: 10px;
        left: 10px;
        position: absolute;
    }
    
    .unified-entity {
        width: 0;
        height: 0;
    }
    
    .user-connection {
        height: 60px;
        top: 55px;
        left: 35px;
        transform: rotate(45deg);
        transform-origin: top left;
    }
    
    .wallet-connection {
        height: 60px;
        bottom: 55px;
        left: 35px;
        transform: rotate(-45deg);
        transform-origin: bottom left;
    }
    
    .data-connection {
        width: calc(100% - 120px);
        left: 35px;
        height: 2px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .vertical-connector {
        width: 2px;
        height: 280px;
        left: 35px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .data-card {
        width: calc(100% - 20px);
        max-width: 220px;
        padding: 0.875rem;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        position: absolute;
    }
    
    .data-field {
        margin-bottom: 0.35rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .wallet-address {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        margin-top: 0.15rem;
    }
}

@media (max-width: 600px) {
    .wallet-unification {
        min-height: 320px;
        padding: 0.6rem 0.4rem;
    }
    
    .entity-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .user-icon {
        top: 12px;
        left: 12px;
    }
    
    .wallet-icon {
        bottom: 12px;
        left: 12px;
    }
    
    .user-connection {
        height: 55px;
        top: 54px;
        left: 32px;
    }
    
    .wallet-connection {
        height: 55px;
        bottom: 54px;
        left: 32px;
    }
    
    .data-connection {
        width: calc(100% - 110px);
        left: 32px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .vertical-connector {
        height: 250px;
        left: 32px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .data-card {
        width: calc(100% - 24px);
        max-width: 210px;
        padding: 0.8rem;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        position: absolute;
    }
    
    .data-field {
        font-size: 0.72rem;
        margin-bottom: 0.32rem;
    }
    
    .wallet-address {
        font-size: 0.68rem;
        padding: 0.22rem 0.45rem;
    }
}

@media (max-width: 480px) {
    .wallet-unification {
        min-height: 350px;
        padding: 0.5rem 0.25rem;
    }
    
    .unification-container {
        height: 280px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
    }
    
    .entity-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .user-icon {
        top: 8px;
        left: 8px;
        position: absolute;
    }
    
    .wallet-icon {
        bottom: 8px;
        left: 8px;
        position: absolute;
    }
    
    .unified-entity {
        width: 0;
        height: 0;
    }
    
    .user-connection {
        height: 50px;
        top: 46px;
        left: 28px;
        transform: rotate(45deg);
        transform-origin: top left;
    }
    
    .wallet-connection {
        height: 50px;
        bottom: 46px;
        left: 28px;
        transform: rotate(-45deg);
        transform-origin: bottom left;
    }
    
    .data-connection {
        width: calc(100% - 100px);
        height: 2px;
        left: 28px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .vertical-connector {
        width: 2px;
        height: 220px;
        left: 28px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .data-card {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: calc(100% - 20px);
        max-width: 200px;
        padding: 0.75rem;
        animation: fadeInMobile 0.5s ease-out 0.5s forwards;
        opacity: 0;
    }
    
    @keyframes fadeInMobile {
        from { opacity: 0; transform: translateY(-50%) translateY(15px); }
        to { opacity: 1; transform: translateY(-50%); }
    }
    
    .data-field {
        margin-bottom: 0.3rem;
        font-size: 0.7rem;
        line-height: 1.25;
    }
    
    .wallet-address {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        margin-top: 0.1rem;
    }
}
