/* =========================================
   TUJUANE AUTH (PREMIUM DARK EDITION)
   Updated to Global Design System
   ========================================= */

/* SAFETY FALLBACK: Define vars locally in case global.css is cached/delayed */
:root {
    --bg-dark: #050505;
    --bg-glass-heavy: rgba(10, 10, 10, 0.95);
    --neon-cyan: #00f3ff;
    --neon-cyan-dim: rgba(0, 243, 255, 0.2);
    --text-white: #ffffff;
    --text-dim: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-main: 'Outfit', sans-serif;
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5);
    --success: #00d26a;
    --input-bg: #0b0d10;
    /* Legacy compat */
}

/* NOTE: Variables are now inherited from global.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark) !important;
    background-image: radial-gradient(circle at top center, #1f2329 0%, #000 70%);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* The direct login template uses this full-screen wrapper instead of the
   theme body. Make it responsible for true vertical centering. */
#tujuane-auth-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* =========================================
   1. THE CARD (Clean & Solid)
   ========================================= */
.auth-container {
    width: 100%;
    max-width: 420px !important;
    margin: 10px auto !important;
    /* Reduced from 40px */
    z-index: 100000;
    transform: translateY(-25px);
    /* Visual Lift */
}

.auth-card {
    background: var(--bg-glass-heavy) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius-lg) !important;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* =========================================
   2. HEADER & LOGO
   ========================================= */
.auth-logo {
    margin-bottom: 25px;
    background: transparent !important;
    /* Ensure container is clear */
}

.heart-logo {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: transparent !important;
    /* Killer of squares */
    box-shadow: none !important;
    font-size: 42px;
    color: #00f3ff !important;
    /* HARDCODED CYAN */
    -webkit-text-fill-color: #00f3ff !important;
    /* Clean Neon Glow */
    filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.8));
    animation: pulseGlow 3s infinite;
    line-height: normal !important;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* =========================================
   3. BUTTONS (High Visibility)
   ========================================= */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    position: relative;
}

.btn-auth:hover {
    transform: translateY(-2px);
}

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

/* Google - White for maximum contrast */
.btn-google {
    background: #101214;
    color: #fff;
    border: 1px solid #3a3f44 !important;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.01em;
    min-height: 54px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.btn-google:hover {
    background: #1b1f22;
    border-color: #00f3ff !important;
    box-shadow: 0 12px 28px rgba(0, 243, 255, 0.16);
}

.google-mark {
    width: 21px;
    height: 21px;
    margin-right: 12px;
    flex: 0 0 auto;
}

.btn-google span {
    color: #fff;
    font-weight: 750;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

/* Phone - High Contrast */
.btn-phone {
    background: transparent;
    border: 1px solid #666;
    /* Visible Grey Border */
    color: #fff !important;
    /* Force White Text */
    font-weight: 600;
}

.btn-phone:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Facebook - Standard Blue */
.btn-facebook {
    background: #1877F2 !important;
    /* Solid Blue Background */
    color: #fff !important;
    border: none !important;
}

.btn-facebook:hover {
    background: #166fe5 !important;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.6));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.9));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.6));
    }
}

/* Submit Action - Brand Color */
.btn-submit {
    background: var(--neon-cyan);
    color: #000;
    font-weight: 800;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
}

.btn-submit:hover {
    background: #00d2dd;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.4);
}

.btn-auth i {
    margin-right: 12px;
    font-size: 18px;
}

/* =========================================
   4. INPUTS (Clean Grey Boxes)
   ========================================= */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-left: 2px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md);
    color: #fff !important;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
}

.input-field:focus {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.input-field::placeholder {
    color: #555;
}

/* Phone Prefix (+254) */
.phone-input-wrapper {
    position: relative;
}

.prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    pointer-events: none;
}

.input-field.with-prefix {
    padding-left: 65px !important;
}

/* OTP Inputs */
#input-otp-code {
    text-align: center;
    letter-spacing: 5px;
    font-size: 24px;
    font-weight: 700;
    background: #000 !important;
    border-color: var(--neon-cyan) !important;
}

/* =========================================
   5. UTILITIES
   ========================================= */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #333;
}

.divider span {
    padding: 0 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    padding: 6px 14px;
    background: rgba(0, 210, 106, 0.1);
    color: #00d26a;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.secure-badge i {
    margin-right: 6px;
}

.auth-footer {
    margin-top: 30px;
    font-size: 12px;
    color: #666;
}

.text-link {
    color: var(--text-dim);
    text-decoration: underline;
    transition: 0.2s;
}

.text-link:hover {
    color: var(--neon-cyan);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.back-btn:hover {
    color: var(--neon-cyan);
    transform: translateX(-4px);
}

/* Animation */
.hidden {
    display: none !important;
}

.auth-view {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   HEARTBEAT LOADER (TRANSITION SUPPORT)
   Required for auth-gate.js transition
   ========================================= */
.heart-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.beating-heart {
    font-size: 80px;
    color: #00f3ff !important;
    -webkit-text-fill-color: #00f3ff !important;
    /* Force Paint */
    animation: realisticHeartbeat 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.6));
}

.heart-text {
    margin-top: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: fadePulse 1.5s infinite;
}

@keyframes realisticHeartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes fadePulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* =========================================
   6. DYNAMIC HERO PANEL (Desktop)
   ========================================= */
.auth-hero-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 60%;
    height: 100vh;
    background: radial-gradient(circle at 30% 30%, #0a0a0a 0%, #050505 100%);
    padding: 60px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    z-index: 10;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
}

@media (min-width: 1024px) {
    .auth-hero-panel {
        display: flex;
    }

    .auth-container {
        position: fixed;
        top: 48%;
        left: 80%;
        width: min(400px, 34vw);
        margin: 0 !important;
        max-width: 400px !important;
        transform: translate(-50%, -50%);
    }
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.hero-brand i {
    color: var(--neon-cyan);
    font-size: 32px;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.hero-brand span {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
}

.hero-footer-text h2 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    max-width: 500px;
    z-index: 20;
    position: relative;
}

.text-cyan {
    color: var(--neon-cyan);
}

/* Floating Cluster */
.hero-floating-elements {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 60%;
    z-index: 15;
}

.floating-card {
    position: absolute;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: float 6s infinite ease-in-out;
}

.main-couple {
    width: 320px;
    height: 400px;
    top: 10%;
    left: 35%;
    z-index: 5;
    background: #000;
}

.main-couple img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    filter: brightness(0.8) contrast(1.1) saturate(0.9);
    transition: filter 0.5s ease;
}

.main-couple:hover img {
    filter: brightness(1) contrast(1) saturate(1);
}

.floating-bubble {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #050505;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    animation: float 10s infinite ease-in-out reverse;
    background: #000;
}

.bubble-1 {
    top: 5%;
    left: 20%;
    width: 140px;
    height: 140px;
}

.bubble-2 {
    bottom: 10%;
    right: 25%;
}

.floating-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan-dim);
}

.interaction-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 10px;
    border-radius: 12px;
    color: #fff;
    z-index: 12;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.like-badge {
    bottom: 20%;
    left: 30%;
    background: #ff0055;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    animation: pulse 2s infinite;
}

.glass-time {
    top: 15%;
    right: 35%;
    background: rgba(0, 243, 255, 0.2);
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    padding: 5px 10px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 0, 85, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 85, 0);
    }
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 1023px) {
    body {
        padding: 10px;
        justify-content: center;
    }

    .auth-container {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 380px !important;
        margin: 0 auto !important;
        transform: none;
    }
}
