/* OrbIT CardMan - Auth v2 Base Styles
   Shared scene, orbital, card, particles, branding for all v2 auth pages */

/* ============================
   SCENE LAYOUT
   ============================ */
.v2-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 20px;
}

.v2-scene {
    position: relative;
    width: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Ambient glow behind the card */
.v2-ambient {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--v2-accent-rgb), 0.1) 0%, transparent 70%);
    animation: v2AmbientPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes v2AmbientPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* ============================
   ORBITAL SVG LAYERS
   ============================ */
.v2-orbit-back-svg,
.v2-orbit-front-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.v2-orbit-back-svg {
    z-index: 1;
}

.v2-orbit-front-svg {
    z-index: 3;
}

/* SVG element theme colors */
.v2-ring-back,
.v2-ring-front {
    stroke: var(--v2-accent);
}

#v2OrbGlowOuter,
#v2OrbGlowMid {
    fill: var(--v2-accent);
}

/* ============================
   PARTICLES & TRAILS
   ============================ */
.v2-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.v2-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--v2-accent);
    border-radius: 50%;
    opacity: 0;
    animation: v2ParticleDrift linear infinite;
}

.v2-particle-blue {
    background: #2a6ff5;
}

@keyframes v2ParticleDrift {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    15% { opacity: 0.5; }
    85% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-100px) scale(0); }
}

.v2-trail {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    background: var(--v2-accent-alt);
    filter: blur(2px);
    opacity: 0;
    transition: opacity 0.12s;
}

/* ============================
   THE CARD
   ============================ */
.v2-card {
    position: relative;
    z-index: 2;
    width: 420px;
    background: linear-gradient(145deg, var(--v2-card-start) 0%, var(--v2-card-end) 100%);
    border: 2px solid rgba(var(--v2-accent-rgb), 0.3);
    border-radius: 20px;
    padding: 32px 36px 28px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, var(--v2-shadow-alpha)),
        0 0 40px rgba(var(--v2-accent-rgb), 0.08),
        0 0 0 1px rgba(var(--v2-accent-rgb), 0.05);
    overflow: hidden;
    animation: v2CardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes v2CardEntry {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shimmer */
.v2-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--v2-shimmer), transparent);
    animation: v2ShimmerSlide 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes v2ShimmerSlide {
    0% { transform: translateX(-120px); opacity: 0; }
    40% { opacity: 1; }
    100% { transform: translateX(480px); opacity: 0; }
}

/* Card top gradient line */
.v2-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--v2-accent) 30%, var(--v2-accent-alt) 50%, var(--v2-accent) 70%, transparent);
    opacity: 0.6;
}

/* ============================
   CARD HEADER
   ============================ */
.v2-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.v2-chip {
    width: 46px;
    height: 34px;
    position: relative;
}

.v2-chip svg {
    width: 100%;
    height: 100%;
}

.v2-chip-glow {
    animation: v2ChipPulse 3s ease-in-out infinite;
}

@keyframes v2ChipPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.85; }
}

.v2-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--v2-accent);
    letter-spacing: 2px;
    opacity: 0.7;
    text-shadow: 0 0 20px rgba(var(--v2-accent-rgb), 0.3);
    padding-top: 4px;
}

/* ============================
   CARD DOTS
   ============================ */
.v2-card-dots {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.v2-card-dots span {
    font-family: monospace;
    font-size: 14px;
    letter-spacing: 3px;
    color: rgba(var(--v2-accent-rgb), 0.2);
}

/* ============================
   BRANDING FOOTER
   ============================ */
.v2-branding {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted, #5a7a9a);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.v2-branding a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.v2-branding a:hover {
    color: var(--v2-accent, rgba(255, 255, 255, 0.7));
}

.v2-branding .auth-legal-links {
    margin-top: 4px;
    font-size: 0.75rem;
}

.v2-branding .auth-legal-links a {
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    text-decoration: none;
}

.v2-branding .auth-legal-links a:hover {
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 560px) {
    .v2-scene {
        width: 100%;
        height: auto;
        min-height: 540px;
    }

    .v2-card {
        width: calc(100% - 40px);
        max-width: 380px;
        padding: 28px 24px 24px;
    }

    .v2-card-dots {
        gap: 10px;
    }

    .v2-card-dots span {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .v2-brand {
        font-size: 0.95rem;
    }

    .v2-ambient {
        width: 280px;
        height: 280px;
    }

    /* Hide trail dots on mobile — they cast a visible shadow on the card */
    .v2-trail { display: none !important; }
}

/* ============================
   REDUCED MOTION
   ============================ */
@media (prefers-reduced-motion: reduce) {
    .v2-card { animation: v2CardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) both !important; }
    .v2-shimmer { animation: none; }
    .v2-ambient { animation: none; }
    .v2-particle { animation: none; }
    .v2-trail { display: none; }
    .v2-chip-glow { animation: none; opacity: 0.7; }
}
