/* Custom CSS for Nexus Platform */

/* 
   -----------------------------------------
   1. VARIABLES & THEME SETUP
   -----------------------------------------
*/
:root {
    /* Brand Colors */
    --nexus-primary: #4f46e5;
    --nexus-secondary: #7c3aed;
    --nexus-accent: #c026d3;

    /* Enhanced Community Color System */
    --community-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
    --community-physical: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --community-virtual: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --community-hybrid: linear-gradient(135deg, #ec4899 0%, #c026d3 50%, #8b5cf6 100%);

    /* Status Colors */
    --status-pending: #f59e0b;
    --status-approved: #10b981;
    --status-rejected: #ef4444;
    --status-public: #10b981;
    --status-private: #f59e0b;

    /* Community Glassmorphism */
    --community-glass: rgba(255, 255, 255, 0.95);
    --community-glass-dark: rgba(15, 23, 42, 0.85);
    /* For Dark Mode future proofing */
    --community-glass-border: rgba(79, 70, 229, 0.2);
    --community-glass-shadow: 0 8px 32px rgba(79, 70, 229, 0.15);

    /* Typography */
    --font-heading: 'Clash Display', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
}

/* 
   -----------------------------------------
   2. GLOBAL STYLES
   -----------------------------------------
*/
body {
    font-family: var(--font-body);
    background-color: #f8fafc;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Smooth transitions */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 
   -----------------------------------------
   3. ANIMATIONS
   -----------------------------------------
*/
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes networkPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

@keyframes typingBounce {

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

    30% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* 
   -----------------------------------------
   4. COMPONENTS
   -----------------------------------------
*/

/* Buttons */
.btn-gradient {
    background: var(--community-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #c026d3 0%, #7c3aed 50%, #4f46e5 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-gradient:hover::before {
    opacity: 1;
}

/* Cards */
.card {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    letter-spacing: 0.025em;
    border-radius: 9999px;
}

.badge-public {
    background-color: var(--status-public);
}

.badge-private {
    background-color: var(--status-private);
}

.badge-physical {
    background: var(--community-physical);
}

.badge-virtual {
    background: var(--community-virtual);
}

.badge-hybrid {
    background: var(--community-hybrid);
}

/* Text Gradient */
.text-gradient {
    background: var(--community-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--nexus-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Chat Specific overrides */
.chat-bubble {
    border-radius: 18px;
    padding: 12px 18px;
    margin: 5px 0;
    max-width: 75%;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-bubble-sent {
    background: var(--community-primary);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.chat-bubble-received {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}