/* ==========================================
   VIDPAY ADVANCED THEME - CR-THEME.CSS
   ========================================== */

/* CSS Variables */
:root {
    --cr-primary: #6366F1;
    --cr-primary-dark: #4F46E5;
    --cr-primary-light: #818CF8;
    --cr-secondary: #EC4899;
    --cr-accent: #06B6D4;
    --cr-gradient: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
    --cr-bg: #020617;
    --cr-bg-dark: #020617;
    --cr-surface: #0F172A;
    --cr-surface-alt: #1E293B;
    --cr-border: rgba(255, 255, 255, 0.08);
    --cr-text: #FFFFFF;
    --cr-text-muted: #94A3B8;
    --cr-success: #10B981;
    --cr-danger: #EF4444;
    --cr-warning: #F59E0B;
    --cr-fg: var(--cr-primary);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

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

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Cards */
.cr-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: all 0.4s ease;
}

.cr-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.cr-panel {
    background: var(--cr-surface);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.cr-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Card Icon */
.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--cr-primary), #FF8C00);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--cr-primary), #FF8C00);
    color: white;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--cr-surface-alt);
    color: var(--cr-text);
    border: 1px solid var(--cr-border);
}

.btn-secondary:hover {
    background: var(--cr-surface);
    border-color: var(--cr-primary);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    border-color: var(--cr-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--cr-danger);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--cr-warning);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--cr-success);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

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

.btn-block, .w-full {
    width: 100%;
}

.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Forms */
.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--cr-surface-alt);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-md);
    color: var(--cr-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

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

/* Inputs */
input, select, textarea {
    font-family: var(--font-body);
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--cr-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--cr-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status.blocked, .status.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--cr-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Grid Systems */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-muted { color: var(--cr-text-muted); }
.text-3d {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Section Spacing */
.section {
    padding: 100px 0;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

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

.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-slideIn { animation: slideIn 0.6s ease forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Glassmorphism */
.glass {
    background: rgba(18, 18, 26, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Neon Border */
.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent));
    border-radius: inherit;
    z-index: -1;
    animation: neon-border 3s linear infinite;
}

@keyframes neon-border {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Progress Bar */
.progress-track {
    background: var(--cr-surface-alt);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cr-primary), var(--cr-accent));
    border-radius: 50px;
    transition: width 0.5s ease;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 28px;
    background: var(--cr-surface);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

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

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

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: var(--cr-surface);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .container { padding: 0 20px; }
    .section { padding: 60px 0; }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--cr-surface-alt);
    border-radius: 4px;
}

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

/* Selection */
::selection {
    background: var(--cr-primary);
    color: white;
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--cr-primary);
    outline-offset: 2px;
}

/* Link Styles */
a {
    color: var(--cr-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cr-accent);
}

/* Code */
code {
    background: var(--cr-surface-alt);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9em;
}

/* List Styles */
ul, ol {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Table Base */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--cr-border);
}

th {
    font-weight: 600;
    color: var(--cr-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Avatar */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.mb-6 { margin-bottom: 24px; }
.mt-6 { margin-top: 24px; }
