/* Custom styles for Ticket Tycoon */
/* Comprehensive theme system with full UI customization */
/* Rarity badges line 400 */

:root {
    --click-button-glow: 0 0 20px rgba(13, 110, 253, 0.4);
    --success-glow: 0 0 15px rgba(25, 135, 84, 0.3);
    --warning-glow: 0 0 15px rgba(255, 193, 7, 0.3);
    --theme-primary: #0d6efd;
    --theme-secondary: #6c757d;
    --theme-success: #198754;
    --theme-danger: #dc3545;
    --theme-warning: #ffc107;
    --theme-info: #0dcaf0;
    --theme-background: #212529;
    --theme-surface: #343a40;
}

/* Theme Support - Enhanced for all UI components */
body {
    transition: all 0.3s ease;
}

/* Light Theme */
[data-bs-theme="light"], .theme-light {
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-danger: #dc3545;
    --bs-warning: #ffc107;
    --bs-info: #0dcaf0;
    --bs-dark: #212529;
    --bs-light: #f8f9fa;
    background: #ffffff !important;
    color: #212529 !important;
}

.theme-light .navbar-dark {
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%) !important;
}

.theme-light .card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    color: #212529 !important;
}

.theme-light .notification-item {
    background: rgba(13, 110, 253, 0.05) !important;
    color: #212529 !important;
}

.theme-light .notification-item .text-muted {
    color: #6c757d !important.theme-dark .form-control, .theme-dark .form-select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

;
}

.theme-light .btn-dark {
    background: #212529 !important;
    border-color: #212529 !important;
}

/* Neon Theme */
.theme-neon {
    --bs-primary: #00ff88;
    --bs-secondary: #ff0080;
    --bs-success: #00ff00;
    --bs-danger: #ff0040;
    --bs-warning: #ffff00;
    --bs-info: #00ffff;
    --bs-dark: #0a0a0a;
    --bs-light: #1a1a1a;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
    color: #ffffff !important;
}

.theme-neon .navbar-dark {
    background: linear-gradient(90deg, #00ff88 0%, #ff0080 100%) !important;
}

.theme-neon .card {
    background: rgba(26, 26, 26, 0.9) !important;
    border: 1px solid #00ff88 !important;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3) !important;
    color: #ffffff !important;
}

.theme-neon .notification-item {
    background: rgba(0, 255, 136, 0.1) !important;
    border-left-color: #00ff88 !important;
    color: #ffffff !important;
}

.theme-neon .notification-item .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Nature Theme */
.theme-nature {
    --bs-primary: #2d5016;
    --bs-secondary: #8b4513;
    --bs-success: #228b22;
    --bs-danger: #dc143c;
    --bs-warning: #ffa500;
    --bs-info: #4682b4;
    background: linear-gradient(135deg, #f0f8e0 0%, #e8f5d0 100%) !important;
    color: #2d5016 !important;
}

.theme-nature .navbar-dark {
    background: linear-gradient(90deg, #2d5016 0%, #228b22 100%) !important;
}

.theme-nature .card {
    background: rgba(232, 245, 208, 0.9) !important;
    border: 1px solid #2d5016 !important;
    color: #2d5016 !important;
}

.theme-nature .notification-item {
    background: rgba(45, 80, 22, 0.1) !important;
    border-left-color: #2d5016 !important;
    color: #2d5016 !important;
}

.theme-nature .notification-item .text-muted {
    color: rgba(45, 80, 22, 0.7) !important;
}

/* Ocean Theme */
.theme-ocean {
    --bs-primary: #1e3a8a;
    --bs-secondary: #0891b2;
    --bs-success: #059669;
    --bs-danger: #dc2626;
    --bs-warning: #d97706;
    --bs-info: #0284c7;
    background: linear-gradient(135deg, #e0f2fe 0%, #cffafe 100%) !important;
    color: #1e3a8a !important;
}

.theme-ocean .navbar-dark {
    background: linear-gradient(90deg, #1e3a8a 0%, #0891b2 100%) !important;
}

.theme-ocean .card {
    background: rgba(207, 250, 254, 0.9) !important;
    border: 1px solid #1e3a8a !important;
    color: #1e3a8a !important;
}

.theme-ocean .notification-item {
    background: rgba(30, 58, 138, 0.1) !important;
    border-left-color: #1e3a8a !important;
    color: #1e3a8a !important;
}

.theme-ocean .notification-item .text-muted {
    color: rgba(30, 58, 138, 0.7) !important;
}

/* Sunset Theme */
.theme-sunset {
    --bs-primary: #dc2626;
    --bs-secondary: #ea580c;
    --bs-success: #16a34a;
    --bs-danger: #dc2626;
    --bs-warning: #ca8a04;
    --bs-info: #2563eb;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%) !important;
    color: #dc2626 !important;
}

.theme-sunset .navbar-dark {
    background: linear-gradient(90deg, #dc2626 0%, #ea580c 100%) !important;
}

.theme-sunset .card {
    background: rgba(254, 215, 170, 0.9) !important;
    border: 1px solid #dc2626 !important;
    color: #dc2626 !important;
}

.theme-sunset .notification-item {
    background: rgba(220, 38, 38, 0.1) !important;
    border-left-color: #dc2626 !important;
    color: #dc2626 !important;
}

.theme-sunset .notification-item .text-muted {
    color: rgba(220, 38, 38, 0.7) !important;
}

/* Midnight Theme */
.theme-midnight {
    --bs-primary: #3730a3;
    --bs-secondary: #1e1b4b;
    --bs-success: #166534;
    --bs-danger: #991b1b;
    --bs-warning: #a16207;
    --bs-info: #1e40af;
    background: linear-gradient(135deg, #0c0a09 0%, #1c1917 100%) !important;
    color: #e5e7eb !important;
}

.theme-midnight .navbar-dark {
    background: linear-gradient(90deg, #3730a3 0%, #1e1b4b 100%) !important;
}

.theme-midnight .card {
    background: rgba(28, 25, 23, 0.9) !important;
    border: 1px solid #3730a3 !important;
    color: #e5e7eb !important;
}

.theme-midnight .notification-item {
    background: rgba(55, 48, 163, 0.1) !important;
    border-left-color: #3730a3 !important;
    color: #e5e7eb !important;
}

.theme-midnight .notification-item .text-muted {
    color: rgba(229, 231, 235, 0.7) !important;
}

/* Retro Gaming Theme */
.theme-retro {
    --bs-primary: #ff6b6b;
    --bs-secondary: #4ecdc4;
    --bs-success: #95e1d3;
    --bs-danger: #ff6b6b;
    --bs-warning: #fce38a;
    --bs-info: #a8e6cf;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: #ecf0f1 !important;
}

.theme-retro .navbar-dark {
    background: linear-gradient(90deg, #ff6b6b 0%, #4ecdc4 100%) !important;
}

.theme-retro .card {
    background: rgba(52, 73, 94, 0.9) !important;
    border: 1px solid #ff6b6b !important;
    color: #ecf0f1 !important;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3) !important;
}

.theme-retro .notification-item {
    background: rgba(255, 107, 107, 0.1) !important;
    border-left-color: #ff6b6b !important;
    color: #ecf0f1 !important;
}

.theme-retro .notification-item .text-muted {
    color: rgba(236, 240, 241, 0.7) !important;
}

/* Font Size Support */
.font-size-small {
    font-size: 0.875rem;
}

.font-size-small .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.font-size-large {
    font-size: 1.125rem;
}

.font-size-large .btn {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
}

.font-size-extra-large {
    font-size: 1.25rem;
}

.font-size-extra-large .btn {
    font-size: 1.2rem;
    padding: 0.7rem 1.4rem;
}

/* Compact Mode */
.compact-mode .card {
    margin-bottom: 0.5rem !important;
}

.compact-mode .card-body {
    padding: 0.75rem !important;
}

.compact-mode .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
}

.compact-mode .navbar {
    padding: 0.25rem 1rem !important;
}

/* No Animations */
.no-animations * {
    animation: none !important;
    transition: none !important;
}

  .blackmarketbtn {
    position: absolute;
    top: 80px;
    right: 30px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #ffb2f9;
    background: #0a0011;
    border: 2px solid #ff69f6;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    z-index: 999;
    box-shadow: 0 0 10px #ff8cfa, 0 0 20px #ff2ee3;
    transition: background 0.3s, color 0.3s;
  }

  .blackmarketbtn::before,
  .blackmarketbtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ff69f6;
    mix-blend-mode: screen;
    opacity: 0.1;
    animation: glitchAnim 2s infinite;
    pointer-events: none;
  }

  .blackmarketbtn::after {
    animation-delay: 1s;
  }

  @keyframes glitchAnim {
    0% {
      transform: translate(0);
      opacity: 0.1;
    }
    20% {
      transform: translate(-2px, 2px);
    }
    40% {
      transform: translate(2px, -2px);
      opacity: 0.15;
    }
    60% {
      transform: translate(-1px, 1px);
    }
    80% {
      transform: translate(1px, -1px);
      opacity: 0.1;
    }
    100% {
      transform: translate(0);
    }
  }

/* Click button enhancements */
#click-button {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

#click-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--click-button-glow);
}

#click-button:active {
    transform: scale(0.95) translateY(-1px);
}

#click-button.btn-clicked {
    box-shadow: var(--click-button-glow), inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Click feedback animations */
#click-feedback {
    transition: all 0.3s ease;
    min-height: 1.5rem;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Cash display enhancements */
#cash-display {
    transition: all 0.2s ease;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Scratch card enhancements */
.scratch-card {
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent !important;
}

.scratch-card:hover {
    transform: translateY(-3px);
    border-color: var(--bs-warning) !important;
    box-shadow: var(--warning-glow);
}

.scratch-card .btn {
    transition: all 0.2s ease;
}

/* Ticket and box styling */
.ticket-item, .box-item {
    transition: all 0.3s ease;
    border: 1px solid var(--bs-border-color) !important;
}

.ticket-item:hover, .box-item:hover {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

/* Rarity, ticket/box backgrounds & special card effects moved to static/css/rarity-ticket.css */
/* Upgrade button enhancements */
.btn-success:not(:disabled) {
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.2);
    transition: all 0.2s ease;
}

.btn-success:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: var(--success-glow);
}

/* Admin panel styling */
.admin-stat-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.admin-stat-card:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.1);
}

/* Leaderboard enhancements */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-left: 4px solid var(--bs-warning);
}

.fa-crown, .fa-medal {
    filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.6));
}

/* Marketplace item styling */
.marketplace-item {
    transition: all 0.3s ease;
    border: 1px solid var(--bs-border-color);
}

.marketplace-item:hover {
    border-color: var(--bs-info);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.15);
}

/* Loading states */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification animations */
.alert {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Notification badge styling */
.notification-badge {
    animation: pulse 2s infinite;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    min-width: 1.2em;
    text-align: center;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Notification popup styling */
#notificationPopup {
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced Marketplace Styling */
.marketplace-item {
    transition: all 0.3s ease;
    border: 1px solid var(--bs-border-color);
    cursor: pointer;
}

.marketplace-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.marketplace-item .card-body {
    padding: 1rem;
}

/* Price highlighting */
.text-success {
    font-weight: 600;
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-color: #000 !important;
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
    border-radius: 0 0 12px 12px;
}

/* Button enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    border-radius: 6px;
}

/* Tab styling */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    border: none;
    color: var(--bs-text-muted);
    font-weight: 500;
    margin-right: 2px;
}

.nav-tabs .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
    border: none;
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: var(--bs-light);
    border: none;
}

/* Form enhancements */
.form-select, .form-control {
    border-radius: 8px;
    border: 2px solid var(--bs-border-color);
    transition: border-color 0.2s ease;
}

.form-select:focus, .form-control:focus {

.theme-light .bg-dark, .theme-nature .bg-dark,
.theme-ocean .bg-dark, .theme-sunset .bg-dark {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.theme-light .text-light, .theme-nature .text-light,
.theme-ocean .text-light, .theme-sunset .text-light {
    color: #212529 !important;
}

/* ---------- Admin / badge / stat readability ----------
   Guarantee readable text on badges and admin stat-card values in every
   theme, so nothing ends up bright-on-bright or dark-on-dark. */

/* Badges: use theme-reactive emphasis colour so text always contrasts.
   (bg-light is always light, so it always gets dark text.) */
.badge.bg-dark { color: var(--bs-emphasis-color) !important; }
.badge.bg-secondary { color: var(--bs-emphasis-color) !important; }
.badge.bg-light { color: #212529 !important; }

/* Admin stat-card values: keep the semantic accent but clamp to readable
   shades on each theme. On dark themes the darkest accents get lightened;
   on light themes the lightest (barely visible) accents get darkened. */
[data-bs-theme="dark"] .stat-card .value.text-dark { color: #e9ecef !important; }
[data-bs-theme="dark"] .stat-card .value.text-secondary { color: #ced4da !important; }
[data-bs-theme="light"] .stat-card .value.text-warning { color: #997a00 !important; }
[data-bs-theme="light"] .stat-card .value.text-info { color: #087990 !important; }
[data-bs-theme="light"] .stat-card .value.text-secondary { color: #495057 !important; }

/* Ensure all themes work with buttons */
[class*="theme-"] .btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

[class*="theme-"] .btn-success {
    background-color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
}

[class*="theme-"] .btn-warning {
    background-color: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
    color: #000 !important;
}

[class*="theme-"] .btn-danger {
    background-color: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
}

[class*="theme-"] .btn-info {
    background-color: var(--bs-info) !important;
    border-color: var(--bs-info) !important;
}

/* Notification item styling improvements */
.notification-item {
    border-left: 4px solid transparent !important;
    transition: all 0.3s ease;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
}

.notification-item:not(.border-secondary) {
    border-left-color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.05) !important;
}

.notification-item:hover {
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1) !important;
    transform: translateX(5px);
}

/* Forms and inputs theme support */
[class*="theme-"] .form-control,
[class*="theme-"] .form-select {
    background-color: inherit;
    border-color: var(--bs-secondary);
    color: inherit;
}

[class*="theme-"] .form-control:focus,
[class*="theme-"] .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}

.theme-dark .form-select,.theme-dark .form-control {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}
/* Modal theme support */
[class*="theme-"] .modal-content {
    background-color: inherit;
    color: inherit;
}

[class*="theme-"] .modal-header {
    border-bottom-color: var(--bs-secondary);
}

[class*="theme-"] .modal-footer {
    border-top-color: var(--bs-secondary);
}

/* Bell icon styling */
.fa-bell {
    transition: all 0.2s ease;
}

.nav-link:hover .fa-bell {
    transform: rotate(15deg);
    color: var(--bs-warning) !important;
}

/* Settings gear icon styling */
.fa-cog {
    transition: all 0.3s ease;
}

.nav-link:hover .fa-cog {
    transform: rotate(90deg);
    color: var(--bs-info) !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #click-button {
        width: 120px !important;
        height: 120px !important;
        font-size: 1.5rem !important;
    }

    .scratch-card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Touch device enhancements */
@media (hover: none) and (pointer: coarse) {
    .scratch-card:hover {
        transform: none;
        box-shadow: none;
    }

    .scratch-card:active {
        transform: scale(0.98);
        border-color: var(--bs-warning) !important;
    }

    #click-button {
        touch-action: manipulation;
    }
}

/* Accessibility enhancements */
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.scratch-card:focus {
    outline: 2px solid var(--bs-warning);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scratch-card {
        border: 2px solid var(--bs-warning) !important;
    }

    .badge {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scratch-card:hover {
        transform: none;
    }

    #click-button:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .btn, .alert, nav, footer {
        display: none !important;
    }

    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Form validation styling */
.was-validated .form-control:valid {
    border-color: var(--bs-success);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.was-validated .form-control:invalid {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Loading overlay for forms */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Game statistics styling */
.stat-highlight {
    color: var(--bs-success) !important;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(25, 135, 84, 0.3);
}

/* Empty state styling */
.empty-state {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.empty-state:hover {
    opacity: 1;
}

.ticket-card {
    transition: transform 0.2s;
}

/* Notification Animations */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.slide-out-right {
    animation: slideOutRight 0.3s ease-in;
}

/* Enhanced notification badge */
.notification-badge {
    font-size: 0.65rem !important;
    padding: 0.25em 0.5em !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* Notification item improvements */
.notification-item {
    transition: all 0.2s ease;
    border-radius: 8px !important;
}

.notification-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Notification styles remain the same for all themes */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
}

.notification {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.info {
    border-left: 4px solid #17a2b8;
}

/* Admin Panel Specific Styles */
.admin-dashboard .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-dashboard .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.admin-stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.admin-stat-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.admin-stat-card h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.admin-quick-actions {
    padding: 1.5rem;
}

.admin-quick-actions .btn {
    margin: 0.25rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.admin-quick-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Analytics specific styles */
.analytics-container .table {
    border-radius: 8px;
    overflow: hidden;
}

.analytics-container .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
}

/* Theme support for admin panels */
[data-theme="dark"] .admin-dashboard .card {
    background-color: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
}

[data-theme="dark"] .admin-dashboard .card-header {
    background-color: var(--dark-secondary-bg) !important;
    border-bottom: 1px solid var(--dark-border);
}

[data-theme="neon"] .admin-dashboard .card {
    background-color: var(--neon-card-bg);
    border: 1px solid var(--neon-accent);
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.1);
}

[data-theme="neon"] .admin-dashboard .card:hover {
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.2);
}

[data-theme="retro"] .admin-dashboard .card {
    background-color: var(--retro-card-bg);
    border: 2px solid var(--retro-accent);
}

[data-theme="ocean"] .admin-dashboard .card {
    background-color: var(--ocean-card-bg);
    border: 1px solid var(--ocean-accent);
}

[data-theme="forest"] .admin-dashboard .card {
    background-color: var(--forest-card-bg);
    border: 1px solid var(--forest-accent);
}

[data-theme="sunset"] .admin-dashboard .card {
    background-color: var(--sunset-card-bg);
    border: 1px solid var(--sunset-accent);
}

[data-theme="minimal"] .admin-dashboard .card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="cyberpunk"] .admin-dashboard .card {
    background-color: var(--cyberpunk-card-bg);
    border: 1px solid var(--cyberpunk-accent);
    box-shadow: 0 0 15px rgba(255, 0, 102, 0.1);
}
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badge styling */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* Alert positioning */
.alert.position-fixed {
    animation: slideInRight 0.4s ease-out;
}

/* Loading state */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Card enhancements */
.card {
    border: none;
    border-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 7px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.cardmain {
    border: solid;
    background: #693dc2;
    border-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 7px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--bs-light);
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 12px 12px 0 0;
    font-weight: 600;
}

/* Table styling */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--bs-light);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--bs-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .marketplace-item {
        margin-bottom: 1rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .form-select.form-select-sm {
        font-size: 0.875rem;
    }
}

/* Dark theme support */
[data-bs-theme="dark"] .marketplace-item:hover {
    border-color: var(--bs-info);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.15);
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--bs-dark);
}

/* Active Effects card (Inventory): keep info accents in sync with the
   active theme's --bs-info token (themes.js sets it per theme). */
#activeEffectsCard .progress-bar {
    background-color: var(--bs-info) !important;
}

#activeEffectsCard .effect-timer {
    color: var(--bs-info) !important;
}

[data-bs-theme="dark"] .table thead th {
    background-color: var(--bs-dark);
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Universal theme support for all UI elements.
   Light-background themes share a readable (dark-on-light) set of rules so
   form controls, dropdowns, alerts, tables etc. never become unreadable. */
.theme-light, .theme-nature, .theme-ocean, .theme-sunset { }
.theme-light .btn, .theme-light .alert, .theme-light .modal-content,
.theme-light .dropdown-menu, .theme-light .form-control, .theme-light .form-select,
.theme-nature .btn, .theme-nature .alert, .theme-nature .modal-content,
.theme-nature .dropdown-menu, .theme-nature .form-control, .theme-nature .form-select,
.theme-ocean .btn, .theme-ocean .alert, .theme-ocean .modal-content,
.theme-ocean .dropdown-menu, .theme-ocean .form-control, .theme-ocean .form-select,
.theme-sunset .btn, .theme-sunset .alert, .theme-sunset .modal-content,
.theme-sunset .dropdown-menu, .theme-sunset .form-control, .theme-sunset .form-select {
    color: #212529 !important;
}

/* Light themes: give form controls + dropdowns a light background with dark,
   readable text and a subtle border so nothing is white-on-white. */
.theme-light .form-control, .theme-light .form-select,
.theme-light .input-group-text,
.theme-nature .form-control, .theme-nature .form-select,
.theme-nature .input-group-text,
.theme-ocean .form-control, .theme-ocean .form-select,
.theme-ocean .input-group-text,
.theme-sunset .form-control, .theme-sunset .form-select,
.theme-sunset .input-group-text {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

.theme-light .form-control::placeholder, .theme-nature .form-control::placeholder,
.theme-ocean .form-control::placeholder, .theme-sunset .form-control::placeholder {
    color: #6c757d !important;
}

.theme-light .dropdown-menu, .theme-nature .dropdown-menu,
.theme-ocean .dropdown-menu, .theme-sunset .dropdown-menu {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}
.theme-dark .dropdown-menu {
    background-color: #212529 !important;
    border-color: #495057 !important;
    color: #ffffff !important;
}
.theme-light .dropdown-item, .theme-nature .dropdown-item,
.theme-ocean .dropdown-item, .theme-sunset .dropdown-item {
    color: #212529 !important;
}
.theme-dark .dropdown-item {
    color: #ffffff !important;
}
.theme-light .dropdown-item:hover, .theme-nature .dropdown-item:hover,
.theme-ocean .dropdown-item:hover, .theme-sunset .dropdown-item:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}
.theme-dark .dropdown-item:hover {
    background-color: #343a40 !important;
    color: #ffffff !important;
}
/* Ensure option text is readable in dark themes */
.theme-dark select {
    -webkit-appearance: none;
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Style option elements in dark themes */
.theme-dark option {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Style optgroup in dark themes */
.theme-dark optgroup {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Dark theme: give all form controls + dropdowns a dark background with light text */
