.union-info-card {
    background: rgba(0, 10, 20, 0.9) !important;
    position: relative;
    overflow: hidden;
}

.union-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.1) 0%,
        transparent 50%,
        rgba(255, 215, 0, 0.1) 100%);
    pointer-events: none;
}

.union-icon {
    font-size: 1.5em;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.union-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.union-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.union-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(255, 215, 0, 0.05) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.union-item:hover {
    transform: translateX(5px);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.union-item:hover::before {
    opacity: 1;
}

.union-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9em;
    position: relative;
}

/* Rank styles */
.union-item:nth-child(1) .union-rank {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.union-item:nth-child(2) .union-rank {
    background: linear-gradient(45deg, #c0c0c0, #a0a0a0);
    color: #000;
}

.union-item:nth-child(3) .union-rank {
    background: linear-gradient(45deg, #cd7f32, #a0522d);
    color: #000;
}

.union-item:nth-child(n+4) .union-rank {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.union-rank-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px;
    transition: all 0.3s ease;
}

.union-item:hover .union-rank-icon {
    border-color: rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.union-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.union-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.union-name {
    font-weight: bold;
    font-size: 1.1em;
}

.union-item:nth-child(1) .union-name {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.union-power {
    color: #00f7ff;
    font-size: 0.9em;
    font-weight: 500;
}

.union-sub-info {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}

.union-members {
    color: #98FB98;
}

/* Special effects for top union */
.union-item:first-child {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.3) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}

.union-item:first-child::after {
    content: '👑';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 1.2em;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
}

/* Hover animations */
@keyframes shine {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.union-item:hover .union-rank {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive design */
@media (max-width: 768px) {
    .union-item {
        padding: 10px;
        gap: 10px;
    }

    .union-rank {
        width: 25px;
        height: 25px;
        font-size: 0.8em;
    }

    .union-rank-icon {
        width: 35px;
        height: 35px;
    }

    .union-name {
        font-size: 1em;
    }

    .union-power, .union-sub-info {
        font-size: 0.8em;
    }
}

/* Custom scrollbar for overflow */
.union-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.3) rgba(0, 0, 0, 0.3);
}

.union-list::-webkit-scrollbar {
    width: 6px;
}

.union-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.union-list::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.union-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}