/* ================================================
   ProjectNXT - Faction Selector Styles
   Interactive hero faction selection system
   ================================================ */

/* -------------------- Faction Hero Layout -------------------- */
.faction-hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.faction-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center bottom,
            rgba(196, 30, 58, 0.3) 0%,
            rgba(13, 13, 13, 0.95) 50%,
            rgba(5, 5, 5, 1) 100%);
    transition: background 0.8s ease;
    z-index: -1;
}

/* Faction-specific background colors */
.faction-hero[data-faction="dragon"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(196, 30, 58, 0.4) 0%,
            rgba(13, 13, 13, 0.95) 50%,
            rgba(5, 5, 5, 1) 100%);
}

.faction-hero[data-faction="serpent"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(30, 138, 58, 0.4) 0%,
            rgba(13, 13, 13, 0.95) 50%,
            rgba(5, 5, 5, 1) 100%);
}

.faction-hero[data-faction="leopard"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(212, 160, 23, 0.4) 0%,
            rgba(13, 13, 13, 0.95) 50%,
            rgba(5, 5, 5, 1) 100%);
}

.faction-hero[data-faction="sky"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(107, 91, 149, 0.5) 0%,
            rgba(13, 13, 13, 0.95) 50%,
            rgba(5, 5, 5, 1) 100%);
}

/* -------------------- Sky Clan Video Background -------------------- */
.sky-clan-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.faction-hero[data-faction="sky"] .sky-clan-video {
    opacity: 0.5;
}

.faction-hero[data-faction="sky"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(107, 91, 149, 0.6) 0%,
            rgba(13, 13, 13, 0.8) 40%,
            rgba(5, 5, 5, 0.95) 100%);
}

/* -------------------- Serpent Video Background -------------------- */
.serpent-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.faction-hero[data-faction="serpent"] .serpent-video {
    opacity: 0.5;
}

.faction-hero[data-faction="serpent"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(30, 138, 58, 0.6) 0%,
            rgba(13, 13, 13, 0.8) 40%,
            rgba(5, 5, 5, 0.95) 100%);
}

/* -------------------- Dragon Video Background -------------------- */
.dragon-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.faction-hero[data-faction="dragon"] .dragon-video {
    opacity: 0.5;
}

.faction-hero[data-faction="dragon"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(196, 30, 58, 0.6) 0%,
            rgba(13, 13, 13, 0.8) 40%,
            rgba(5, 5, 5, 0.95) 100%);
}

/* -------------------- Leopard Video Background -------------------- */
.leopard-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.faction-hero[data-faction="leopard"] .leopard-video {
    opacity: 0.5;
}

.faction-hero[data-faction="leopard"] .faction-bg-gradient {
    background: radial-gradient(ellipse at center bottom,
            rgba(212, 160, 23, 0.6) 0%,
            rgba(13, 13, 13, 0.8) 40%,
            rgba(5, 5, 5, 0.95) 100%);
}

/* -------------------- Faction Selector Container -------------------- */
.faction-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    gap: 20px;
    position: relative;
    z-index: 10;
}

/* -------------------- Navigation Arrows -------------------- */
.faction-nav {
    width: 60px;
    height: 60px;
    background: rgba(26, 26, 26, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.faction-nav:hover {
    background: rgba(201, 162, 39, 0.2);
    border-color: var(--color-gold);
    transform: scale(1.1);
}

.faction-nav:active {
    transform: scale(0.95);
}

.nav-arrow {
    font-size: 2.5rem;
    color: var(--color-gold);
    line-height: 1;
}

/* -------------------- Faction Display Area -------------------- */
.faction-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex: 1;
    max-width: 900px;
}

/* Side Silhouettes */
.faction-side {
    display: flex;
    align-items: center;
    gap: 20px;
}

.faction-side-left {
    flex-direction: row;
}

.faction-side-right {
    flex-direction: row-reverse;
}

.faction-silhouette {
    width: 100px;
    height: 200px;
    position: relative;
    opacity: 0.4;
    transform: scale(0.8);
    transition: all 0.4s ease;
    cursor: pointer;
}

.faction-silhouette:hover {
    opacity: 0.6;
    transform: scale(0.85);
}

.faction-silhouette[data-position="-1"],
.faction-silhouette[data-position="1"] {
    width: 120px;
    height: 240px;
    opacity: 0.5;
    transform: scale(0.9);
}

.silhouette-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(50, 50, 50, 0.8) 0%,
            rgba(30, 30, 30, 0.9) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(15% 0%, 85% 0%, 100% 15%, 100% 100%, 0% 100%, 0% 15%);
}

.silhouette-placeholder span {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Silhouette with image */
.silhouette-placeholder.has-image {
    background: transparent;
    clip-path: none;
}

.silhouette-image,
video.silhouette-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: brightness(0.5) saturate(0.3);
    transition: filter 0.3s ease;
}

.faction-silhouette:hover .silhouette-image,
.faction-silhouette:hover video.silhouette-image {
    filter: brightness(0.7) saturate(0.5);
}

/* -------------------- Main Faction Character -------------------- */
.faction-main {
    position: relative;
    width: 350px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faction-spotlight {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 40px;
    background: radial-gradient(ellipse,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 70%);
    border-radius: 50%;
    animation: spotlightPulse 3s ease-in-out infinite;
}

@keyframes spotlightPulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }
}

.faction-character {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 5;
    transition: all 0.5s ease;
}

.character-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(60, 60, 60, 0.6) 0%,
            rgba(40, 40, 40, 0.8) 50%,
            rgba(30, 30, 30, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    backdrop-filter: blur(5px);
    transition: all 0.5s ease;
    overflow: hidden;
}

/* Character placeholder with image */
.character-placeholder.has-image {
    background: transparent;
    backdrop-filter: none;
}

.character-image,
video.character-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.faction-hero[data-faction="dragon"] .character-placeholder {
    border-color: rgba(196, 30, 58, 0.5);
    box-shadow: 0 0 40px rgba(196, 30, 58, 0.3);
}

.faction-hero[data-faction="serpent"] .character-placeholder {
    border-color: rgba(30, 138, 58, 0.5);
    box-shadow: 0 0 40px rgba(30, 138, 58, 0.3);
}

.faction-hero[data-faction="leopard"] .character-placeholder {
    border-color: rgba(212, 160, 23, 0.5);
    box-shadow: 0 0 40px rgba(212, 160, 23, 0.3);
}

.faction-hero[data-faction="sky"] .character-placeholder {
    border-color: rgba(107, 91, 149, 0.5);
    box-shadow: 0 0 40px rgba(107, 91, 149, 0.3);
}

.faction-name-badge {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--color-gold);
    padding: 10px 25px;
    border-radius: 4px;
    z-index: 10;
}

.badge-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gold);
    white-space: nowrap;
}

/* -------------------- Faction Indicators -------------------- */
.faction-indicators {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    z-index: 10;
}

.faction-indicator {
    width: 40px;
    height: 40px;
    background: rgba(26, 26, 26, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faction-indicator:hover {
    border-color: var(--color-gold);
    transform: translateY(-3px);
}

.faction-indicator.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    transform: scale(1.1);
}

.faction-indicator.active .indicator-icon {
    color: var(--color-dark);
}

.faction-indicator.rogue {
    border-color: rgba(107, 91, 149, 0.5);
}

.faction-indicator.rogue:hover {
    border-color: #6b5b95;
}

.faction-indicator.rogue.active {
    background: #6b5b95;
    border-color: #6b5b95;
}

.indicator-icon {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* -------------------- Info Panel -------------------- */
.faction-info-panel {
    position: relative;
    margin-top: 40px;
    width: 90%;
    max-width: 700px;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    z-index: 20;
    overflow: hidden;
}

.info-panel-inner {
    padding: 30px 40px;
}

.info-header {
    text-align: center;
    margin-bottom: 20px;
}

.info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.info-faction-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 5px;
    transition: color 0.5s ease;
}

.faction-hero[data-faction="dragon"] .info-faction-name {
    color: #c41e3a;
}

.faction-hero[data-faction="serpent"] .info-faction-name {
    color: #1e8a3a;
}

.faction-hero[data-faction="leopard"] .info-faction-name {
    color: #d4a017;
}

.faction-hero[data-faction="sky"] .info-faction-name {
    color: #6b5b95;
}

.info-motto {
    font-style: italic;
    color: var(--color-gold);
    font-size: 0.95rem;
}

.info-description {
    text-align: center;
    margin-bottom: 25px;
}

.info-description p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* -------------------- Stats Bars -------------------- */
.info-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    font-weight: 600;
}

.stat-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: var(--color-gold);
    border-radius: 3px;
    transition: width 0.8s ease, background 0.5s ease;
}

.faction-hero[data-faction="dragon"] .stat-fill {
    background: #c41e3a;
}

.faction-hero[data-faction="serpent"] .stat-fill {
    background: #1e8a3a;
}

.faction-hero[data-faction="leopard"] .stat-fill {
    background: #d4a017;
}

.faction-hero[data-faction="sky"] .stat-fill {
    background: #6b5b95;
}

/* -------------------- Requirement Badge -------------------- */
.info-requirement {
    text-align: center;
    margin-bottom: 20px;
}

.requirement-badge {
    display: inline-block;
    background: rgba(107, 91, 149, 0.2);
    border: 1px solid rgba(107, 91, 149, 0.5);
    color: #a99fd4;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: requirementPulse 2s ease-in-out infinite;
}

@keyframes requirementPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(107, 91, 149, 0.5);
    }
}

/* -------------------- Action Buttons -------------------- */
.info-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-faction {
    min-width: 180px;
}

.faction-hero[data-faction="dragon"] .btn-faction {
    background: linear-gradient(135deg, #c41e3a 0%, #8b1528 100%);
    box-shadow: 0 0 30px rgba(196, 30, 58, 0.4);
}

.faction-hero[data-faction="serpent"] .btn-faction {
    background: linear-gradient(135deg, #1e8a3a 0%, #145c27 100%);
    box-shadow: 0 0 30px rgba(30, 138, 58, 0.4);
}

.faction-hero[data-faction="leopard"] .btn-faction {
    background: linear-gradient(135deg, #d4a017 0%, #9e7810 100%);
    box-shadow: 0 0 30px rgba(212, 160, 23, 0.4);
}

.faction-hero[data-faction="sky"] .btn-faction {
    background: linear-gradient(135deg, #6b5b95 0%, #4a3f68 100%);
    box-shadow: 0 0 30px rgba(107, 91, 149, 0.4);
}

/* -------------------- Rogue Warning -------------------- */
.rogue-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rogue-warning.visible {
    opacity: 1;
}

/* Vignette effect */
.warning-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.85) 50%,
            rgba(0, 0, 0, 0.95) 100%);
    animation: vignetteFlash 2s ease forwards;
}

@keyframes vignetteFlash {
    0% {
        background: radial-gradient(ellipse at center, rgba(107, 91, 149, 0.6) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.98) 100%);
    }

    20% {
        background: radial-gradient(ellipse at center, rgba(150, 50, 80, 0.5) 0%, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0.98) 100%);
    }

    100% {
        background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0.95) 100%);
    }
}

/* Scanlines effect */
.warning-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px);
    pointer-events: none;
    animation: scanlineMove 0.1s linear infinite;
}

@keyframes scanlineMove {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

/* Warning content container */
.warning-content {
    position: relative;
    text-align: center;
    z-index: 10;
    animation: contentAppear 0.5s ease forwards;
}

@keyframes contentAppear {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chain decorations */
.warning-chains {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.chain {
    font-size: 3rem;
    color: rgba(107, 91, 149, 0.4);
    animation: chainSwing 2s ease-in-out infinite;
}

.chain-left {
    transform-origin: top center;
}

.chain-right {
    transform-origin: top center;
    animation-delay: 0.5s;
}

@keyframes chainSwing {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* Skull */
.warning-skull {
    position: relative;
    margin-bottom: 20px;
}

.skull-icon {
    font-size: 6rem;
    display: block;
    color: #a99fd4;
    text-shadow:
        0 0 20px rgba(107, 91, 149, 0.8),
        0 0 40px rgba(107, 91, 149, 0.6),
        0 0 60px rgba(107, 91, 149, 0.4);
    animation: skullPulse 1.5s ease-in-out infinite, skullShake 0.1s ease-in-out;
}

@keyframes skullPulse {

    0%,
    100% {
        transform: scale(1);
        text-shadow:
            0 0 20px rgba(107, 91, 149, 0.8),
            0 0 40px rgba(107, 91, 149, 0.6),
            0 0 60px rgba(107, 91, 149, 0.4);
    }

    50% {
        transform: scale(1.1);
        text-shadow:
            0 0 30px rgba(150, 100, 180, 1),
            0 0 60px rgba(150, 100, 180, 0.8),
            0 0 90px rgba(150, 100, 180, 0.6);
    }
}

@keyframes skullShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

.skull-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(107, 91, 149, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 1.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* Warning text */
.warning-text {
    margin-bottom: 20px;
}

.warning-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #fff;
    text-shadow:
        0 0 10px rgba(107, 91, 149, 0.8),
        0 0 20px rgba(107, 91, 149, 0.5);
    margin-bottom: 10px;
    animation: titleGlitch 3s ease-in-out infinite;
}

@keyframes titleGlitch {

    0%,
    95%,
    100% {
        transform: translateX(0);
        text-shadow: 0 0 10px rgba(107, 91, 149, 0.8), 0 0 20px rgba(107, 91, 149, 0.5);
    }

    96% {
        transform: translateX(-2px);
        text-shadow: -2px 0 #ff0080, 2px 0 #00ffff;
    }

    97% {
        transform: translateX(2px);
        text-shadow: 2px 0 #ff0080, -2px 0 #00ffff;
    }

    98% {
        transform: translateX(-1px);
        text-shadow: -1px 0 #ff0080, 1px 0 #00ffff;
    }
}

.warning-subtitle {
    font-size: 1rem;
    color: rgba(169, 159, 212, 0.8);
    letter-spacing: 0.1em;
    font-style: italic;
}

/* Decoration line */
.warning-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.deco-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6b5b95, transparent);
}

.deco-diamond {
    color: #6b5b95;
    font-size: 0.8rem;
    animation: diamondSpin 3s linear infinite;
}

@keyframes diamondSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* -------------------- Hidden Utility -------------------- */
.hidden {
    display: none !important;
}

/* -------------------- Responsive Adjustments -------------------- */
@media (max-width: 1200px) {
    .faction-side {
        display: none;
    }

    .faction-display {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .faction-hero {
        padding-top: 100px;
    }

    .faction-main {
        width: 280px;
        height: 400px;
    }

    .faction-nav {
        width: 45px;
        height: 45px;
    }

    .nav-arrow {
        font-size: 2rem;
    }

    .faction-info-panel {
        bottom: 80px;
        width: 95%;
    }

    .info-panel-inner {
        padding: 20px;
    }

    .info-faction-name {
        font-size: 1.5rem;
    }

    .info-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-actions {
        flex-direction: column;
    }

    .btn-faction {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .faction-main {
        width: 240px;
        height: 340px;
    }

    .faction-indicators {
        gap: 10px;
    }

    .faction-indicator {
        width: 35px;
        height: 35px;
    }
}