/* =============================================
   TRADERZ HUB - GLOBAL STYLES
   Modern, Professional Trading Platform Design
   ============================================= */

/* CSS Variables - Design System */
:root {
    /* Colors */
    --primary-bg: #0d1117;
    --secondary-bg: #161b22;
    --tertiary-bg: #21262d;
    --card-bg: #1c2128;
    --card-hover-bg: #262c36;
    
    /* Text Colors */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* Accent Colors */
    --accent-gold: #d1b764;
    --accent-gold-hover: #e6cc7a;
    --accent-gold-dark: #b89c4f;
    
    /* Status Colors */
    --success: #238636;
    --success-light: #2ea043;
    --error: #da3633;
    --error-light: #f85149;
    --warning: #d29922;
    --info: #58a6ff;
    
    /* Profit/Loss */
    --profit: #3fb950;
    --loss: #f85149;
    --breakeven: #8b949e;
    
    /* Borders */
    --border-default: #30363d;
    --border-muted: #21262d;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(209, 183, 100, 0.15);
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #d1b764 0%, #b89c4f 100%);
    --gradient-dark: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
    --gradient-card: linear-gradient(145deg, #1c2128 0%, #161b22 100%);
    
    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: #0a0e17;
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.1), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(209, 183, 100, 0.08), transparent),
        linear-gradient(180deg, #0a0e17 0%, #0f1419 50%, #131722 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--accent-gold);
    color: var(--primary-bg);
}

/* Links */
a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-gold-hover);
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-default);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.site-logo {
    height: 42px;
    width: auto;
    transition: transform var(--transition-base);
}

.site-logo:hover {
    transform: scale(1.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-sm);
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--tertiary-bg);
}

.nav-link.active {
    color: var(--accent-gold);
    background: rgba(209, 183, 100, 0.1);
}

.nav-link i {
    font-size: 0.9rem;
}

/* User Profile Dropdown */
.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    color: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + var(--space-sm));
    right: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm);
    z-index: var(--z-dropdown);
    transition: all 0.2s ease;
    transform: translateY(-10px);
}

/* Invisible bridge to allow mouse movement to dropdown */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(var(--space-sm) + 5px);
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dropdown-content a:hover {
    color: var(--text-primary);
    background: var(--tertiary-bg);
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-default);
    margin: var(--space-sm) 0;
}

.logout-link:hover {
    color: var(--error-light) !important;
}

.logout-link:hover i {
    color: var(--error-light) !important;
}

/* Progress Ring in Nav */
.nav-progress-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle-bg {
    stroke-opacity: 0.3;
}

.progress-ring__circle {
    transition: stroke-dashoffset var(--transition-slow);
    stroke-linecap: round;
}

.progress-text {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-gold);
}

/* Get Started Button */
.get-started-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-gold);
    color: var(--primary-bg);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.get-started-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--primary-bg);
}

.get-started-btn i {
    font-size: 0.85rem;
    transition: transform var(--transition-fast);
}

.get-started-btn:hover i {
    transform: translateX(3px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Mobile Navigation */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--secondary-bg);
    border-left: 1px solid var(--border-default);
    z-index: var(--z-modal);
    transition: right var(--transition-slow);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-default);
}

.mobile-logo {
    height: 32px;
}

.close-mobile-nav {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-nav-content {
    padding: var(--space-md);
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--tertiary-bg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    color: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.mobile-user-details {
    display: flex;
    flex-direction: column;
}

.mobile-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-user-level {
    font-size: 0.85rem;
    color: var(--accent-gold);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: var(--tertiary-bg);
}

.mobile-nav-link i {
    width: 24px;
    text-align: center;
}

.mobile-nav-link.logout:hover {
    color: var(--error-light);
}

.mobile-nav-link.cta-primary {
    background: var(--gradient-gold);
    color: var(--primary-bg);
    font-weight: 600;
    margin-top: var(--space-sm);
}

.mobile-divider {
    border: none;
    border-top: 1px solid var(--border-default);
    margin: var(--space-md) 0;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* =============================================
   FLASH MESSAGES
   ============================================= */
.flash-message {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.flash-success {
    background: rgba(35, 134, 54, 0.15);
    border: 1px solid var(--success);
    color: var(--success-light);
}

.flash-error {
    background: rgba(218, 54, 51, 0.15);
    border: 1px solid var(--error);
    color: var(--error-light);
}

.flash-warning {
    background: rgba(210, 153, 34, 0.15);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.flash-info {
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid var(--info);
    color: var(--info);
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: var(--space-xs);
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-exit {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-success .toast-icon { color: var(--success-light); }
.toast-error .toast-icon { color: var(--error-light); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-title i {
    color: var(--accent-gold);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--primary-bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--tertiary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--card-hover-bg);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
    background: rgba(209, 183, 100, 0.1);
}

.btn-danger {
    background: var(--error);
    color: var(--text-primary);
}

.btn-danger:hover {
    background: var(--error-light);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.05rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--tertiary-bg);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(209, 183, 100, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    padding-right: var(--space-2xl);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--profit);
}

.badge-error {
    background: rgba(248, 81, 73, 0.15);
    color: var(--loss);
}

.badge-warning {
    background: rgba(210, 153, 34, 0.15);
    color: var(--warning);
}

.badge-info {
    background: rgba(88, 166, 255, 0.15);
    color: var(--info);
}

.badge-gold {
    background: rgba(209, 183, 100, 0.15);
    color: var(--accent-gold);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-default);
    padding: var(--space-3xl) var(--space-xl) var(--space-lg);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    max-width: 1400px;
    margin: 0 auto var(--space-2xl);
}

.footer-column h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.footer-column.branding .site-logo {
    height: 36px;
    margin-bottom: var(--space-md);
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.social-icons {
    display: flex;
    gap: var(--space-sm);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--tertiary-bg);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--accent-gold);
    color: var(--primary-bg);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-default);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================
   UTILITIES
   ============================================= */
.text-gold { color: var(--accent-gold); }
.text-success { color: var(--profit); }
.text-error { color: var(--loss); }
.text-muted { color: var(--text-muted); }

.bg-card { background: var(--card-bg); }
.bg-tertiary { background: var(--tertiary-bg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-default);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--tertiary-bg) 25%, var(--card-bg) 50%, var(--tertiary-bg) 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; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-column.branding {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: var(--space-md);
    }
    
    .main-nav {
        display: none;
    }
    
    .nav-progress-ring,
    .get-started-btn {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        padding: var(--space-md);
    }
    
    .footer {
        padding: var(--space-xl) var(--space-md) var(--space-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .footer-column.branding {
        grid-column: 1;
    }
    
    .toast-container {
        left: var(--space-md);
        right: var(--space-md);
        top: auto;
        bottom: var(--space-lg);
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 24px;
        --space-2xl: 32px;
        --space-3xl: 48px;
    }
    
    .site-logo {
        height: 36px;
    }
}

/* =============================================
   GLOBAL ANIMATION UTILITIES
   Micro-animations & Effects
   ============================================= */

/* Base Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(209, 183, 100, 0.3); }
    50% { box-shadow: 0 0 20px rgba(209, 183, 100, 0.6); }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in-down {
    opacity: 0;
    animation: fadeInDown 0.5s ease-out forwards;
}

.animate-fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.5s ease-out forwards;
}

.animate-fade-in-right {
    opacity: 0;
    animation: fadeInRight 0.5s ease-out forwards;
}

.animate-scale-in {
    opacity: 0;
    animation: scaleIn 0.4s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Delay Utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-lg);
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Hover Scale Effect */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Glassmorphism Utility */
.glass {
    background: rgba(30, 30, 40, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

.glass-strong {
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
}

/* Gradient Border Effect */
.gradient-border {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #d1b764, #b89c4f, #d1b764);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Progress Ring Component */
.progress-ring-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-container svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.progress-ring-text {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Number Counter Animation Helper */
[data-count] {
    transition: opacity 0.3s ease;
}

/* Stagger Animation for Lists */
.stagger-list > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-list > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-list > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-list > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-list > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-list > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-list > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-list > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-list > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-list > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-list > *:nth-child(10) { animation-delay: 0.5s; }

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(209, 183, 100, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}
