/* Sistema de Rotación de Tronos - Estilos CSS */

/* Marquesina Principal de Tronos - Compacta */
.throne-marquee {
    background: linear-gradient(90deg,
        rgba(45, 27, 105, 0.95),  /* Deep Purple */
        rgba(25, 25, 112, 0.9)     /* Midnight Blue */
    );
    border-bottom: 2px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    height: 50px;
}


.marquee-content {
    display: flex;
    align-items: center;
    height: 100%;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.marquee-text {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding-right: 20px;
    white-space: nowrap;
    animation: marquee-move 25s linear infinite;
}

@keyframes marquee-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Cards compactos de posiciones */
.position-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 0;
}

.position-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Estilos específicos por posición */
.position-1 {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.8),
        rgba(255, 140, 0, 0.7)
    );
    border: 1px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.position-1 .position-number {
    color: #8B4513;
    font-weight: 800;
}

.position-1 .person-name,
.position-1 .person-alliance {
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.position-2 {
    background: linear-gradient(135deg,
        rgba(192, 192, 192, 0.8),
        rgba(169, 169, 169, 0.7)
    );
    border: 1px solid rgba(192, 192, 192, 0.6);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.position-2 .position-number {
    color: #696969;
    font-weight: 700;
}

.position-2 .person-name,
.position-2 .person-alliance {
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.position-3 {
    background: linear-gradient(135deg,
        rgba(205, 127, 50, 0.8),
        rgba(184, 134, 11, 0.7)
    );
    border: 1px solid rgba(205, 127, 50, 0.6);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.position-3 .position-number {
    color: #8B4513;
    font-weight: 600;
}

.position-3 .person-name,
.position-3 .person-alliance {
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Elementos internos de las cards */
.position-number {
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.person-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-alliance {
    font-size: 10px;
    opacity: 0.8;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Separadores simples entre cards */
.card-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    margin: 0 8px;
    user-select: none;
}

/* Logos de alianza en marquesina */
.alliance-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}



/* Cards de la línea de sucesión */
.succession-card {
    background: linear-gradient(135deg, rgba(45, 27, 105, 0.9), rgba(30, 41, 59, 0.9));
    border: 2px solid rgba(139, 69, 19, 0.4);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.succession-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.succession-card:hover::before {
    left: 100%;
}

.succession-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

.succession-card.current-king {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.9), rgba(184, 134, 11, 0.9));
    border: 2px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: throne-glow 3s ease-in-out infinite;
}

@keyframes throne-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 8px 25px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 12px 30px rgba(0, 0, 0, 0.4); }
}

.succession-card.next-king {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.7), rgba(184, 134, 11, 0.7));
    border: 2px solid rgba(255, 215, 0, 0.5);
    animation: next-glow 2s ease-in-out infinite;
}

@keyframes next-glow {
    0%, 100% { border-color: rgba(255, 215, 0, 0.5); }
    50% { border-color: rgba(255, 215, 0, 0.8); }
}

/* Contenido del card */
.succession-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.succession-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 60px;
}

.position-number {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    line-height: 1;
}

.position-text {
    font-size: 10px;
    color: #FFF8DC;
    text-transform: uppercase;
}

.succession-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.succession-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
}

.succession-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    animation: avatar-ring 3s linear infinite;
}

@keyframes avatar-ring {
    0%, 100% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.succession-info {
    flex: 1;
}

.succession-name {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 2px;
}

.succession-alliance {
    font-size: 14px;
    color: #FFF8DC;
    display: flex;
    align-items: center;
    gap: 6px;
}

.alliance-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.succession-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.status-current {
    background: rgba(255, 140, 0, 0.8);
    color: #FFF;
}

.status-next {
    background: rgba(255, 215, 0, 0.8);
    color: #000;
}

.status-line {
    background: rgba(100, 100, 100, 0.6);
    color: #FFF;
}

/* Timeline visual */
.succession-timeline {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: #FFF8DC;
}

.timeline-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeline-icon {
    font-size: 12px;
}

/* Badges especiales */
.throne-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.crown-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
    animation: crown-float 3s ease-in-out infinite;
}

@keyframes crown-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(5deg); }
}

.shield-badge {
    background: linear-gradient(135deg, #4169E1, #1E40AF);
    color: #FFF;
    animation: shield-pulse 2s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .throne-marquee {
        height: 45px;
    }

    .marquee-content {
        padding: 0 12px;
    }

    .marquee-text {
        gap: 15px;
        font-size: 13px;
    }

    .position-card {
        padding: 4px 8px;
        gap: 8px;
    }

    .position-number {
        font-size: 11px;
        min-width: 18px;
    }

    .person-name {
        font-size: 12px;
    }

    .person-alliance {
        font-size: 9px;
    }

    .person-icon {
        font-size: 14px;
    }

    .card-separator {
        font-size: 14px;
        margin: 0 6px;
    }

    .succession-card {
        padding: 12px;
    }

    .succession-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .succession-name {
        font-size: 16px;
    }

    .succession-alliance {
        font-size: 12px;
    }

    .position-number {
        font-size: 16px;
    }

    .position-text {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .throne-marquee {
        height: 40px;
    }

    .marquee-content {
        padding: 0 8px;
    }

    .marquee-text {
        gap: 12px;
        font-size: 12px;
        animation: marquee-move-mobile 20s linear infinite;
    }

    @keyframes marquee-move-mobile {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }

    .position-card {
        padding: 3px 6px;
        gap: 6px;
        min-width: 80px;
    }

    .position-number {
        font-size: 10px;
        min-width: 16px;
    }

    .person-name {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
    }

    .person-alliance {
        font-size: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
    }

    .person-icon {
        font-size: 12px;
        flex-shrink: 0;
    }

    .card-separator {
        font-size: 12px;
        margin: 0 4px;
        flex-shrink: 0;
    }

    .alliance-logo {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid rgba(255, 255, 255, 0.3);
        flex-shrink: 0;
    }

    .succession-card {
        padding: 10px;
    }

    .succession-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .succession-main {
        gap: 8px;
    }

    .succession-avatar {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .succession-name {
        font-size: 15px;
    }

    .succession-alliance {
        font-size: 11px;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Loading states */
.loading-throne {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 27, 105, 0.9);
    border: 2px solid rgba(139, 69, 19, 0.4);
    border-radius: 8px;
    color: #FFD700;
    font-weight: 600;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Empty state */
.empty-throne {
    text-align: center;
    padding: 24px;
    background: rgba(45, 27, 105, 0.9);
    border: 2px solid rgba(139, 69, 19, 0.4);
    border-radius: 8px;
    color: #FFF8DC;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-action {
    font-size: 14px;
    color: #FFD700;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 6px;
    background: rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.empty-action:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.8);
}

/* Admin styles */
.drag-handle {
    cursor: move;
    user-select: none;
    touch-action: none;
}

.drag-handle:hover {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.drag-over {
    border-color: #FFD700 !important;
    background: rgba(255, 215, 0, 0.2) !important;
}

.drop-zone {
    min-height: 60px;
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF8DC;
    font-style: italic;
}

.drop-zone.active {
    border-color: #FFD700 !important;
    background: rgba(255, 215, 0, 0.1) !important;
}

/* Animaciones adicionales */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}