/* ========================================
   KOKO - Auth Pages Styles
   Matching Website Theme with Animations
======================================== */

:root {
    /* Primary Colors - Matching Website */
    --primary: #00DFA3;
    --primary-dark: #00c78e;
    --primary-light: #33e5b5;
    --primary-glow: rgba(0, 223, 163, 0.3);
    
    /* Secondary Colors */
    --secondary: #6366f1;
    --secondary-dark: #4f46e5;
    
    /* Accent Colors */
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-cyan: #06b6d4;
    
    /* Dark Theme Colors */
    --dark-900: #030712;
    --dark-800: #0a0f1a;
    --dark-700: #111827;
    --dark-600: #1a2234;
    --dark-500: #243049;
    
    /* Light Colors */
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    
    /* Status */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-800);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--gray-300);
}

/* ========================================
   Animated Background
======================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Grid Overlay */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.auth-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 223, 163, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 223, 163, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Glowing Orbs */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 15s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-pink);
    top: 40%;
    left: 10%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    33% { 
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.5;
    }
    66% { 
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.3;
    }
}

/* Floating Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 15s ease-in-out infinite;
}

@keyframes particleFloat {
    0% { 
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Cyber Lines */
.cyber-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.cyber-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    height: 1px;
    animation: cyberLine 8s ease-in-out infinite;
}

.cyber-line:nth-child(1) {
    top: 20%;
    width: 200px;
    animation-delay: 0s;
}

.cyber-line:nth-child(2) {
    top: 40%;
    width: 150px;
    animation-delay: 2s;
}

.cyber-line:nth-child(3) {
    top: 60%;
    width: 180px;
    animation-delay: 4s;
}

.cyber-line:nth-child(4) {
    top: 80%;
    width: 120px;
    animation-delay: 6s;
}

@keyframes cyberLine {
    0% { 
        left: -200px;
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        left: calc(100% + 200px);
        opacity: 0;
    }
}

/* ========================================
   Auth Container & Card
======================================== */
.auth-container {
    width: 100%;
    max-width: 440px;
    z-index: 10;
    position: relative;
}

.auth-card {
    background: linear-gradient(145deg, rgba(26, 34, 52, 0.9) 0%, rgba(10, 15, 26, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 223, 163, 0.2);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(0, 223, 163, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: cardSlideUp 0.6s ease-out;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.auth-card.register-card {
    max-width: 500px;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Glow Effect on Hover */
.auth-card:hover {
    border-color: rgba(0, 223, 163, 0.4);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 223, 163, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ========================================
   Auth Header
======================================== */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(0, 223, 163, 0.3));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(0, 223, 163, 0.3));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 30px rgba(0, 223, 163, 0.5));
        transform: scale(1.02);
    }
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--dark-900);
    box-shadow: 0 10px 30px rgba(0, 223, 163, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
}

.logo-container h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-container h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--gray-400);
    font-size: 14px;
    margin: 0;
}

/* ========================================
   Form Styles
======================================== */
.auth-form {
    margin-top: 25px;
}

.form-floating {
    position: relative;
    margin-bottom: 20px;
}

.form-floating > .form-control {
    height: 58px;
    padding: 24px 16px 8px 48px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--white);
    transition: all 0.3s ease;
}

.form-floating > .form-control::placeholder {
    color: transparent;
}

.form-floating > .form-control:focus {
    border-color: var(--primary);
    background: rgba(0, 223, 163, 0.05);
    box-shadow: 0 0 0 4px rgba(0, 223, 163, 0.1);
    color: var(--white);
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 18px 16px 18px 48px;
    pointer-events: none;
    border: 2px solid transparent;
    transform-origin: 0 0;
    transition: all 0.2s ease;
    color: var(--gray-400);
    font-size: 14px;
}

.form-floating .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    z-index: 5;
    transition: color 0.3s ease;
    font-size: 16px;
}

.form-floating > .form-control:focus ~ .input-icon {
    color: var(--primary);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 1;
    transform: scale(0.85) translateY(-1.5rem) translateX(0.15rem);
    background: var(--dark-600);
    padding: 2px 8px;
    height: auto;
    left: 42px;
    top: 0;
    border-radius: 4px;
    color: var(--primary);
}

/* Remove Bootstrap floating label ::after background */
.form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.form-floating > .form-select ~ label::after,
.form-floating > .form-control:focus ~ label::after,
.form-floating > select.form-control ~ label::after {
    background-color: transparent !important;
    content: none;
}

/* Select Styling */
.form-floating > select.form-control {
    padding-top: 24px;
    padding-bottom: 8px;
    cursor: pointer;
}

.form-floating > select.form-control ~ label {
    opacity: 1;
    transform: scale(0.85) translateY(-1.5rem) translateX(0.15rem);
    background: var(--dark-600);
    padding: 2px 8px;
    height: auto;
    left: 42px;
    top: 0;
    border-radius: 4px;
    color: var(--primary);
}

.form-floating > select.form-control option {
    background: var(--dark-700);
    color: var(--white);
}

/* Password Field */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-500);
    z-index: 10;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Form Check */
.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 223, 163, 0.2);
}

.form-check-label {
    font-size: 14px;
    color: var(--gray-400);
    margin-left: 5px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ========================================
   Buttons
======================================== */
.btn-auth {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--dark-900);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 223, 163, 0.4);
    color: var(--dark-900);
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

/* Back Button */
.btn-back {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 223, 163, 0.1);
    transform: translateX(-3px);
}

/* ========================================
   Auth Footer
======================================== */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: var(--gray-400);
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ========================================
   Crypto Floating Animation (Inside Card)
======================================== */
.crypto-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-coin {
    position: absolute;
    font-size: 20px;
    opacity: 0.08;
    animation: coinFloat 8s ease-in-out infinite;
}

.coin-1 {
    top: 15%;
    left: 8%;
    color: var(--primary);
    animation-delay: 0s;
}

.coin-2 {
    top: 50%;
    right: 8%;
    color: var(--secondary);
    animation-delay: 2s;
}

.coin-3 {
    bottom: 15%;
    left: 15%;
    color: var(--accent-orange);
    animation-delay: 4s;
}

@keyframes coinFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.08;
    }
    50% { 
        transform: translateY(-15px) rotate(15deg);
        opacity: 0.15;
    }
}

/* ========================================
   Step Indicator (Register/Forgot)
======================================== */
.step-header {
    margin-bottom: 25px;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-number.active {
    background: var(--primary);
    color: var(--dark-900);
    box-shadow: 0 0 20px rgba(0, 223, 163, 0.4);
}

.step-number.completed {
    background: var(--primary);
    color: var(--dark-900);
}

.step-line {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.step-line.active {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(0, 223, 163, 0.3);
}

.step-header h5 {
    text-align: center;
    color: var(--white);
    font-weight: 600;
    margin: 0;
}

/* Form Steps Animation */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: stepFadeIn 0.4s ease;
}

@keyframes stepFadeIn {
    from { 
        opacity: 0; 
        transform: translateX(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* ========================================
   Sponsor Card
======================================== */
.sponsor-info {
    margin-bottom: 20px;
}

.sponsor-card {
    background: rgba(0, 223, 163, 0.1);
    border: 1px solid rgba(0, 223, 163, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 500;
}

.sponsor-card i {
    font-size: 20px;
    color: var(--primary);
}

/* ========================================
   Forgot Password Icon
======================================== */
.forgot-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--dark-900);
    box-shadow: 0 10px 40px rgba(0, 223, 163, 0.3);
    animation: forgotPulse 2s ease-in-out infinite;
}

.forgot-icon.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

@keyframes forgotPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 223, 163, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 15px 50px rgba(0, 223, 163, 0.5);
    }
}

/* ========================================
   Modal Styling
======================================== */
.modal-content {
    background: var(--dark-700);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
}

.modal-title {
    font-weight: 600;
    color: var(--white);
}

.modal-body {
    padding: 24px;
}

.modal-body h6 {
    color: var(--white);
    font-weight: 600;
    margin-top: 15px;
}

.modal-body p {
    color: var(--gray-400);
    font-size: 14px;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
}

.btn-close {
    filter: invert(1);
}

/* ========================================
   SweetAlert Custom Theme
======================================== */
.swal2-popup {
    background: var(--dark-700) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
}

.swal2-title {
    color: var(--white) !important;
}

.swal2-html-container {
    color: var(--gray-300) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--dark-900) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
    border-radius: 10px !important;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 576px) {
    .auth-wrapper {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .logo-container h1 {
        font-size: 26px;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .form-floating > .form-control {
        height: 54px;
    }
    
    .btn-auth {
        height: 50px;
    }
    
    .shape-1 {
        width: 250px;
        height: 250px;
    }
    
    .shape-2 {
        width: 200px;
        height: 200px;
    }
    
    .shape-3 {
        width: 150px;
        height: 150px;
    }
}

/* ========================================
   Utility Classes
======================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: 0 0 20px rgba(0, 223, 163, 0.5);
}
