/**
 * XHosting - Futuristic Theme
 * Advanced CSS with glassmorphism, gradients, and animations
 */

:root {
    /* Primary Colors - Futuristic Purple/Blue */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.5);
    
    /* Secondary Colors - Neon Purple */
    --secondary: #8b5cf6;
    --secondary-light: #a78bfa;
    --secondary-dark: #7c3aed;
    --secondary-glow: rgba(139, 92, 246, 0.5);
    
    /* Accent Colors */
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    /* Background Colors */
    --bg-dark: #0f0f1a;
    --bg-darker: #08080f;
    --bg-card: rgba(20, 20, 35, 0.8);
    --bg-card-hover: rgba(30, 30, 50, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    --gradient-glow: linear-gradient(135deg, var(--primary-glow) 0%, var(--secondary-glow) 100%);
    --gradient-rainbow: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --shadow-glow-sm: 0 0 20px var(--primary-glow);
    
    /* Borders */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 10s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Grid Pattern Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* Video Background */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.7);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.25rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
    transform: translateY(-2px);
}

/* Bootstrap Card - Futuristic Theme */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}

.card-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: var(--border-glass);
    padding: var(--spacing-lg) var(--spacing-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.card-header h5,
.card-header h4,
.card-header h3,
.card-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: var(--spacing-xl);
    color: var(--text-primary);
}

.card-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: var(--border-glass);
    padding: var(--spacing-lg) var(--spacing-xl);
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.card-text {
    color: var(--text-secondary);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    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: var(--transition-normal);
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-orange), #d97706);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-glass);
    border: var(--border-glass);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

/* Select Styling */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.form-select option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding: 10px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-glass);
    padding: var(--spacing-md) var(--spacing-xl);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand svg {
    width: 32px;
    height: 32px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    list-style: none;
}

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

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

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

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

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    bottom: 0;
    width: 280px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: var(--border-glass);
    padding: var(--spacing-xl);
    overflow-y: auto;
    z-index: 900;
}

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

.sidebar-menu li {
    margin-bottom: var(--spacing-xs);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 14px 18px;
    color: var(--text-secondary);
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.sidebar-menu a.active {
    background: var(--gradient-primary);
    color: white;
}

.sidebar-menu svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Dropdown */
.sidebar-dropdown {
    position: relative;
}

.sidebar-dropdown-toggle {
    justify-content: space-between;
    cursor: pointer;
}

.dropdown-arrow {
    width: 16px !important;
    height: 16px !important;
    transition: transform 0.3s ease;
}

.sidebar-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-dropdown-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-md);
    margin-top: var(--spacing-xs);
}

.sidebar-dropdown.open .sidebar-dropdown-menu {
    display: block;
}

.sidebar-dropdown-menu li {
    margin-bottom: 0;
}

.sidebar-dropdown-menu a {
    padding-left: 48px;
    font-size: 0.9rem;
}

.sidebar-dropdown-menu a.active {
    background: var(--gradient-primary);
}

.sidebar-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: var(--border-glass);
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    margin-top: 70px;
    padding: var(--spacing-xl);
    min-height: calc(100vh - 70px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

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

.stat-card.primary::before { background: var(--gradient-primary); }
.stat-card.success::before { background: linear-gradient(180deg, var(--accent-green), #059669); }
.stat-card.warning::before { background: linear-gradient(180deg, var(--accent-orange), #d97706); }
.stat-card.danger::before { background: linear-gradient(180deg, var(--accent-red), #dc2626); }

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.stat-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: var(--accent-green); }
.stat-change.negative { color: var(--accent-red); }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
}

.data-table th {
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: var(--border-glass);
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-glass);
}

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

/* Bootstrap Table - Futuristic Theme */
.table {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    border-collapse: collapse;
    background: transparent;
}

.table th,
.table td {
    padding: var(--spacing-md) var(--spacing-lg);
    vertical-align: middle;
    border-top: none;
    border-bottom: var(--border-glass);
}

.table thead th {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    vertical-align: bottom;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.1);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.4);
}

.table-striped tbody tr:nth-of-type(odd) > * {
    background: rgba(0, 0, 0, 0.4);
}

.table-striped tbody tr:nth-of-type(odd):hover,
.table-striped tbody tr:nth-of-type(odd):hover > * {
    background: rgba(99, 102, 241, 0.15);
}

/* Righe pari (quelle che erano bianche) */
.table-striped tbody tr:nth-of-type(even) {
    background: rgba(0, 0, 0, 0.15);
}

.table-striped tbody tr:nth-of-type(even) > * {
    background: rgba(0, 0, 0, 0.15);
}

.table-striped tbody tr:nth-of-type(even):hover,
.table-striped tbody tr:nth-of-type(even):hover > * {
    background: rgba(99, 102, 241, 0.1);
}

.table-hover tbody tr:hover {
    background: rgba(99, 102, 241, 0.15);
    box-shadow: inset 3px 0 0 var(--primary);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius-md);
}

/* Table variants */
.table-dark {
    color: var(--text-primary);
    background: var(--bg-card);
}

.table-dark th,
.table-dark td,
.table-dark thead th {
    border-color: var(--border-glass);
}

/* Table cells styling */
.table td {
    color: var(--text-secondary);
}

.table td strong,
.table td a {
    color: var(--text-primary);
}

.table small {
    color: var(--text-muted);
}

/* Action buttons in tables */
.table .btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

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

.badge-success::before { background: var(--accent-green); }

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

.badge-warning::before { background: var(--accent-orange); }

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.badge-danger::before { background: var(--accent-red); }

.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.badge-info::before { background: var(--accent-cyan); }

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-header {
    animation: fadeIn 0.6s ease-out;
}

.category-section {
    animation: fadeInUp 0.6s ease-out forwards;
}

.category-section h2 {
    opacity: 0;
    animation: slideInLeft 0.5s ease-out forwards;
    animation-delay: 0.2s;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Staggered animation for product cards */
.cards-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.cards-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.cards-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.cards-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.cards-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.cards-grid .product-card:nth-child(6) { animation-delay: 0.6s; }
.cards-grid .product-card:nth-child(7) { animation-delay: 0.7s; }
.cards-grid .product-card:nth-child(8) { animation-delay: 0.8s; }
.cards-grid .product-card:nth-child(9) { animation-delay: 0.9s; }
.cards-grid .product-card:nth-child(10) { animation-delay: 1.0s; }
.cards-grid .product-card:nth-child(11) { animation-delay: 1.1s; }
.cards-grid .product-card:nth-child(12) { animation-delay: 1.2s; }

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}

.product-card-header {
    padding: var(--spacing-xl);
    background: var(--bg-glass);
    border-bottom: var(--border-glass);
}

.product-card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.product-card-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.product-card-body {
    padding: var(--spacing-xl);
}

.product-card-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.product-card-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.product-features {
    list-style: none;
    margin: var(--spacing-lg) 0;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
}

.product-features li svg {
    width: 18px;
    height: 18px;
    color: var(--accent-green);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px var(--secondary-glow); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideIn {
    animation: slideIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-glass);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alerts */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-orange);
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    border-bottom: var(--border-glass);
    margin-bottom: var(--spacing-xl);
}

.tab {
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

/* Modal - Bootstrap compatible with Futuristic Theme */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

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

/* Bootstrap modal compatibility - Futuristic Theme */
.modal.fade {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
}

.modal.fade:not(.show) {
    opacity: 0;
}

.modal.show {
    opacity: 1;
}

/* Center modal vertically and horizontally */
.modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0 auto;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card) !important;
    border: var(--border-glass) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-glow), 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 700px;
}

/* Modal sizes */
.modal-lg .modal-content {
    max-width: 800px;
}

.modal-sm .modal-content {
    max-width: 400px;
}

.modal-header {
    padding: var(--spacing-xl);
    border-bottom: var(--border-glass) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
}

.modal-header .modal-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-header .btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-xl);
    color: var(--text-primary);
}

.modal-footer {
    padding: var(--spacing-xl);
    border-top: var(--border-glass) !important;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg) !important;
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* Form elements in modal */
.modal .form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.modal .form-select,
.modal .form-control {
    background: var(--bg-glass);
    border: var(--border-glass);
    color: var(--text-primary);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.modal .form-select:focus,
.modal .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
}

.modal .form-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.modal .form-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Modal backdrop animation */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(5px);
}

.modal-backdrop.show {
    opacity: 1 !important;
}

/* Bootstrap Container - Futuristic Theme Override */
.container-fluid {
    width: 100%;
    padding-right: var(--spacing-lg);
    padding-left: var(--spacing-lg);
    margin-right: auto;
    margin-left: auto;
}

.container {
    width: 100%;
    padding-right: var(--spacing-lg);
    padding-left: var(--spacing-lg);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container { max-width: 540px; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

@media (min-width: 1400px) {
    .container { max-width: 1320px; }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: var(--border-glass);
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.header-content {
    flex: 1;
    min-width: 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary-light);
}

.breadcrumbs .separator {
    color: var(--text-muted);
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.title-row h1 {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: 0;
    font-size: 2rem;
    flex: 1;
}

.title-row .btn {
    flex-shrink: 0;
    margin-left: auto;
}

/* Server Type Badge */
.server-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-type-badge.vm {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.server-type-badge.dedicated {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Row and Column Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(var(--spacing-md) * -1);
    margin-left: calc(var(--spacing-md) * -1);
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: var(--spacing-md);
    padding-left: var(--spacing-md);
}

/* Column classes */
.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 576px) {
    .col-sm { flex: 1 0 0%; }
    .col-sm-auto { flex: 0 0 auto; width: auto; }
    .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-sm-3 { flex: 0 0 auto; width: 25%; }
    .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-sm-6 { flex: 0 0 auto; width: 50%; }
    .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-sm-9 { flex: 0 0 auto; width: 75%; }
    .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 768px) {
    .col-md { flex: 1 0 0%; }
    .col-md-auto { flex: 0 0 auto; width: auto; }
    .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
    .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-md-9 { flex: 0 0 auto; width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 992px) {
    .col-lg { flex: 1 0 0%; }
    .col-lg-auto { flex: 0 0 auto; width: auto; }
    .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-lg-3 { flex: 0 0 auto; width: 25%; }
    .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
    .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-lg-9 { flex: 0 0 auto; width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

/* Display utilities */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-flex { display: flex !important; }
}

/* Flex utilities */
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

/* Spacing utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--spacing-xs) !important; }
.m-2 { margin: var(--spacing-sm) !important; }
.m-3 { margin: var(--spacing-md) !important; }
.m-4 { margin: var(--spacing-lg) !important; }
.m-5 { margin: var(--spacing-xl) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }
.mt-5 { margin-top: var(--spacing-xl) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mb-5 { margin-bottom: var(--spacing-xl) !important; }

.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }

/* Text utilities */
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--accent-green) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-warning { color: var(--accent-orange) !important; }
.text-info { color: var(--accent-cyan) !important; }
.text-muted { color: var(--text-muted) !important; }

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

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

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

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-glass);
    border-radius: var(--border-radius-xl);
    transition: var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-normal);
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition-normal);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-nav {
        display: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: var(--border-radius-xl);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Code Block */
code {
    font-family: var(--font-mono);
    background: var(--bg-glass);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-cyan);
}

pre {
    background: var(--bg-darker);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    border: var(--border-glass);
}

pre code {
    background: none;
    padding: 0;
}
