/* User Dashboard Styles */
:root {
    --sidebar-width: 280px;
    --header-height: 70px;
    --card-border-radius: 15px;
    --transition-speed: 0.3s;
    --primary-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --card-hover-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    
    /* Light Theme (Default) */
    --background: #f8f9fa;
    --text-color: #1a1a1a;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --card-bg-hover: #f8f9fa;
    --hover-bg: #f1f3f5;
    --input-bg: #ffffff;
    --disabled-bg: #e9ecef;
    
    /* Common Colors */
    --primary-color: #4cc9f0;
    --primary-dark: #3b9dc0;
    --primary-light: rgba(76, 201, 240, 0.1);
    --accent-color: #7209b7;
    --accent-text: #ffffff;
    --success-color: #34c759;
    --success-dark: #2aa448;
    --success-light: rgba(52, 199, 89, 0.1);
    --warning-color: #ffcc00;
    --warning-light: rgba(255, 204, 0, 0.1);
    --danger-color: #ff3b30;
    --danger-light: rgba(255, 59, 48, 0.1);
}

/* Dark Theme */
body.dark-theme {
    --background: #0d1117;
    --text-color: #e6edf3;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --card-bg: #161b22;
    --card-bg-hover: #1c2128;
    --hover-bg: #21262d;
    --input-bg: #0d1117;
    --disabled-bg: #21262d;
    
    /* Adjust shadows for dark theme */
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    --card-hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Base Styles */
body {
    background-color: var(--background);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dashboard Layout */
.dashboard-main {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
    background-color: var(--section-bg);
}

/* Sidebar Styles */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    border-right: 1px solid rgba(76, 201, 240, 0.1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    height: calc(100vh - var(--header-height));
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: 100;
    overflow-y: auto;
    transition: transform var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
}

.sidebar-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.3);
}

.sidebar-user-info {
    margin-left: 15px;
}

.sidebar-user-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.sidebar-user-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 5px 0 0;
}

.sidebar-balance {
    display: flex;
    flex-direction: column;
    margin: 20px;
    padding: 15px;
    background: rgba(76, 201, 240, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.balance-amount {
    display: flex;
    align-items: center;
    color: var(--text);
    margin-bottom: 12px;
}

.balance-amount i {
    color: var(--accent);
    margin-right: 12px;
    font-size: 18px;
}

.balance-amount span {
    font-weight: 600;
    font-size: 20px;
}

.balance-add-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.balance-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 15px 10px;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.sidebar-menu-item i {
    font-size: 18px;
    margin-right: 15px;
    transition: all 0.2s ease;
}

.sidebar-menu-item span {
    flex: 1;
}

.sidebar-menu-item:hover {
    background: rgba(76, 201, 240, 0.05);
    color: var(--text);
}

.sidebar-menu-item:hover i {
    color: var(--accent);
}

.sidebar-menu-item.active {
    background: rgba(76, 201, 240, 0.1);
    color: var(--accent);
}

.sidebar-menu-item.active i {
    color: var(--accent);
}

.menu-badge {
    background: rgba(76, 201, 240, 0.1);
    color: var(--text);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.menu-badge.alert {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(76, 201, 240, 0.1);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: rgba(255, 59, 48, 0.05);
    color: #ff3b30;
}

.sidebar-logout i {
    margin-right: 12px;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: margin var(--transition-speed) ease;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn i {
    margin-right: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--card-border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border: 1px solid rgba(76, 201, 240, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(76, 201, 240, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    margin-right: 20px;
    background: rgba(76, 201, 240, 0.1);
    color: var(--accent);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--text);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.stat-trend {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: auto;
}

.stat-trend.up {
    color: #34c759;
    background: rgba(52, 199, 89, 0.1);
}

.stat-trend.down {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
}

.stat-trend i {
    margin-right: 5px;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--card-border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(76, 201, 240, 0.05);
}

.chart-card:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(76, 201, 240, 0.2);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-action-btn {
    background: transparent;
    border: 1px solid rgba(76, 201, 240, 0.2);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-action-btn:hover {
    background: rgba(76, 201, 240, 0.05);
}

.chart-action-btn.active {
    background: rgba(76, 201, 240, 0.15);
    color: var(--accent);
    border-color: rgba(76, 201, 240, 0.3);
}

.chart-body {
    height: 300px;
}

/* Activity Card */
.activity-card {
    background: var(--card-bg);
    border-radius: var(--card-border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(76, 201, 240, 0.05);
    transition: all 0.3s ease;
}

.activity-card:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(76, 201, 240, 0.2);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.activity-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.view-all-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 6px;
}

.view-all-btn:hover {
    text-decoration: underline;
    background: rgba(76, 201, 240, 0.05);
}

.activity-body {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-icon.purchase {
    background: rgba(76, 201, 240, 0.1);
    color: var(--accent);
}

.activity-icon.sale {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.activity-icon.message {
    background: rgba(255, 204, 0, 0.1);
    color: #ffcc00;
}

.activity-icon.upload {
    background: rgba(175, 82, 222, 0.1);
    color: #af52de;
}

.activity-icon.create {
    background: rgba(90, 200, 250, 0.1);
    color: #5ac8fa;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: var(--text);
}

.activity-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 5px 0;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0;
}

/* Marketplace Preview */
.marketplace-preview-card {
    background: var(--card-bg);
    border-radius: var(--card-border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(76, 201, 240, 0.05);
    transition: all 0.3s ease;
}

.marketplace-preview-card:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(76, 201, 240, 0.2);
}

.marketplace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.marketplace-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.marketplace-item {
    background: var(--background);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(76, 201, 240, 0.05);
}

.marketplace-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(76, 201, 240, 0.2);
}

.market-item-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.market-item-content {
    padding: 15px;
}

.market-item-category {
    background: rgba(76, 201, 240, 0.1);
    color: var(--accent);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 10px;
}

.market-item-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 10px 0;
    color: var(--text);
    line-height: 1.4;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.market-item-rating {
    color: #ffcc00;
    font-size: 13px;
    margin-bottom: 10px;
}

.market-item-rating i {
    margin-right: 2px;
}

.market-item-rating span {
    color: var(--text-secondary);
    margin-left: 5px;
}

.market-item-price {
    color: var(--accent);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* User Dropdown Navigation */
.user-dropdown {
    position: relative;
    margin-left: 20px;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-dropdown-btn:hover {
    background: rgba(76, 201, 240, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    margin-right: 10px;
}

.user-name {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    margin-right: 10px;
}

.user-dropdown-content {
    position: absolute;
    top: 55px;
    right: 0;
    width: 220px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 100;
    transition: all 0.3s ease;
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.user-dropdown:hover .user-dropdown-content,
.user-dropdown-content:hover {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.user-dropdown-content a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.user-dropdown-content a:hover {
    background: rgba(76, 201, 240, 0.05);
    color: var(--text);
}

.user-dropdown-content a.active {
    color: var(--accent);
    background: rgba(76, 201, 240, 0.1);
}

.user-dropdown-content a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(76, 201, 240, 0.1);
    margin: 10px 0;
}

.logout-btn {
    color: #ff3b30 !important;
}

.logout-btn:hover {
    background: rgba(255, 59, 48, 0.05) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .marketplace-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .marketplace-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
}

/* Dark Mode / Light Mode Transition */
body, .dashboard-main, .dashboard-sidebar, .dashboard-content,
.stat-card, .chart-card, .activity-card, .marketplace-preview-card,
.user-dropdown-content, .marketplace-item {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
} 