:root {
    --primary-color: #2E4B9B;
    --secondary-color: #FF9500;
    --accent-color: #4facfe;
    --success-color: #43e97b;
    --danger-color: #ff6b6b;
    --warning-color: #feca57;
    --info-color: #48cae4;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --transition-speed: 0.3s;
    --border-radius: 15px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --box-shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Navigation */
.navbar-brand { 
    font-weight: bold; 
    color: var(--primary-color) !important;
    transition: all var(--transition-speed) ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: all var(--transition-speed) ease;
}

/* Hero Section */
.hero-section { 
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); 
    color: white; 
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    min-height: 50vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-opacity=".1"/><stop offset="100%" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat;
    opacity: 0.1;
}

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

/* Cards */
.service-card { 
    transition: all var(--transition-speed) ease;
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
    height: 100%;
}

.service-card:hover { 
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.wallet-card { 
    background: linear-gradient(135deg, var(--accent-color) 0%, #00f2fe 100%);
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--box-shadow);
}

.commission-card { 
    background: linear-gradient(135deg, var(--success-color) 0%, #38f9d7 100%);
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--box-shadow);
}

.stats-card {
    background: linear-gradient(135deg, var(--info-color) 0%, #74b9ff 100%);
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

/* Footer */
footer { 
    background: linear-gradient(135deg, var(--dark-color) 0%, #34495e 100%); 
    color: white; 
}

/* Loading animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.pulse {
    animation: pulse 2s infinite;
}

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

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

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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

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

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Focus states */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: var(--primary-color);
}

/* Touch-friendly elements */
.btn, .nav-link, .card-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* Status indicators */
.status-indicator {
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.status-indicator.offline::after {
    background: var(--danger-color);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-soft {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.shadow-strong {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

/* Content spacing */
.section-padding {
    padding: 60px 0;
}

.content-spacing > * + * {
    margin-top: 1.5rem;
}

/* Grid improvements */
.equal-height {
    display: flex;
    flex-wrap: wrap;
}

.equal-height > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.equal-height .card {
    flex: 1;
}
