/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-indigo: #6366f1;
    --gradient-primary: linear-gradient(135deg, #000000 0%, #404040 100%);
    --gradient-secondary: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-black: #ffffff;
    --primary-white: #0a0e1a;
    --gray-50: #151b2e;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #ffffff;
    --accent-blue: #1e40af;
    --accent-green: #059669;
    --accent-yellow: #d97706;
    --accent-red: #dc2626;
    --accent-purple: #7c3aed;
    --accent-indigo: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.7);
}

/* Dark mode text improvements */
[data-theme="dark"] .stat-number {
    color: var(--primary-black);
}

[data-theme="dark"] .welcome-card {
    background: var(--gradient-primary);
}

[data-theme="dark"] .package.popular {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: var(--accent-blue);
}

/* Poll Card Styles */
.poll-card {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.poll-card .card-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.poll-card .card-title h2 {
    color: var(--primary-white) !important;
    font-weight: 800;
    font-size: 1.5rem;
}

.poll-card .actions-subtitle {
    color: var(--primary-white) !important;
    opacity: 0.8;
}

.poll-card .card-content p {
    color: var(--primary-white) !important;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.6;
}

.poll-preview-stats {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.poll-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    min-width: 120px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.poll-stat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.poll-stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-white) !important;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.poll-stat-label {
    font-size: 0.85rem;
    color: var(--primary-white) !important;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.poll-card .btn {
    font-weight: 700;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.poll-card .btn-primary {
    background: var(--primary-white);
    color: var(--primary-black);
    border: 3px solid var(--primary-white);
}

.poll-card .btn-primary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.poll-card .btn-secondary {
    background: transparent;
    color: var(--primary-white);
    border: 3px solid var(--primary-white);
}

.poll-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--primary-black);
    line-height: 1.6;
    overflow-x: hidden !important;
    min-height: 100svh;
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 2001;
    display: none;
    width: 48px;
    height: 48px;
    background: var(--primary-white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition);
}

.menu-bar {
    width: 18px;
    height: 2px;
    background: var(--primary-black);
    border-radius: 1px;
    transition: var(--transition);
}

.mobile-menu-btn.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Backdrop */
.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: var(--transition);
}

.mobile-backdrop.active {
    display: block;
    opacity: 1;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    background: var(--gray-200);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--gray-300);
}

.theme-toggle:hover {
    background: var(--gray-300);
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--primary-white);
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.theme-toggle-slider i {
    font-size: 0.8rem;
    color: var(--accent-yellow);
}

[data-theme="dark"] .theme-toggle {
    background: var(--gray-700);
    border-color: var(--gray-600);
}

[data-theme="dark"] .theme-toggle-slider {
    left: calc(100% - 26px);
    background: var(--gray-800);
}

[data-theme="dark"] .theme-toggle-slider i {
    color: var(--accent-blue);
}

/* Particle Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    z-index: -1;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    transition: var(--transition);
}

[data-theme="dark"] #particles-js {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Ensure full-height background on mobile browsers with dynamic toolbars */
@supports (height: 100dvh) {
    #particles-js {
        height: 100dvh;
    }
}

/* Dashboard Loading Screen */
.dashboard-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dashboard-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.loader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-black);
    margin-bottom: 2rem;
}

.logo-animation {
    width: 60px;
    height: 60px;
    background: var(--primary-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    animation: logoSpin 2s linear infinite;
}

.loader-text {
    font-family: 'JetBrains Mono', monospace;
}

.loader-progress {
    width: 100%;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-black);
    width: 0%;
    animation: loadProgress 3s ease-in-out;
}

.progress-text {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.loader-tips {
    margin-top: 1rem;
}

.loader-tips p {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-style: italic;
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden !important;
    width: 100% !important;
}

/* Enhanced Sidebar */
.sidebar {
    width: 280px !important;
    background: var(--primary-white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 2000 !important;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    overflow-x: hidden !important;
    max-width: 280px !important;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-black);
    color: var(--primary-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}

.sidebar-close:hover {
    background: var(--gray-100);
    color: var(--primary-black);
}

/* User Profile Section */
.sidebar-user {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.user-avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.user-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-200);
    transition: var(--transition);
}

.user-avatar:hover img {
    border-color: var(--primary-black);
}

.user-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--primary-white);
}

.user-status.online {
    background: var(--accent-green);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    opacity: 0;
    transition: var(--transition);
}

.user-avatar:hover .avatar-overlay {
    opacity: 1;
}

.user-info {
    text-align: center;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.user-university {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.user-level {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.level-badge {
    padding: 0.25rem 0.75rem;
    background: var(--accent-blue);
    color: var(--primary-white);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.level-progress {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: var(--accent-blue);
    width: 0%;
    transition: width 1s ease;
}

/* Navigation Menu */
.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    list-style: none;
    overflow-y: auto;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    border-radius: 0;
}

.menu-link:hover {
    background: var(--gray-50);
    color: var(--primary-black);
}

.menu-item.active .menu-link {
    background: var(--primary-black);
    color: var(--primary-white);
}

.menu-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

.menu-badge {
    padding: 0.25rem 0.5rem;
    background: var(--accent-green);
    color: var(--primary-white);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.menu-badge.coming-soon {
    background: var(--gray-400);
}

.menu-badge.transfer-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    animation: transferGlow 2s ease-in-out infinite alternate;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.menu-badge.chat-badge {
    background: var(--danger-color);
}

@keyframes transferGlow {
    from { 
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
        transform: scale(1);
    }
    to { 
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
        transform: scale(1.05);
    }
}

.menu-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-black);
    transition: var(--transition);
}

.menu-item.active .menu-indicator {
    height: 60%;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.credit-widget {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.credit-widget:hover {
    background: var(--gray-100);
}

.credit-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.credit-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-yellow);
    color: var(--primary-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.credit-info {
    flex: 1;
}

.credit-amount {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
}

.credit-label {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.credit-actions {
    margin-top: 0.5rem;
}

.btn-credit-buy {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-black);
    color: var(--primary-white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-credit-buy:hover {
    background: var(--gray-800);
}

.logout-btn {
    width: 100%;
    padding: 0.75rem;
    background: none;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--primary-white);
}

/* Main Content */
.main-content {
    flex: 1 !important;
    margin-left: 280px !important;
    padding: 2rem;
    transition: var(--transition);
    min-height: 100vh;
    position: relative !important;
    z-index: 1 !important;
    overflow-x: hidden !important;
    width: calc(100% - 280px) !important;
    max-width: calc(100% - 280px) !important;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--primary-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.mobile-menu-trigger {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.mobile-menu-trigger:hover {
    background: var(--gray-200);
    color: var(--primary-black);
}

.welcome-section {
    flex: 1;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.greeting {
    color: var(--gray-600);
    font-weight: 600;
}

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

.welcome-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-widgets {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search Widget */
.search-widget {
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 250px;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--primary-white);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--primary-black);
    background: var(--gray-100);
}

/* Credits Display */
.credits-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--primary-black);
    color: var(--primary-white);
    border-radius: var(--border-radius);
    font-weight: 600;
}

.credits-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.credits-icon {
    color: var(--accent-yellow);
    font-size: 1.1rem;
}

.credits-data {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.credits-amount {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.credits-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Notifications */
.notifications-dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.notification-btn:hover {
    background: var(--gray-200);
    color: var(--primary-black);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: var(--accent-red);
    color: var(--primary-white);
    border-radius: 10px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 0.25rem;
}

.notification-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--primary-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    display: none;
    z-index: 1000;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow: hidden;
}

.notification-dropdown-content.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-black);
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.mark-all-read:hover {
    background: var(--gray-100);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
}

.notification-empty i {
    font-size: 2rem;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.profile-btn:hover {
    background: var(--gray-200);
}

.profile-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-status {
    position: relative;
}

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-white);
}

.status-dot.online {
    background: var(--accent-green);
}

.profile-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--primary-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    display: none;
    z-index: 1000;
    margin-top: 0.5rem;
}

.profile-dropdown-content.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease;
}

.profile-info {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-details {
    flex: 1;
}

.profile-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.profile-badge {
    padding: 0.25rem 0.5rem;
    background: var(--accent-blue);
    color: var(--primary-white);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.profile-menu {
    padding: 0.5rem 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
}

.profile-menu-item:hover {
    background: var(--gray-50);
    color: var(--primary-black);
}

.profile-menu-item i:first-child {
    margin-right: 0.75rem;
}

.menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

.logout-item {
    color: var(--accent-red) !important;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Welcome Card */
.welcome-card {
    background: var(--gradient-primary);
    color: var(--primary-white);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.welcome-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.bg-pattern {
    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 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
}

.welcome-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.welcome-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.welcome-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.welcome-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-item .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.stat-item .stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
}

.btn-action {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
}

.welcome-illustration {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    z-index: 2;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-white);
    animation: float 4s ease-in-out infinite;
}

.element-1 {
    top: 10px;
    left: 10px;
    animation-delay: 0s;
}

.element-2 {
    top: 20px;
    right: 20px;
    animation-delay: 1s;
}

.element-3 {
    bottom: 30px;
    left: 30px;
    animation-delay: 2s;
}

.element-4 {
    bottom: 10px;
    right: 10px;
    animation-delay: 3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(180deg);
    }
}

/* Enhanced Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--primary-white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-blue);
}

.upload-card::before {
    background: var(--accent-blue);
}

.download-card::before {
    background: var(--accent-green);
}

.credits-card::before {
    background: var(--accent-yellow);
}

.rating-card::before {
    background: var(--accent-purple);
}

.viewed-papers-card::before {
    background: var(--accent-indigo);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-white);
}

.upload-icon {
    background: var(--accent-blue);
}

.download-icon {
    background: var(--accent-green);
}

.credits-icon {
    background: var(--accent-yellow);
}

.rating-icon {
    background: var(--accent-purple);
}

.viewed-papers-icon {
    background: var(--accent-indigo);
}

.stat-menu-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.stat-menu-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.stat-content {
    margin-bottom: 1rem;
}

.stat-main {
    margin-bottom: 0.75rem;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-white);
    margin-bottom: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

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

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

.change-period {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 400;
}

.stat-progress {
    margin-top: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.progress-value {
    font-weight: 600;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 3px;
    transition: width 1.5s ease;
}

.progress-actions {
    margin-top: 0.75rem;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.stars .fas {
    color: var(--accent-yellow);
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: var(--primary-white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.activity-count,
.actions-subtitle,
.recommendations-subtitle,
.achievements-subtitle {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-content {
    padding: 1.5rem;
    min-height: 200px;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.activity-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    border: 2px solid var(--primary-white);
    box-shadow: 0 0 0 2px var(--accent-blue);
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.activity-content p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.activity-empty {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.activity-empty h3 {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.activity-empty p {
    margin-bottom: 1rem;
}

/* Quick Actions */
.action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--gray-100);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.action-item:hover {
    border-color: var(--primary-black);
    background: var(--gray-50);
    transform: translateY(-2px);
}

.action-item.featured {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, #f8faff 0%, #e0f2fe 100%);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.upload-action {
    background: var(--accent-blue);
}

.browse-action {
    background: var(--accent-green);
}

.credits-action {
    background: var(--accent-yellow);
}

.profile-action {
    background: var(--accent-purple);
}

.invite-action {
    background: var(--accent-red);
}

.transfer-action {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.help-action {
    background: var(--gray-600);
}

.action-content {
    flex: 1;
}

.action-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.action-meta {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.reward {
    
    color: var(--primary-black);
}

.cost {
    
    color: var(--primary-black);
}

.offer {
    
    color: var(--primary-black);
}

.status {
    
    color: var(--gray-600);
}

.bonus {
    
    color: var(--primary-black);
}

.xp-reward {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    animation: xpGlow 2s ease-in-out infinite alternate;
}

@keyframes xpGlow {
    from { 
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    }
    to { 
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
    }
}

/* ========== TRANSFER TOKENS CARD STYLES ========== */

.transfer-tokens-card {
    background: linear-gradient(135deg, #ffffff, #fefbff);
    border: 1px solid #e0f2fe;
    position: relative;
    overflow: hidden;
}

.transfer-tokens-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #10b981);
}

.transfer-tokens-card .card-title h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #111827;
}

.transfer-tokens-card .card-title h2 i {
    color: #fbbf24;
    animation: tokenRotate 3s ease-in-out infinite;
}

@keyframes tokenRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.tokens-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Transfer Progress Section */
.transfer-progress-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.9rem;
}

.progress-stats {
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
}

.transfer-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.transfer-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.transfer-progress-bar .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* XP Rewards Section */
.xp-rewards-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    border-radius: 12px;
    border: 1px solid #fed7aa;
}

.xp-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.xp-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    animation: xpPulse 2s ease-in-out infinite;
}

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

.xp-total {
    text-align: right;
}

.xp-label {
    display: block;
    font-size: 0.8rem;
    color: #92400e;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.xp-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #f59e0b;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Transfer Stats Grid */
.transfer-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.transfer-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.transfer-stat:hover {
    background: #ffffff;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.stat-icon.sent {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-icon.received {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.credits {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.stat-icon.level {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-content {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Recent Transfers Section */
.recent-transfers-section {
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.view-all-link {
    font-size: 0.8rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.transfers-list {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.transfers-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
}

.transfers-empty .empty-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.transfers-empty p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Transfer Item */
.transfer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s ease;
}

.transfer-item:hover {
    background: #f9fafb;
}

.transfer-item:last-child {
    border-bottom: none;
}

.transfer-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.transfer-item.sent .transfer-item-icon {
    background: #fee2e2;
    color: #dc2626;
}

.transfer-item.received .transfer-item-icon {
    background: #dcfce7;
    color: #16a34a;
}

.transfer-item-content {
    flex: 1;
}

.transfer-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.transfer-item-name {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin: 0;
}

.transfer-item-amount {
    font-weight: 700;
    font-size: 0.8rem;
}

.transfer-item.sent .transfer-item-amount {
    color: #dc2626;
}

.transfer-item.received .transfer-item-amount {
    color: #16a34a;
}

.transfer-item-details {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Quick Actions */
.transfer-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.quick-action-btn.transfer-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-color: #f59e0b;
}

.quick-action-btn.transfer-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.quick-action-btn.history-btn {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.quick-action-btn.history-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .transfer-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .xp-info {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .xp-total {
        text-align: center;
    }
    
    .transfer-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.support {
    
    color: var(--primary-black);
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-item {
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.recommendation-item:hover {
    border-color: var(--primary-black);
    background: var(--gray-50);
}

.recommendation-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.recommendation-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.recommendation-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recommendation-tag {
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--gray-600);
}

.recommendations-empty {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.recommendations-empty .empty-icon {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.recommendations-empty h3 {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.achievement-item {
    text-align: center;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.achievement-item:hover {
    border-color: var(--accent-yellow);
    background: var(--gray-50);
    transform: translateY(-2px);
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 2rem;
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

.achievement-item.locked .achievement-icon {
    color: var(--gray-300);
}

.achievement-info h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.achievement-info p {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.achievement-progress {
    font-size: 0.7rem;
    color: var(--gray-400);
    font-family: 'JetBrains Mono', monospace;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
    outline: 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;
}

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

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

.btn-primary:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--primary-white);
    color: var(--primary-black);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--primary-black);
    background: var(--gray-50);
}

.btn-ghost {
    background: none;
    color: var(--gray-600);
    border: 2px solid transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--primary-black);
}

.btn-outline {
    background: none;
    color: var(--primary-black);
    border: 2px solid var(--gray-200);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-text {
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--primary-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.modal-title p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Credit Packages */
.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.package {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: var(--primary-white);
}

.package:hover {
    border-color: var(--primary-black);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.package.selected {
    border-color: var(--primary-black);
    background: var(--gray-50);
    box-shadow: var(--shadow-lg);
}

.package.popular {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, #f8faff 0%, #e0f2fe 100%);
}

.package-ribbon {
    position: absolute;
    top: 1rem;
    right: -0.5rem;
    background: var(--accent-blue);
    color: var(--primary-white);
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(10deg);
}

.package-ribbon.best {
    background: var(--accent-green);
}

.package-ribbon.premium {
    background: var(--accent-purple);
}

.package-header {
    margin-bottom: 1.5rem;
}

.package-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1rem;
}

.package-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1.2rem;
    color: var(--gray-500);
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
}

.original-price {
    font-size: 1rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.package-credits {
    margin-bottom: 1.5rem;
}

.credits-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-white);
    font-family: 'JetBrains Mono', monospace;
}

.credits-text {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-left: 0.5rem;
}

.package-features {
    text-align: left;
    margin-bottom: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.feature i {
    color: var(--accent-green);
    font-size: 0.8rem;
    width: 16px;
}

.feature.highlight {
    color: var(--primary-black);
    font-weight: 600;
}

.feature.highlight i {
    color: var(--accent-yellow);
}

.feature:last-child {
    margin-bottom: 0;
}

.package-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
}

.package-value {
    color: var(--gray-500);
}

.savings {
    background: var(--accent-green);
    color: var(--primary-white);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.payment-security {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.security-item i {
    color: var(--accent-green);
}

.selected-package {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.package-name {
    font-weight: 600;
    color: var(--primary-black);
}

.selected-package .package-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-black);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-spinner p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.toast {
    background: var(--primary-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
    position: relative;
}

.toast.success {
    border-left: 4px solid var(--accent-green);
}

.toast.error {
    border-left: 4px solid var(--accent-red);
}

.toast.warning {
    border-left: 4px solid var(--accent-yellow);
}

.toast.info {
    border-left: 4px solid var(--accent-blue);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast.success .toast-icon {
    color: var(--accent-green);
}

.toast.error .toast-icon {
    color: var(--accent-red);
}

.toast.warning .toast-icon {
    color: var(--accent-yellow);
}

.toast.info .toast-icon {
    color: var(--accent-blue);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Comprehensive Responsive Design */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .main-content {
        padding: 2.5rem;
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .recent-papers-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Desktop (1200px - 1439px) */
@media (max-width: 1439px) {
    .main-content {
        padding: 2rem;
    }

    .search-input {
        width: 220px;
    }

    .welcome-stats {
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet Landscape (1024px - 1199px) */
@media (max-width: 1199px) {
    .main-content {
        padding: 1.5rem;
    }

    .search-input {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .recent-papers-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%) !important;
        width: 280px !important;
        position: fixed !important;
        z-index: 2000 !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.25rem;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-trigger {
        display: flex;
    }

    .sidebar-close {
        display: flex;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.25rem;
    }

    .search-widget {
        width: 100%;
        max-width: 300px;
    }
    
    .search-input {
        width: 100%;
    }

    .welcome-stats {
        gap: 1rem;
    }

    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.25rem;
    }
    
    .recent-papers-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* Mobile Landscape & Large Mobile (481px - 767px) */
@media (max-width: 767px) {
    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-widgets {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        order: 1;
    }
    
    .search-widget {
        order: 1;
        width: 100%;
        max-width: 300px;
    }
    
    .search-input {
        width: 100%;
    }

    .credits-display {
        order: 2;
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        background: var(--gray-100);
        border-radius: 12px;
    }
    
    .notification-btn, .profile-btn {
        order: 3;
    }

    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .welcome-heading {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .welcome-stats {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .stat-item {
        align-items: center;
        text-align: center;
    }

    .welcome-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .welcome-illustration {
        width: 100px;
        height: 100px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        text-align: center;
    }

    .credit-packages {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }

    .payment-security {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    /* Sidebar adjustments */
    .sidebar {
        width: 280px;
    }
    
    .sidebar-user {
        padding: 1rem;
    }
    
    .user-info h3 {
        font-size: 1rem;
    }
    
    .user-info p {
        font-size: 0.85rem;
    }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .main-content {
        margin-left: 0 !important;
        padding: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .dashboard-header {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .welcome-title {
        font-size: 1.25rem;
        line-height: 1.1;
    }
    
    .welcome-heading {
        font-size: 1.3rem;
    }

    .welcome-card {
        padding: 1rem;
    }
    
    .welcome-actions {
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }

    .card-header,
    .card-content {
        padding: 1rem;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
        top: 10px;
    }

    .toast {
        min-width: auto;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .credits-data {
        align-items: center;
        text-align: center;
    }
    
    .credits-display {
        padding: 0.6rem 1rem;
    }

    .btn-text {
        display: none;
    }

    .header-widgets {
        gap: 0.5rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-widget {
        width: 100%;
    }

    .notification-dropdown-content,
    .profile-dropdown-content {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3000;
    }
    
    .notification-dropdown-content > div,
    .profile-dropdown-content > div {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 16px;
        box-shadow: var(--shadow-xl);
    }

    .welcome-stats {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        gap: 0.5rem;
    }
    
    .stat-item {
        flex: 1;
        min-width: 0;
    }

    .package {
        padding: 1rem;
    }

    .amount {
        font-size: 2.2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Sidebar mobile optimization */
    .sidebar {
        width: 100vw;
        max-width: 320px;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .sidebar-menu {
        padding: 0 0.5rem;
    }
    
    .menu-link {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .menu-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .credit-widget {
        margin: 1rem;
        padding: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn-small {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Small Mobile (320px - 375px) */
@media (max-width: 375px) {
    .main-content {
        margin-left: 0 !important;
        padding: 0.5rem;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .dashboard-header {
        padding: 0.5rem;
    }
    
    .welcome-title {
        font-size: 1.1rem;
    }
    
    .welcome-heading {
        font-size: 1.2rem;
    }
    
    .welcome-card {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 0.6rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }

    .package-price .amount {
        font-size: 2rem;
    }

    .credits-amount {
        font-size: 1.4rem;
    }

    .element {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .package {
        padding: 0.75rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .sidebar {
        max-width: 280px;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .dashboard-header {
        padding: 0.5rem 1rem;
    }
    
    .welcome-card {
        padding: 0.75rem 1rem;
        flex-direction: row;
        text-align: left;
    }
    
    .welcome-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stat-card {
        padding: 0.5rem;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .sidebar-user {
        padding: 0.75rem;
    }
    
    .menu-link {
        padding: 0.5rem 0.75rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-image, .user-avatar img, .profile-btn img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.word-break {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Performance Optimizations */
.sidebar,
.main-content,
.modal-content {
    will-change: transform;
}

.stat-card,
.dashboard-card,
.action-item,
.package {
    will-change: transform, box-shadow;
}

/* Print Styles */
@media print {

    .sidebar,
    .mobile-menu-btn,
    .mobile-backdrop,
    .header-widgets,
    .welcome-actions,
    .card-actions,
    .modal,
    .toast-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .dashboard-card,
    .stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

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

/* Payment Header */
.payment-header {
    margin-bottom: 32px;
}

.payment-welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.payment-welcome-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.payment-welcome-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.payment-welcome-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.payment-welcome-text p {
    font-size: 16px;
    opacity: 0.9;
}

.payment-security-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.security-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.security-badge i {
    font-size: 16px;
}

/* Credit Packages Section */
.credit-packages-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.package {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.package:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.package.popular {
    border-color: #ff6b6b;
    transform: scale(1.05);
}

.package.best-value {
    border-color: #4ecdc4;
}

.package-ribbon {
    position: absolute;
    top: 16px;
    right: -30px;
    background: #ff6b6b;
    color: white;
    padding: 4px 40px;
    font-size: 12px;
    font-weight: 600;
    transform: rotate(45deg);
    z-index: 1;
}

.package-ribbon.best {
    background: #4ecdc4;
}

.package-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.package-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 20px;
}

.currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
}

.original-price {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}

.package-credits {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.credits-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.credits-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.package-features {
    margin-bottom: 24px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature i {
    color: #4ecdc4;
    font-size: 16px;
}

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

.package-value .savings {
    background: #4ecdc4;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Payment Form Section */
.payment-form-section {
    margin-top: 32px;
}

.payment-form-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

.payment-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.selected-package-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.selected-package-summary h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.package-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    border-top: 2px solid #e9ecef;
    padding-top: 12px;
}

/* Payment Method Section */
.payment-method-section {
    margin-bottom: 32px;
}

.payment-method-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.payment-method {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.payment-method-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-method-header i {
    font-size: 20px;
    color: var(--primary-color);
}

.upi-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.upi-qr-section {
    text-align: center;
}

.upi-qr-code {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 2px solid #e9ecef;
}

.upi-info p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.upi-info strong {
    color: var(--text-primary);
}

.upi-instructions h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.upi-instructions ol {
    padding-left: 20px;
}

.upi-instructions li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.upi-instructions strong {
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

/* Invoice Modal */
.invoice-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.invoice-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.invoice-logo img {
    max-width: 120px;
}

.invoice-details h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.invoice-details p {
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-secondary);
}

.invoice-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.invoice-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.invoice-section p {
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-secondary);
}

.invoice-items {
    grid-column: 1 / -1;
}

.invoice-items table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.invoice-items th,
.invoice-items td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.invoice-items th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-items .total-row {
    background: #f8f9fa;
    font-weight: 700;
}

.invoice-footer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 24px;
    border-top: 2px solid #e9ecef;
}

.payment-instructions h4,
.invoice-notes h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.payment-instructions ol {
    padding-left: 20px;
}

.payment-instructions li,
.invoice-notes p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive Design for Payment */
@media (max-width: 768px) {
    .payment-container {
        padding: 16px;
    }
    
    .payment-welcome-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .payment-welcome-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .payment-security-badges {
        justify-content: center;
    }
    
    .credit-packages {
        grid-template-columns: 1fr;
    }
    
    .package {
        padding: 24px;
    }
    
    .upi-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .upi-qr-code {
        width: 150px;
        height: 150px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .invoice-body {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .invoice-footer {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .invoice-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .payment-welcome-text h2 {
        font-size: 24px;
    }
    
    .package {
        padding: 20px;
    }
    
    .amount {
        font-size: 28px;
    }
    
    .credits-amount {
        font-size: 24px;
    }
    
    .payment-form-card {
        padding: 20px;
    }
    
    .invoice-content {
        padding: 20px;
    }
}