/**
 * Nexus Scripts - Futuristic Glassmorphism Styles
 * FiveM Marketplace CSS
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(30, 20, 50, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    --accent-cyan: #00d4ff;
    --accent-violet: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #06b6d4;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(139, 92, 246, 0.3);
    --border-glow: rgba(0, 212, 255, 0.5);
    
    --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    --gradient-secondary: linear-gradient(135deg, var(--accent-violet), var(--accent-pink));
    --gradient-dark: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
    
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-neon: 0 0 20px rgba(139, 92, 246, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.5px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-cyan { color: var(--accent-cyan); }
.text-violet { color: var(--accent-violet); }
.text-pink { color: var(--accent-pink); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-violet);
    text-shadow: 0 0 10px var(--accent-violet);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 100px 0 60px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-brand img {
    width: 45px;
    height: 45px;
}

.navbar-brand .logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.navbar-nav a:hover {
    color: var(--text-primary);
}

.navbar-nav a:hover::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}

.btn-danger {
    background: var(--error);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-violet);
    box-shadow: var(--shadow-neon);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

/* Script Card */
.script-card {
    position: relative;
    overflow: hidden;
}

.script-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.script-card .card-image {
    height: 180px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.script-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.script-card .card-image .placeholder-icon {
    font-size: 4rem;
    color: var(--text-muted);
}

.script-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.script-card .card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.script-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.script-card .card-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.script-card .card-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.script-card .card-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.script-card .rating {
    color: var(--warning);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--error);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--info);
    color: var(--info);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
}

.table th {
    background: rgba(139, 92, 246, 0.1);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:last-child {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
}

.badge-violet {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-violet);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ============================================
   GRID & LAYOUT
   ============================================ */

.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-gap {
    gap: 20px;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 280px;
    height: calc(100vh - 80px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 30px 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
    border-left-color: var(--accent-violet);
}

.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), transparent);
}

.sidebar-menu i {
    font-size: 1.2rem;
    width: 24px;
}

/* Sidebar User */
.sidebar-user {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.sidebar-user-name {
    font-weight: 600;
}

.sidebar-user-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */

.dashboard-content {
    margin-left: 280px;
    padding: 30px;
    min-height: calc(100vh - 80px);
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--text-secondary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-violet);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.stat-card-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* Hero Features */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.hero-feature {
    text-align: center;
}

.hero-feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-cyan);
}

.hero-feature-label {
    font-weight: 600;
}

/* ============================================
   SEARCH & FILTERS
   ============================================ */

.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-bar input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    box-shadow: var(--shadow-glow);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--text-primary);
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form .btn {
    width: 100%;
    margin-top: 10px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loader .loader {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.6); }
}

.animate-fade-in { animation: fadeIn 0.5s ease; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease; }
.animate-scale-in { animation: scaleIn 0.5s ease; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-features {
        flex-wrap: wrap;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .navbar-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-content {
        margin-left: 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .auth-card {
        padding: 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .dashboard-header .flex-gap {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .dashboard-header .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ============================================
   ADMIN SIDEBAR RESPONSIVE
   ============================================ */

.admin-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999;
    transition: transform 0.3s ease;
}

.dashboard-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    padding-top: 30px;
}

@media (max-width: 992px) {
    .admin-mobile-header {
        display: flex;
    }
    
    .admin-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        padding-top: 60px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .dashboard-content {
        margin-left: 0;
        padding-top: 90px;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px 15px;
        padding-top: 90px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .stat-card-label {
        font-size: 11px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 700px;
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .flex-gap {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    code {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .sidebar-menu a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .sidebar-user {
        padding: 15px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.p-0 { padding: 0; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
.p-40 { padding: 40px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { display: block !important; }

.cursor-pointer { cursor: pointer; }
.no-select { user-select: none; }

/* Star Rating */
.rating-stars {
    color: var(--warning);
    letter-spacing: 2px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--text-primary);
}

.pagination span.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-item {
    padding: 15px 24px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle input:checked + .toggle-slider {
    background: var(--gradient-primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: var(--text-primary);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
.avatar-xl { width: 100px; height: 100px; font-size: 2rem; }

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Admin Pages - Hide Public Footer */
body.admin-page .footer {
    display: none;
}

body.admin-page .dashboard-content {
    min-height: calc(100vh - 60px);
    padding-bottom: 40px;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}