:root {
    --primary-color: #5b217a; /* Morado PLD */
    --primary-dark: #3a154f;
    --accent-color: #fbd000; /* Amarillo PLD */
    --accent-hover: #e0b800;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --error-color: #dc3545;
    --success-color: #28a745;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: #170424; /* Base morada oscura */
    background-image: 
        linear-gradient(135deg, rgba(26, 4, 38, 0.93) 0%, rgba(91, 33, 122, 0.78) 50%, rgba(12, 2, 18, 0.96) 100%),
        url('../img/background_oficial.jpg');
    background-size: cover;
    background-position: calc(100% + var(--bg-shift-x, 0px)) calc(50% + var(--bg-shift-y, 0px));
    transition: background-position 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animaciones Base */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

@keyframes slideInRightFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hero Section */
.hero {
    background: transparent;
    color: white;
    padding: 3rem 1.5rem 0; /* Padding inferior 0 para que la imagen se asiente */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Luz de fondo detrás del candidato (Glow) */
.hero-bg-glow {
    display: none;
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(251, 208, 0, 0.3) 0%, rgba(251, 208, 0, 0.08) 45%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* Divisor de Forma (Ola abajo del hero) */
.custom-shape-divider-bottom {
    display: none; /* Ocultado permanentemente ya que ahora toda la página es morada */
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(130% + 1.3px);
    height: 70px;
}

.hero-grid {
    position: relative;
    z-index: 5;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-text {
    padding-bottom: 2rem;
}

.hero-character {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    z-index: 2; /* Detrás de la ola blanca para ocultar el corte inferior */
    position: relative;
}

.hero-character img.img-character {
    position: relative;
    z-index: 2;
    max-width: 100%;
    width: 320px;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.65)); /* Sombra para resaltar retrato */
    opacity: 0;
    animation: slideUpFade 1s cubic-bezier(0.25, 0.8, 0.25, 1) 0.5s forwards;
    transform-origin: bottom;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    opacity: 0;
    animation: slideUpFade 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.2s forwards;
}

.campaign-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
    display: inline-block;
}

.hero-text h1 span {
    color: var(--accent-color);
    font-size: 2rem;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0;
    max-width: 600px;
    margin: 0 auto;
    animation: slideUpFade 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.4s forwards;
}

/* Decoración del Hero */
.hero-bg {
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(circle, rgba(251,208,0,0.15) 0%, rgba(0,0,0,0) 60%);
    z-index: 1;
    pointer-events: none;
}

/* Contenedor Principal */
.container {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: -4rem auto 3rem;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

/* Tarjeta de Formulario */
.form-card {
    position: relative;
    background: rgba(255, 255, 255, 0.88); /* Ligeramente más opaco para mayor elegancia glass y legibilidad */
    backdrop-filter: blur(25px); /* Desenfoque de fondo incrementado para una textura premium */
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    padding: 2.25rem 2rem; /* Reducido padding para hacerlo más compacto */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 12px 24px -8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.45);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-card h2 {
    color: var(--primary-color);
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem; /* Ligeramente reducido de 1rem a 0.92rem */
    margin-bottom: 1.5rem; /* Reducido de 2.5rem a 1.5rem */
}

/* Formularios */
.input-group {
    margin-bottom: 0.25rem; /* Reducido de 0.5rem a 0.25rem */
    position: relative;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem; /* Reducido de 0.5rem a 0.3rem */
    color: var(--primary-dark);
    font-size: 0.88rem; /* Reducido de 0.95rem a 0.88rem */
    transition: color 0.3s;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.65rem 0.85rem; /* Reducido padding para un look más estilizado y compacto */
    font-size: 0.95rem; /* Reducido de 1rem a 0.95rem */
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--primary-color);
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-group select {
    appearance: none;
    cursor: pointer;
}

.input-group select:invalid {
    color: #9ca3af;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(91, 33, 122, 0.1);
    transform: translateY(-2px);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group select:focus + label,
.input-group select:valid + label {
    color: var(--primary-color);
}

.input-group input.is-invalid,
.input-group select.is-invalid {
    border-color: var(--error-color);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.error-msg {
    display: block;
    color: var(--error-color);
    font-size: 0.78rem;
    margin-top: 0.15rem;
    min-height: 0.8rem; /* Reducido drásticamente para compactar el formulario */
}

/* Grillas del Formulario (Pro Layout) */
.form-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 0.1rem;
}

.form-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.1rem;
}

@media (max-width: 767px) {
    .form-grid-row {
        grid-template-columns: 1fr 1fr; /* Mantener 2 columnas en móviles para reducir scroll */
        gap: 0.75rem; /* Separación más ajustada en móviles */
        margin-bottom: 0.1rem;
    }
    .form-grid-three {
        grid-template-columns: 1fr 1fr; /* 2 columnas en móvil para redes sociales */
        gap: 0.75rem;
        margin-bottom: 0.1rem;
    }
    .form-grid-three .input-group:last-child {
        grid-column: span 2; /* Centrar y expandir el tercer campo (X) para perfecto equilibrio */
    }
}

/* Botones */
.btn-primary {
    width: 100%;
    background: linear-gradient(to right, var(--accent-color), #ffde33);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.05rem; /* Reducido de 1.1rem a 1.05rem */
    padding: 0.9rem; /* Reducido de 1.1rem a 0.9rem */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(251, 208, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
}

.btn-primary:hover::after {
    left: 200%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(251, 208, 0, 0.6);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Loader */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(58, 21, 79, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-dark);
    animation: spin 1s ease-in-out infinite;
    display: none; /* hidden default */
}

.btn-primary.loading .btn-text {
    display: none;
}
.btn-primary.loading .loader {
    display: block;
}

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

/* Success Message Premium */
.success-message {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
    animation: scaleUpCard 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

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

.success-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.25rem;
}

.checkmark-svg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: var(--success-color);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--success-color);
    animation: fill-check .4s ease-in-out .4s forwards, scale-check .3s ease-in-out .9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--success-color);
    fill: none;
    animation: stroke-circle .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--success-color);
    animation: stroke-check .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke-circle {
    100% { stroke-dashoffset: 0; }
}

@keyframes stroke-check {
    100% { stroke-dashoffset: 0; }
}

@keyframes fill-check {
    100% { box-shadow: inset 0px 0px 0px 40px rgba(40, 167, 69, 0.08); }
}

@keyframes scale-check {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.08, 1.08, 1); }
}

.success-badge {
    display: inline-block;
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.75rem;
}

.success-message h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.success-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.75rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

/* Compartir en redes (Campañista) */
.share-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1rem;
    margin-bottom: 1.75rem;
    text-align: center;
}

.share-title {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.88rem;
    margin-bottom: 0.65rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    width: 125px;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

.share-btn.whatsapp {
    background-color: #25D366;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}

.share-btn.whatsapp:hover {
    background-color: #20ba59;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35);
}

.share-btn.twitter {
    background-color: #000000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.share-btn.twitter:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.btn-secondary-pro {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    max-width: 260px;
}

.btn-secondary-pro:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(91, 33, 122, 0.15);
}

.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 1rem 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    background-color: transparent;
}

.social-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: white;
    color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.social-links a svg {
    width: 22px;
    height: 22px;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(91, 33, 122, 0.2);
}

.social-links a[aria-label="Instagram"]:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); box-shadow: 0 8px 15px rgba(220, 39, 67, 0.3); color: white; }
.social-links a[aria-label="Facebook"]:hover { background-color: #1877F2; box-shadow: 0 8px 15px rgba(24, 119, 242, 0.3); color: white; }
.social-links a[aria-label="TikTok"]:hover { background-color: #000000; box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); color: white; }
.social-links a[aria-label="WhatsApp"]:hover { background-color: #25D366; box-shadow: 0 8px 15px rgba(37, 211, 102, 0.3); color: white; }
.social-links a[aria-label="X"]:hover { background-color: #000000; box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); color: white; }
.social-links a[aria-label="YouTube"]:hover { background-color: #FF0000; box-shadow: 0 8px 15px rgba(255, 0, 0, 0.35); color: white; }
.hero-character img.img-character { display: block; }

/* Responsive */
@media (min-width: 992px) {


    .split-layout {
        display: block;
        background: transparent;
    }
    
    .hero {
        position: fixed;
        top: 0;
        left: 0;
        width: 55%;
        padding: 4rem 3rem 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        background: transparent;
        overflow: hidden;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        height: 100%;
        width: 100%;
    }
    
    .hero-text {
        position: relative;
        z-index: 10;
        text-align: left;
        flex: none;
        padding-bottom: 1rem;
    }

    .hero-text h1 {
        font-size: 4rem;
    }
    .campaign-logo {
        max-width: 400px;
        margin: 0 0 1.5rem 0; /* Alinear a la izquierda para emparejar con el texto */
        display: block;
    }
    .hero-text h1 span {
        font-size: 2.5rem;
    }
    .hero-text p {
        margin: 0;
        font-size: 1.2rem;
    }

    .hero-character {
        flex: 1;
        min-height: 0;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        width: 100%;
        position: relative;
    }

    .hero-character img.img-character { 
        display: block; 
        max-height: 100%; /* Respeta estrictamente el espacio disponible del flex y nunca se monta en el texto */
        width: auto;
        max-width: 540px;
        object-fit: contain;
        object-position: bottom;
        animation: slideInRightFade 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) 0.4s forwards;
    }

    .custom-shape-divider-bottom {
        display: none;
    }

    .container {
        margin-left: 55%;
        width: 45%;
        min-height: calc(100vh - 150px);
        padding: 4rem 3rem 1rem 3rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: transparent;
        max-width: none;
    }
    
    .form-card {
        width: 100%;
        max-width: 550px;
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    footer {
        margin-left: 55%;
        width: 45%;
        padding-top: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        padding: 4rem 1.5rem 0;
    }
    .hero-grid {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .hero-text {
        width: 100%;
        padding-bottom: 2rem;
    }
    .hero-character {
        width: 100%;
        justify-content: center;
    }
    .hero-character img.img-character {
        width: 420px;
        animation: slideUpFade 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) 0.4s forwards;
    }
    .hero-text h1 {
        font-size: 3.5rem;
    }
    .campaign-logo {
        max-width: 350px;
        margin: 0 auto 1.5rem auto;
        display: block;
    }
}

@media (max-width: 767px) {
    .custom-shape-divider-bottom svg {
        height: 35px; /* Ola más plana para no tapar al candidato */
    }
    .hero-character img.img-character {
        width: 340px; /* Ligeramente más grande en móvil para balancear */
    }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2rem; }
    .hero-text h1 span { font-size: 1.5rem; }
    .form-card { padding: 1.5rem; }
    .container { margin-top: -2rem; }
}

/* Pantallas Grandes (Monitores de 1080p y superiores) */
@media (min-width: 1400px) {
    .hero-character img.img-character {
        max-width: 650px;
        max-height: 100%;
    }
    .hero-text h1 {
        font-size: 4.8rem;
    }
    .hero-text p {
        font-size: 1.35rem;
    }
    .campaign-logo {
        max-width: 480px;
    }
}

/* Pantallas Ultra Anchas y Monitores Gigantes (2K, 4K) */
@media (min-width: 1800px) {
    .hero-character img.img-character {
        max-width: 800px;
        max-height: 100%;
    }
    .hero-text h1 {
        font-size: 5.5rem;
    }
    .hero-text p {
        font-size: 1.5rem;
    }
    .campaign-logo {
        max-width: 580px;
    }
}

/* Ocultar Encabezado de Tarjeta en Éxito */
.form-card.success-active h2,
.form-card.success-active .subtitle {
    display: none !important;
}

/* Confetti Canvas */
#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    border-radius: 16px;
}

/* Share Button Copy-Link */
.share-btn.copy-link {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(91, 33, 122, 0.25);
    border: none;
    font-family: inherit;
}

.share-btn.copy-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(91, 33, 122, 0.35);
}

.share-btn.copy-link svg {
    transition: transform 0.2s ease;
}

.share-btn.copy-link:active svg {
    transform: scale(0.85);
}

/* Contenedor de Credencial Digital */
.credential-card-container {
    perspective: 1000px;
    margin: 1.5rem auto 2rem;
    max-width: 440px;
    width: 100%;
    z-index: 5;
    position: relative;
}

.credential-card {
    background: linear-gradient(135deg, #2b043c 0%, #5b217a 50%, #170424 100%);
    border: 2px solid var(--accent-color);
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(91, 33, 122, 0.35), 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: left;
    color: white;
    transform-style: preserve-3d;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Brillo interior y reflejo de plástico */
.credential-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(251, 208, 0, 0.15) 0%, rgba(0, 0, 0, 0) 65%);
    pointer-events: none;
    z-index: 1;
}

.credential-shimmer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: credShimmer 7s infinite ease-in-out;
    pointer-events: none;
    z-index: 2;
}

@keyframes credShimmer {
    0% { left: -150%; }
    25% { left: 150%; }
    100% { left: 150%; }
}

/* Encabezado Credencial */
.credential-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(251, 208, 0, 0.25);
    padding-bottom: 0.65rem;
    margin-bottom: 0.85rem;
    position: relative;
    z-index: 3;
}

.cred-logo-area {
    display: flex;
    align-items: center;
}

.cred-logo {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.cred-badge {
    background: linear-gradient(135deg, var(--accent-color), #ffe666);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(251, 208, 0, 0.25);
    text-transform: uppercase;
}

/* Cuerpo Credencial */
.credential-body {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.85rem;
    position: relative;
    z-index: 3;
}

.cred-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cred-label {
    display: block;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cred-value {
    display: block;
    font-weight: 700;
    color: white;
    font-size: 0.88rem;
}

#cred-name {
    color: var(--accent-color);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cred-meta-row {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.cred-aside {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cred-avatar-placeholder {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(251, 208, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.25);
    backdrop-filter: blur(5px);
}

.cred-avatar-placeholder svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Pie Credencial */
.credential-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.65rem;
    position: relative;
    z-index: 3;
}

.cred-id-area {
    display: flex;
    flex-direction: column;
}

.cred-id {
    font-family: monospace;
    font-size: 0.92rem;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.cred-barcode-area {
    display: flex;
    align-items: center;
}

.barcode-lines {
    display: flex;
    height: 22px;
    align-items: stretch;
    gap: 1.5px;
    opacity: 0.6;
}

.b-line {
    background-color: white;
}



@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Borde animado (hollow) */
.form-card::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 17.5px;
    background: conic-gradient(from var(--gradient-angle), 
        rgba(255, 255, 255, 0.5), 
        var(--accent-color) 25%, 
        var(--primary-color) 50%, 
        var(--accent-color) 75%, 
        rgba(255, 255, 255, 0.5) 100%
    );
    z-index: 1; /* Renderiza sobre el borde nativo pero se recorta al exterior */
    animation: rotate-gradient 6s linear infinite;
    pointer-events: none;
    
    /* Mascara de recorte */
    padding: 1.5px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.form-card::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    background: conic-gradient(from var(--gradient-angle), 
        rgba(255, 255, 255, 0.2), 
        var(--accent-color) 25%, 
        var(--primary-color) 50%, 
        var(--accent-color) 75%, 
        rgba(255, 255, 255, 0.2) 100%
    );
    z-index: -1;
    filter: blur(8px);
    animation: rotate-gradient 6s linear infinite;
    opacity: 0.5;
    pointer-events: none;
    
    /* Mascara anti-sangrado */
    padding: 6px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

@keyframes rotate-gradient {
    0% {
        --gradient-angle: 0deg;
    }
    100% {
        --gradient-angle: 360deg;
    }
}

/* Partículas de fondo */
.ambient-sparks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.spark {
    position: absolute;
    bottom: -20px;
    width: 4px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    filter: blur(0.5px);
    box-shadow: 0 0 8px var(--accent-color), 0 0 15px var(--accent-color);
    animation: float-spark 8s linear infinite;
}

@keyframes float-spark {
    0% {
        transform: translateY(0) translateX(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-105vh) translateX(var(--drift-x, 100px)) scale(1.2);
        opacity: 0;
    }
}

/* Proteccion de Imagenes y Logos */
.campaign-logo,
.img-character,
.cred-logo,
.logo-wrapper img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}
