/**
 * Modern Social Login Design - KAMBA DYAMI Brand
 * Glassmorphism, Gradients & Animations
 * Performance optimized with lazy loading
 */

:root {
    --primary: #F5A623;
    --primary-dark: #E8843D;
    --secondary: #FDBF5F;
    --accent: #F5A623;
    --light-accent: #F9D9B8;
    --dark-bg: #2D1810;
    --dark-bg-light: #3E2723;
    --card-bg: rgba(245, 166, 35, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --border-color: rgba(255, 255, 255, 0.15);
}

/* ========================================================================== */
/* ANIMATIONS */
/* ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(245, 166, 35, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0);
    }
}

/* ========================================================================== */
/* BACKGROUND & BASE */
/* ========================================================================== */

body.gradiant-bg {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-light) 50%, #1a0f08 100%);
    background-attachment: fixed;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><defs><radialGradient id="g1"><stop offset="0%25" stop-color="%23F5A623" stop-opacity="0.15"/><stop offset="100%25" stop-color="%232D1810" stop-opacity="0"/></radialGradient></defs><circle cx="1600" cy="900" r="700" fill="url(%23g1)"/></svg>');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

@media (max-width: 768px) {
    body.gradiant-bg {
        height: 100vh;
        overflow: hidden;
    }
}

body.gradiant-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(245, 166, 35, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(232, 168, 61, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Default text color - ensure all text is white */
html, body {
    color: var(--text-primary);
}

* {
    color: inherit;
}

body, html {
    margin: 0;
    padding: 0;
}

.page-wraper {
    position: relative;
    z-index: 2;
}

/* ========================================================================== */
/* PRELOADER - OPTIMIZED */
/* ========================================================================== */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d1810 50%, #1a0f08 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInUp 0.3s ease-out reverse 0.5s forwards;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(245, 166, 35, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================================== */
/* LOGIN CONTAINER - MODERN LAYOUT */
/* ========================================================================== */

.content-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    width: 100%;
}

@media (max-width: 768px) {
    .content-body {
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
        padding: 0;
        align-items: flex-start;
        padding-top: 20px;
    }
}

.container.vh-100 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.welcome-area {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* ========================================================================== */
/* DESKTOP LAYOUT - TWO COLUMN */
/* ========================================================================== */

@media (min-width: 1024px) {
    .welcome-area {
        max-width: 1200px;
        grid-template-columns: 1fr 1fr;
        gap: 80px;
        align-items: center;
    }
    
    .welcome-area::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 1px;
        height: 60%;
        background: linear-gradient(180deg, transparent, rgba(245, 166, 35, 0.3), transparent);
        z-index: 0;
    }
    
    .started {
        text-align: left;
        grid-column: 1;
        z-index: 2;
    }
    
    .join-area {
        grid-column: 2;
        z-index: 2;
        max-width: 420px;
    }
}

@media (min-width: 1440px) {
    .welcome-area {
        max-width: 1400px;
        gap: 120px;
    }
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

.bg-image-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(33, 150, 243, 0.4));
}

/* ========================================================================== */
/* JOIN AREA - GLASSMORPHISM */
/* ========================================================================== */

.join-area {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 50px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .join-area {
        padding: 15px 15px;
        border-radius: 16px;
        height: auto;
        overflow-y: auto;
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 480px) {
    .join-area {
        padding: 25px 15px;
        border-radius: 16px;
        max-height: calc(100vh - 10px);
    }
}

@media (max-width: 1023px) {
    .join-area {
        max-width: 100%;
    }
}

@media (min-width: 1024px) {
    .join-area {
        padding: 60px 40px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.07);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
        max-height: auto;
    }
}

/* ========================================================================== */
/* WELCOME TEXT */
/* ========================================================================== */

.started {
    text-align: center;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease-out;
    display: none;
}

@media (max-width: 768px) {
    .started {
        margin-bottom: 5px;
    }
}

.started h1.title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.started p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 500px;
}

@media (min-width: 1024px) {
    .started {
        text-align: left;
        margin-bottom: 0;
    }
    
    .started h1.title {
        font-size: 3.5rem;
        margin-bottom: 25px;
    }
    
    .started p {
        font-size: 1.1rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .started h1.title {
        font-size: 2rem;
    }
    
    .started p {
        font-size: 0.9rem;
    }
}

/* ========================================================================== */
/* FORM INPUTS - MODERN STYLE */
/* ========================================================================== */

.input-group-icon {
    margin-bottom: 12px;
    position: relative;
}

.input-group-text {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-right: 1px solid var(--border-color);
    padding: 14px 16px;
    border-radius: 12px 0 0 12px;
    color: var(--text-primary);
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-left: none;
    color: var(--text-primary);
    padding: 14px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 0 12px 12px 0;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
    outline: none;
}

/* Ensure all form labels and text are white */
label, .form-label, .form-text, .small, .help-text {
    color: var(--text-primary);
    font-weight: 500;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

/* ========================================================================== */
/* PASSWORD TOGGLE */
/* ========================================================================== */

.show-pass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    padding: 14px 16px;
}

.show-pass i {
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
}

.show-pass i:first-child {
    position: absolute;
}

.show-pass i:last-child {
    opacity: 0;
    pointer-events: none;
}

.show-pass.active i:first-child {
    opacity: 0;
    pointer-events: none;
}

.show-pass.active i:last-child {
    opacity: 1;
    pointer-events: auto;
}

/* ========================================================================== */
/* BUTTONS */
/* ========================================================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeInUp 1s ease-out;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(245, 166, 35, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

/* ========================================================================== */
/* LINKS */
/* ========================================================================== */

.btn-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-link:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.text-underline {
    position: relative;
    padding-bottom: 5px;
}

.text-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.text-underline:hover::after {
    transform: scaleX(1);
}

.text-light {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

/* ========================================================================== */
/* FORM SIGNUP SECTION */
/* ========================================================================== */

.form-signup-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    gap: 8px;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease-out;
}

.form-signup-section a {
    display: inline-block;
}

.form-signup-section span {
    color: var(--text-primary);
    font-weight: 500;
}

.form-signup-section .text-light {
    color: var(--text-primary);
}

/* ========================================================================== */
/* PWA OFFCANVAS */
/* ========================================================================== */

.offcanvas {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px 20px 0 0;
}

.offcanvas-body {
    padding: 30px 20px;
    text-align: center;
}

.offcanvas-body .logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    animation: float 3s ease-in-out infinite;
}

.offcanvas-body h5.title {
    color: var(--text-primary);
    font-weight: 700;
    margin: 15px 0;
}

.pwa-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.pwa-btn {
    animation: pulseGlow 2s infinite;
}

.pwa-close {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
}

.pwa-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.pwa-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* ========================================================================== */
/* UTILITIES */
/* ========================================================================== */

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.ms-3 {
    margin-left: 1.5rem;
}

.ms-2 {
    margin-left: 1rem;
}

.d-block {
    display: block;
}

.text-primary {
    color: var(--primary);
}

/* ========================================================================== */
/* RESPONSIVE */
/* ========================================================================== */

@media (max-width: 576px) {
    .join-area {
        padding: 35px 20px;
    }
    
    .started h1.title {
        font-size: 1.75rem;
    }
    
    .started p {
        font-size: 0.85rem;
    }
    
    .input-group-text,
    .form-control,
    .show-pass {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .form-signup-section {
        gap: 5px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .join-area {
        padding: 30px 15px;
        border-radius: 12px;
    }
    
    .started h1.title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .started p {
        font-size: 0.8rem;
    }
    
    .input-group-text,
    .form-control,
    .show-pass {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .btn-primary {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
}

@media (min-width: 1024px) {
    .started h1.title {
        font-size: 3rem;
    }
}

/* ========================================================================== */
/* PERFORMANCE - PRINT STYLES */
/* ========================================================================== */

@media print {
    body, .page-wraper {
        background: white;
    }
    
    .join-area {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ========================================================================== */
/* DARK MODE SUPPORT */
/* ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: rgba(255, 255, 255, 0.7);
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --text-primary: #0a0e27;
        --text-secondary: rgba(10, 14, 39, 0.7);
    }
}
