/* Joe Flash Mobile-First Premium CSS Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables for Consistent Theming */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --crypto-gold: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --dark-bg: #0a0a0b;
    --card-bg: rgba(0, 0, 0, 0.6);
    --card-bg-light: rgba(0, 0, 0, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-primary: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Video Background - Mobile Optimized */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.4) contrast(1.1) saturate(1.2);
}

/* Video Overlay for Better Text Readability */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

/* Mobile-First Video Background Fallback */
@media (max-width: 768px) {
    .video-background video {
        filter: brightness(0.2) contrast(1.2) blur(1px);
    }
    
    .video-overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.7) 50%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
}

/* Main Container Structure */
.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Header Styles - Mobile First */
header {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}


.imageee {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    box-shadow: var(--shadow-primary);
}

.offcanvas-title {
    background: var(--crypto-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.4rem;
}


/* Notification Badge */
.notfywtwo {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--secondary-gradient);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* TradingView Widget - Mobile Optimized */
.tradingview-widget-container {
    margin: 80px 0 20px 0;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.tradingview-widget-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
    filter: blur(1px);
}

/* Hero Section - Mobile Optimized */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-section h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--crypto-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 210, 0, 0.3);
    line-height: 1.2;
}

.hero-section .lead {
    font-size: clamp(1rem, 4vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Sections - Mobile First */
.content-section {
    position: relative;
    z-index: 1;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    margin: 16px;
    padding: 24px 20px;
    box-shadow: var(--shadow-primary);
    max-width: 400px;
    margin: 20px auto;
}

/* Registration/Login Section */
.registration-section, .login-section {
    text-align: center;
    margin-bottom: 40px;
}

.registration-section h2, .login-section h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.form-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-control.regform {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.form-control.regform:focus {
    background: var(--glass-bg);
    border-color: #667eea; /* Primary color */
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-control.regform::placeholder {
    color: var(--text-muted);
}

.error-text {
    display: block;
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 4px;
    min-height: 20px;
    background: rgba(255, 107, 107, 0.1);
    padding: 4px 8px;
    border-radius: var(--border-radius);
    border-left: 3px solid #ff6b6b;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Forgot Password Link - Not in HTML but kept for consistency */
.forgot-password {
    text-align: right;
    margin-bottom: 24px;
}

.forgot-password a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.forgot-password a:hover {
    color: #667eea; /* Primary color */
    text-decoration: underline;
    transform: translateX(4px);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
    border-color: rgba(79, 172, 254, 0.3);
}

.alert-success .alert-icon {
    color: #4facfe;
    margin-right: 8px;
}

.alert-danger {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.alert-danger .alert-icon {
    color: #ff6b6b;
    margin-right: 8px;
}

.alert ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.alert li {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.form-btn {
    flex: 1 1 100%; /* Full width on mobile */
    padding: 14px 25px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-btn.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.form-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    opacity: 0.9;
}

.form-btn.btn-outline-primary {
    background: transparent;
    border-color: var(--glass-border);
    color: var(--text-secondary);
    font-weight: 500;
}

.form-btn.btn-outline-primary:hover {
    border-color: #764ba2;
    color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
}

/* Referral Badge Styling */
.referral-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--crypto-gold);
    color: var(--dark-bg);
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(255, 210, 0, 0.5);
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-2px);}
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--card-border);
    position: relative;
    z-index: 1;
}

/* Utility Classes */
.text-success { color: #00f2fe !important; }

/* Media Query for larger screens (e.g., tablet/desktop) */
@media (min-width: 576px) {
    .content-section {
        padding: 40px;
    }
    
    .form-actions {
        flex-wrap: nowrap; /* Keep buttons inline on larger screens */
    }
}

@media (min-width: 768px) {
    .form-btn {
        flex: 1 1 48%; /* Adjust button size for larger screens */
    }
    .main-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    header {
        min-height: auto;
    }
}

/* Custom Toast Notification Styles */
.custom-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-primary);
    padding: 15px 20px;
    max-width: 300px;
    transform: translateY(100%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    backdrop-filter: blur(15px);
}

.custom-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    gap: 10px;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex-grow: 1;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-error .toast-icon {
    color: #ff6b6b;
}

.toast-info .toast-icon {
    color: #4facfe;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
}