/* Custom Styles for My EuroCoins */

/*
 * ===== THEME CONFIGURATION GUIDE =====
 * CURRENT THEME: PROFESSIONAL BLUE SCHEME ✨
 * CURRENT COIN CARD SCHEMA: PROFESSIONAL BLUE CARDS ✨
 * CURRENT MODAL HEADER SCHEMA: PROFESSIONAL BLUE (via CSS variables)
 * To change the color scheme, simply update the CSS variables in the :root section below.
 * All colors throughout the app will automatically update to use the new theme.
 *
 * Available Complete Themes (uncomment to switch):
 * 1. PROFESSIONAL BLUE (Current) - Corporate blue & green ✨
 * 2. WARM GOLDEN - Premium golden & brown tones
 * 3. MODERN DARK - Elegant dark blue & purple
 * 4. NATURE GREEN - Calm green & organic tones
 * 5. SUNSET ORANGE - Warm orange & energetic feel
 *
 * To switch themes:
 * 1. Comment out the current :root block
 * 2. Uncomment the desired theme block above
 * 3. Save and refresh the page
 *
 * Available theme variables:
 * --primary-color: Main brand color (buttons, links, accents)
 * --secondary-color: Secondary color (success states, badges)
 * --background-color: Main page background
 * --surface-color: Card/modal backgrounds
 * --text-color: Primary text color
 * --text-muted: Secondary/muted text
 * --border-color: Border colors
 * --shadow-color: Shadow colors
 *
 * Coin Card Variables (for unified hero and catalog styling):
 * --coin-card-bg: Background gradient/color
 * --coin-card-border: Border style
 * --coin-card-shadow: Normal shadow
 * --coin-card-shadow-hover: Hover shadow
 * --coin-card-text: Primary text color
 * --coin-card-text-muted: Secondary text color
 * --coin-card-radius: Border radius
 *
 * To switch modal header schemas, add the corresponding class to the body element:
 * - modal-header-glassmorphism
 * - modal-header-gradient
 * - modal-header-minimalist
 * - modal-header-golden (current)
 * - modal-header-darkmode
 * - modal-header-neumorphism
 * - modal-header-ocean-enhanced
 * - modal-header-vintage
 *
 * Example themes are provided in comments below the variables.
 */

/* ===== ALTERNATIVE APP COLOR THEMES ===== */
/* Uncomment and modify the CSS variables below to switch to different themes */

/* THEME 1: PROFESSIONAL MODERN (Current - Cool Ocean) */
/*
:root {
    --primary-color: #0891b2;
    --primary-hover: #0284c7;
    --primary-light: #7dd3fc;
    --secondary-color: #059669;
    --secondary-hover: #047857;
    --secondary-light: #6ee7b7;
    --warning-color: #f59e0b;
    --info-color: #7c3aed;
    --danger-color: #dc2626;
    --dark-color: #0f172a;
    --light-color: #f0f9ff;
    --background-color: #f0f9ff;
    --surface-color: #ffffff;
    --surface-hover: #f9fafb;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.05);
}
*/

/* ===== COMPLETE APP COLOR SCHEMES ===== */
/* Professional, cohesive color palettes for the entire application */

/* SCHEME 1: PROFESSIONAL BLUE (Corporate & Trustworthy) */
/*
:root {
    --primary-color: #1e40af;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #059669;
    --secondary-hover: #047857;
    --secondary-light: #d1fae5;
    --accent-color: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: #e9d5ff;
    --warning-color: #d97706;
    --info-color: #0891b2;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-hover: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-color: rgba(30, 41, 59, 0.1);
    --shadow-light: rgba(30, 41, 59, 0.05);
    --shadow-dark: rgba(30, 41, 59, 0.15);
    --modal-header-bg: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #3b82f6 100%);
    --modal-header-shadow: 0 4px 20px rgba(30, 64, 175, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: 1px solid #1d4ed8;
    --modal-header-radius: 12px;
}
*/

/* SCHEME 2: WARM GOLDEN (Premium & Sophisticated) */
/*
:root {
    --primary-color: #b45309;
    --primary-hover: #92400e;
    --primary-light: #fed7aa;
    --secondary-color: #a16207;
    --secondary-hover: #78350f;
    --secondary-light: #fde68a;
    --accent-color: #7c2d12;
    --accent-hover: #5b1f0f;
    --accent-light: #fed7aa;
    --warning-color: #ca8a04;
    --info-color: #b45309;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --dark-color: #451a03;
    --light-color: #fef7ed;
    --background-color: #fef7ed;
    --surface-color: #ffffff;
    --surface-hover: #fef3c7;
    --card-bg: #ffffff;
    --card-border: #fed7aa;
    --text-color: #451a03;
    --text-muted: #9a3412;
    --text-light: #c2410c;
    --text-inverse: #ffffff;
    --border-color: #fed7aa;
    --border-light: #fde68a;
    --shadow-color: rgba(69, 26, 3, 0.1);
    --shadow-light: rgba(69, 26, 3, 0.05);
    --shadow-dark: rgba(69, 26, 3, 0.15);
    --modal-header-bg: linear-gradient(135deg, #b45309 0%, #92400e 50%, #d97706 100%);
    --modal-header-shadow: 0 4px 20px rgba(180, 83, 9, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: 1px solid #92400e;
    --modal-header-radius: 12px;
}
*/

/* SCHEME 3: MODERN DARK (Elegant & Contemporary) */
/*
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #c7d2fe;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --secondary-light: #d1fae5;
    --accent-color: #f59e0b;
    --accent-hover: #d97706;
    --accent-light: #fde68a;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --dark-color: #0f172a;
    --light-color: #1e293b;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-inverse: #0f172a;
    --border-color: #334155;
    --border-light: #475569;
    --shadow-color: rgba(15, 23, 42, 0.3);
    --shadow-light: rgba(15, 23, 42, 0.15);
    --shadow-dark: rgba(15, 23, 42, 0.4);
    --modal-header-bg: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #7c3aed 100%);
    --modal-header-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: 1px solid #4f46e5;
    --modal-header-radius: 12px;
}
*/

/* SCHEME 4: NATURE GREEN (Calm & Organic) */
/*
:root {
    --primary-color: #059669;
    --primary-hover: #047857;
    --primary-light: #d1fae5;
    --secondary-color: #7c3aed;
    --secondary-hover: #6d28d9;
    --secondary-light: #e9d5ff;
    --accent-color: #ea580c;
    --accent-hover: #c2410c;
    --accent-light: #fed7aa;
    --warning-color: #d97706;
    --info-color: #0891b2;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --dark-color: #064e3b;
    --light-color: #ecfdf5;
    --background-color: #ecfdf5;
    --surface-color: #ffffff;
    --surface-hover: #d1fae5;
    --card-bg: #ffffff;
    --card-border: #a7f3d0;
    --text-color: #064e3b;
    --text-muted: #065f46;
    --text-light: #047857;
    --text-inverse: #ffffff;
    --border-color: #a7f3d0;
    --border-light: #d1fae5;
    --shadow-color: rgba(6, 78, 59, 0.1);
    --shadow-light: rgba(6, 78, 59, 0.05);
    --shadow-dark: rgba(6, 78, 59, 0.15);
    --modal-header-bg: linear-gradient(135deg, #059669 0%, #047857 50%, #10b981 100%);
    --modal-header-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: 1px solid #047857;
    --modal-header-radius: 12px;
}
*/

/* SCHEME 5: SUNSET ORANGE (Warm & Energetic) */
/*
:root {
    --primary-color: #ea580c;
    --primary-hover: #c2410c;
    --primary-light: #fed7aa;
    --secondary-color: #7c3aed;
    --secondary-hover: #6d28d9;
    --secondary-light: #e9d5ff;
    --accent-color: #059669;
    --accent-hover: #047857;
    --accent-light: #d1fae5;
    --warning-color: #d97706;
    --info-color: #0891b2;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --dark-color: #7c2d12;
    --light-color: #fef3c7;
    --background-color: #fef3c7;
    --surface-color: #ffffff;
    --surface-hover: #fef3c7;
    --card-bg: #ffffff;
    --card-border: #fed7aa;
    --text-color: #7c2d12;
    --text-muted: #a16207;
    --text-light: #c2410c;
    --text-inverse: #ffffff;
    --border-color: #fed7aa;
    --border-light: #fde68a;
    --shadow-color: rgba(124, 45, 18, 0.1);
    --shadow-light: rgba(124, 45, 18, 0.05);
    --shadow-dark: rgba(124, 45, 18, 0.15);
    --modal-header-bg: linear-gradient(135deg, #ea580c 0%, #c2410c 50%, #f97316 100%);
    --modal-header-shadow: 0 4px 20px rgba(234, 88, 12, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: 1px solid #c2410c;
    --modal-header-radius: 12px;
}
*/

/* ===== CURRENTLY ACTIVE: PROFESSIONAL BLUE SCHEME ===== */
:root {
    --primary-color: #1e40af;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #059669;
    --secondary-hover: #047857;
    --secondary-light: #d1fae5;
    --accent-color: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: #e9d5ff;
    --warning-color: #d97706;
    --info-color: #0891b2;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-hover: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-color: rgba(30, 41, 59, 0.1);
    --shadow-light: rgba(30, 41, 59, 0.05);
    --shadow-dark: rgba(30, 41, 59, 0.15);
    --modal-header-bg: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #3b82f6 100%);
    --modal-header-shadow: 0 4px 20px rgba(30, 64, 175, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: 1px solid #1d4ed8;
    --modal-header-radius: 12px;
    /* Unified coin card variables for consistent theming across hero and catalog */
    --coin-card-bg: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #3b82f6 100%);
    --coin-card-border: 1px solid #1d4ed8;
    --coin-card-shadow: 0 4px 20px rgba(30, 64, 175, 0.3);
    --coin-card-shadow-hover: 0 8px 30px rgba(30, 64, 175, 0.4);
    --coin-card-text: #ffffff;
    --coin-card-text-muted: rgba(255, 255, 255, 0.9);
    --coin-card-radius: 12px;
}

/* ORIGINAL: PROFESSIONAL MODERN (Cool Ocean) - Commented out */
/*
:root {
    --primary-color: #0891b2;
    --primary-hover: #0284c7;
    --primary-light: #7dd3fc;
    --secondary-color: #059669;
    --secondary-hover: #047857;
    --secondary-light: #6ee7b7;
    --warning-color: #f59e0b;
    --info-color: #7c3aed;
    --danger-color: #dc2626;
    --dark-color: #0f172a;
    --light-color: #f0f9ff;
    --background-color: #f0f9ff;
    --surface-color: #ffffff;
    --surface-hover: #f9fafb;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.05);
    --modal-header-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    --modal-header-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: none;
    --modal-header-radius: 12px;
}
*/

/* ===== ALTERNATIVE COIN CARD COLOR SCHEMAS ===== */
/* Uncomment and modify the class name to switch between different card styles */

/* SCHEMA 1: GLASSMORPHISM (Modern & Sleek) */
.coin-card-glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

/* SCHEMA 2: GRADIENT CARDS (Dynamic & Modern) */
.coin-card-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

/* SCHEMA 3: MINIMALIST (Clean & Simple) */
.coin-card-minimalist {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

/* SCHEMA 4: WARM GOLDEN (Premium & Luxurious) */
.coin-card-golden {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
    color: white;
}

/* SCHEMA 5: DARK MODE CARDS (Modern & Professional) */
.coin-card-darkmode {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border: 1px solid #4a5568;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
}

/* SCHEMA 6: NEUMORPHISM (Soft & Tactile) */
.coin-card-neumorphism {
    background: #f0f2f5;
    border: none;
    border-radius: 12px;
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    color: var(--text-color);
}

/* SCHEMA 7: OCEAN BLUE THEME (Current but Enhanced) */
.coin-card-ocean-enhanced {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.95) 0%,
        rgba(99,102,241,0.05) 50%,
        rgba(255,255,255,0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
    color: var(--text-color);
}

/* SCHEMA 8: VINTAGE COIN (Retro & Classic) */
.coin-card-vintage {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 50%, #daa520 100%);
    border: 2px solid #8b6914;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    color: #2d1810;
}

/* ===== MODAL HEADER COLOR SCHEMAS ===== */
/* These correspond to the coin card schemas above for easy switching */
/* To switch schemas, add the desired class to the body element in your HTML */
/* Example: <body class="modal-header-glassmorphism"> */

/* MODAL HEADER 1: GLASSMORPHISM */
.modal-header-glassmorphism {
    --modal-header-bg: rgba(255, 255, 255, 0.1);
    --modal-header-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --modal-header-text: var(--text-color);
    --modal-header-border: 1px solid rgba(255, 255, 255, 0.2);
    --modal-header-radius: 16px;
}

/* MODAL HEADER 2: GRADIENT CARDS */
.modal-header-gradient {
    --modal-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --modal-header-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: none;
    --modal-header-radius: 12px;
}

/* MODAL HEADER 3: MINIMALIST */
.modal-header-minimalist {
    --modal-header-bg: #ffffff;
    --modal-header-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --modal-header-text: var(--text-color);
    --modal-header-border: 1px solid #e5e7eb;
    --modal-header-radius: 8px;
}

/* MODAL HEADER 4: WARM GOLDEN (Current) */
.modal-header-golden {
    --modal-header-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    --modal-header-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
    --modal-header-text: #ffffff;
    --modal-header-border: none;
    --modal-header-radius: 12px;
}

/* MODAL HEADER 5: DARK MODE */
.modal-header-darkmode {
    --modal-header-bg: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    --modal-header-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --modal-header-text: #e2e8f0;
    --modal-header-border: 1px solid #4a5568;
    --modal-header-radius: 12px;
}

/* MODAL HEADER 6: NEUMORPHISM */
.modal-header-neumorphism {
    --modal-header-bg: #f0f2f5;
    --modal-header-shadow: 8px 8px 16px rgba(163, 177, 198, 0.6), -8px -8px 16px rgba(255, 255, 255, 0.8);
    --modal-header-text: var(--text-color);
    --modal-header-border: none;
    --modal-header-radius: 12px;
}

/* MODAL HEADER 7: OCEAN ENHANCED */
.modal-header-ocean-enhanced {
    --modal-header-bg: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(99,102,241,0.05) 50%, rgba(255,255,255,0.98) 100%);
    --modal-header-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
    --modal-header-text: var(--text-color);
    --modal-header-border: 1px solid rgba(99, 102, 241, 0.15);
    --modal-header-radius: 12px;
}

/* MODAL HEADER 8: VINTAGE */
.modal-header-vintage {
    --modal-header-bg: linear-gradient(135deg, #d4af37 0%, #b8860b 50%, #daa520 100%);
    --modal-header-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    --modal-header-text: #2d1810;
    --modal-header-border: 2px solid #8b6914;
    --modal-header-radius: 50%;
}

/* ===== HOVER EFFECTS FOR ALTERNATIVE SCHEMAS ===== */

/* Glassmorphism hover */
.coin-card-glassmorphism:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Gradient cards hover */
.coin-card-gradient:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* Minimalist hover */
.coin-card-minimalist:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Golden hover */
.coin-card-golden:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(245, 87, 108, 0.4);
}

/* Dark mode hover */
.coin-card-darkmode:hover {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Neumorphism hover */
.coin-card-neumorphism:hover {
    box-shadow:
        12px 12px 24px rgba(163, 177, 198, 0.7),
        -12px -12px 24px rgba(255, 255, 255, 0.9),
        inset 2px 2px 4px rgba(255, 255, 255, 0.1);
}

/* Ocean enhanced hover */
.coin-card-ocean-enhanced:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

/* Vintage hover */
.coin-card-vintage:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

/* ===== ADDITIONAL STYLING DETAILS ===== */

/* Common text colors for different schemas */
.coin-card-gradient .card-title,
.coin-card-golden .card-title,
.coin-card-vintage .card-title {
    color: white;
}

.coin-card-darkmode .card-title {
    color: #f7fafc;
}

.coin-card-glassmorphism .card-text,
.coin-card-minimalist .card-text,
.coin-card-neumorphism .card-text,
.coin-card-ocean-enhanced .card-text {
    color: var(--text-muted);
}

.coin-card-gradient .card-text,
.coin-card-golden .card-text,
.coin-card-darkmode .card-text {
    color: rgba(255, 255, 255, 0.8);
}

.coin-card-vintage .card-text {
    color: #4a2c17;
}

/* Badge styling for different schemas */
.coin-card-gradient .badge,
.coin-card-golden .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.coin-card-darkmode .badge {
    background: #4a5568;
    color: #e2e8f0;
}

.coin-card-vintage .badge {
    background: #8b6914;
    color: #2d1810;
}

/* ===== HOW TO USE ===== */
/*
1. Replace the class name in your HTML or apply to existing cards:
   .coin-card-unified → .coin-card-glassmorphism
   .hero-coin-card → .coin-card-gradient
   .catalog-page .coin-card → .coin-card-minimalist

2. For best results, also update the page background to complement:
   - Glassmorphism: Use a gradient background
   - Gradient: Keep light backgrounds
   - Minimalist: Clean white/light backgrounds
   - Golden: Light backgrounds to make gold pop
   - Dark mode: Dark page backgrounds
   - Neumorphism: Light gray backgrounds
   - Ocean: Light blue backgrounds (current)
   - Vintage: Cream/warm backgrounds

3. Test contrast ratios for accessibility
*/
/*
 * ===== ALTERNATIVE THEME EXAMPLES =====
 * Copy and paste these blocks to quickly switch themes:
 *
 * WARM EARTH THEME:
 * --primary-color: #d97706; --secondary-color: #059669; --background-color: #fef7ed;
 * --surface-color: #ffffff; --text-color: #1f2937; --text-muted: #6b7280;
 *
 * OCEAN THEME (CURRENT):
 * --primary-color: #0891b2; --secondary-color: #059669; --background-color: #f0f9ff;
 * --surface-color: #ffffff; --text-color: #1e293b; --text-muted: #64748b;
 *
 * ROYAL PURPLE THEME:
 * --primary-color: #7c3aed; --secondary-color: #f59e0b; --background-color: #faf5ff;
 * --surface-color: #ffffff; --text-color: #1f2937; --text-muted: #6b7280;
 *
 * MINIMALIST GRAY THEME:
 * --primary-color: #374151; --secondary-color: #10b981; --background-color: #f9fafb;
 * --surface-color: #ffffff; --text-color: #111827; --text-muted: #6b7280;
 */

/* ===== BASE THEME APPLICATION ===== */
/* Apply the theme colors to the document */
html, body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Update card backgrounds for dark theme */
.card {
    background-color: var(--surface-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

.card-header {
    background-color: var(--surface-hover);
    border-bottom-color: var(--border-color);
    color: var(--text-color);
}

/* Update form elements */
.form-control {
    background-color: var(--surface-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

.form-control:focus {
    background-color: var(--surface-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

/* Update navigation */
.navbar {
    background-color: var(--surface-color) !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand, .navbar-nav .nav-link {
    color: var(--text-color) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Coin Image Preview Tooltip */
.coin-image-preview {
    position: relative;
    cursor: pointer;
}

.coin-image-preview .preview-tooltip {
    position: absolute;
    top: -210px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.coin-image-preview:hover .preview-tooltip {
    opacity: 1;
    visibility: visible;
}

.coin-image-preview .preview-tooltip img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.coin-image-preview .preview-tooltip .loading {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 4px;
    font-size: 0.8rem;
}

.coin-image-preview .preview-tooltip .error {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #dc3545;
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: center;
}

/* Navigation */
.navbar-brand .coin-logo {
    font-size: 2rem;
    animation: coin-spin 3s infinite ease-in-out;
}

/* Group badge in header (slightly larger for visibility in user-mode) */
.group-badge {
    font-size: 1.125rem; /* slightly larger for better click target */
    padding: 0.5rem 0.95rem;
    border-radius: 12px;
    line-height: 1; /* keep compact */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer; /* indicate clickable */
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.group-badge .fa-users {
    font-size: 1.1rem;
}

.group-badge small {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* If group-badge is used as an anchor, remove default anchor styles but keep accessibility */
.group-badge[href] {
    color: inherit;
    text-decoration: none;
}

.group-badge[href]:hover,
.group-badge[href]:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    opacity: 0.98;
}

.group-badge[href]:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Make the group badge a solid primary pill for clear contrast on white navbar */
.group-badge.bg-primary,
.group-badge.bg-primary[href],
.group-badge {
    background-color: var(--primary-color) !important; /* primary blue */
    color: #ffffff !important; /* white text for contrast */
    border: none !important;
    box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}

.group-badge .fa-users,
.group-badge .fw-semibold,
.group-badge small {
    color: inherit; /* icon and text stay white */
}

.group-badge small {
    opacity: 0.9;
}

/* Hover/focus: slightly darker primary to indicate interactivity */
.group-badge[href]:hover,
.group-badge[href]:focus {
    background-color: #005bb5 !important; /* darker blue */
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(2,6,23,0.08);
}

.group-badge[href]:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(2,6,23,0.06);
}

/* Focus ring for keyboard users */
.group-badge[href]:focus {
    outline: 3px solid rgba(59,130,246,0.16);
    outline-offset: 2px;
}

/* Hero section coin logo */
.coin-logo {
    animation: coin-spin 3s infinite ease-in-out;
}

@keyframes coin-spin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f172a 100%);
    min-height: 500px;
}

.hero-coin-display {
    position: relative;
}

.coin-animation {
    font-size: 8rem;
    display: inline-block;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* Statistics Cards */
.stats-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.stat-icon {
    transition: transform 0.3s ease;
}

.stats-section .card:hover .stat-icon {
    transform: scale(1.1);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease;
    border-radius: 15px;
    height: 100%;
}

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

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Coin Grid */
.coin-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.coin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.coin-image {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Indicate the coin image is interactive when it opens the detail modal */
.coin-image-clickable {
    cursor: pointer;
}

.coin-card:hover .coin-image {
    transform: scale(1.05);
}

/* Catalog page: reuse hero background and hero coin card visuals */
.catalog-page {
    /* subtle ocean-inspired background for main area */
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    min-height: 500px; /* keep hero-like height tone */
    padding-bottom: 60px;
}

/* Catalog header and results count should follow base color schema */
.catalog-page h2,
.catalog-page h1,
.catalog-page .results-header,
.catalog-page #results-count {
    color: var(--text-color) !important;
}

/* Slightly dim the results-count to match hero micro-copy */
.catalog-page #results-count {
    color: var(--text-muted) !important;
    font-weight: 500;
}

.catalog-page #coins-grid {
    perspective: 1000px; /* enable 3D perspective for children */
}

/* Make catalog coin cards use unified coin card variables */
.catalog-page .coin-card {
    background: var(--coin-card-bg);
    border: var(--coin-card-border);
    border-radius: var(--coin-card-radius);
    box-shadow: var(--coin-card-shadow);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    color: var(--coin-card-text);
}

.catalog-page .coin-card .card-body { background: transparent; }

/* unified hover effects for catalog cards */
.catalog-page .coin-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--coin-card-shadow-hover);
}

/* Reuse unified pop style for opened catalog cards */
.catalog-page .coin-card.card-pop,
.coin-card.hero-card-pop,
.hero-card-pop {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--coin-card-shadow-hover);
}

/* Slightly enlarge image when popped */
.catalog-page .coin-card.card-pop .coin-image {
    transform: scale(1.08);
}

/* Colors inside coin card for unified background */
.catalog-page .coin-card,
.catalog-page .coin-card .card-body,
.catalog-page .coin-card .card-title,
.catalog-page .coin-card .h5 {
    color: var(--coin-card-text);
}

.catalog-page .coin-card .card-text {
    color: var(--coin-card-text-muted);
}

.catalog-page .coin-card .card-title {
    font-weight: 700;
}

/* Type badge (top-left) - adapted for professional blue background */
.catalog-page .coin-card .badge.position-absolute.start-0 {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.35rem 0.6rem;
    font-weight: 700;
}

/* Ownership badge contrast on dark hero background */
.catalog-page .coin-card .ownership-badge {
    /* Match RE badge visual: green circular gradient */
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg,#28a745,#1e7e34) !important;
    color: white !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(255,255,255,0.12) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22) !important;
    z-index: 15 !important;
    cursor: pointer !important;
}

/* Value on card: make it white and bolder, similar to hero */
.catalog-page .coin-card .h5 {
    color: white !important;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

/* Coin image: adapted for light background */
.catalog-page .coin-card .coin-image {
    background: #ffffff;
    border: 2px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-page .coin-card:hover .coin-image {
    transform: scale(1.06);
}

/* White circular plate behind coin image like hero */
.catalog-page .coin-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem; /* even tighter padding so coin fills plate more */
    background: #ffffff;
    border-radius: 50%;
    width: 160px; /* plate size retained */
    height: 160px;
    margin: 10px auto 0 auto;
    box-shadow: 0 12px 26px rgba(0,0,0,0.20);
}

.catalog-page .coin-image-wrapper .coin-image {
    width: 150px; /* slightly larger coin image to occupy more plate */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    background: #ffffff;
}

/* Option 1: High-contrast solid circular badge for CC / RE
   Note: background color removed here so individual coin-type classes
   control the badge color and avoid clashing with ownership badge. */
.catalog-page .coin-card .badge.position-absolute.start-0 {
    color: #fff;
    font-weight: 800;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.06);
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
    z-index: 12;
    padding: 0; /* enforce circular geometry */
    /* Default to blue for type badge unless overridden by .coin-type-re */
    background: linear-gradient(145deg,#e6f4ff,#cfeaff) !important;
    color: #03406a !important;
}

/* Blue variant for CC */
.catalog-page .coin-card .badge.bg-primary.position-absolute.start-0 {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display:inline-flex; align-items:center; justify-content:center;
    background: linear-gradient(145deg,#e6f4ff,#cfeaff); /* light-blue fill */
    color: #03406a; /* darker blue text for contrast */
    border: 1px solid rgba(3,64,106,0.08);
    box-shadow: 0 6px 16px rgba(3,64,106,0.08);
    padding: 0;
}

/* Green variant for RE removed to avoid conflict with ownership badge; use .coin-type-re instead */
.catalog-page .coin-card .badge.bg-success.position-absolute.start-0 {
    /* intentionally left as no-op to avoid empty ruleset; coin color is controlled by .coin-type-re */
    --_noop: 0;
}

/* Value badge style (if shown inside card) */
.catalog-page .coin-value-badge,
.catalog-page .coin-card .coin-value-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 14px;
    font-weight: 700;
}

/* Small texts lighter for gradient background */
.catalog-page .coin-card .card-text.small,
.catalog-page .coin-card .card-text.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Make the type/series line match gradient theme */
.catalog-page .coin-card .card-text.text-muted.small {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Make the feature text match hero styling (slightly lighter white) */
.catalog-page .coin-card .card-text.small.text-truncate {
    /* match the muted hero tone used for type/series */
    color: rgba(255,255,255,0.5) !important;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Search Bar */
.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 10;
}

.search-input {
    padding-left: 2.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-width: 2px;
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.bg-success {
    background-color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Country Flags */
.country-flag {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: 3rem 0;
    }
    
    .coin-animation {
        font-size: 4rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .coin-image {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 350px;
        padding: 2rem 0;
    }
    
    .coin-animation {
        font-size: 3rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .stats-section .col-sm-6:nth-child(odd) {
        margin-bottom: 1rem;
    }
}

/* Animation Classes */
.animate__fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.scroll-to-top.show {
    display: flex;
}

/* Coin Modal Styles */
.coin-modal {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.coin-modal .modal-body {
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--background-color) 100%);
}

.coin-detail-container {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    /* Allow the modal body to control scrolling. Removing max-height/overflow
       from the inner container avoids nested scrollbars in the modal. */
    max-height: none;
    overflow: visible;
}

.coin-image-section {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

/* Small pill button used to add/remove coin for selected user */
.history-pill {
    position: relative;
    left: 0;
    top: 0;
    z-index: 20;
    align-self: center;
}

.coin-main-image {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 15px 35px rgba(0,102,204,0.3);
    transition: transform 0.3s ease;
}

.coin-main-image:hover {
    transform: scale(1.05);
}

/* Circle color variants for coin detail image */
.coin-main-image.circle-default {
    border-color: rgba(255,255,255,0.85);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.coin-main-image.circle-green {
    border-color: var(--secondary-color, #28a745);
    box-shadow: 0 15px 35px rgba(40,167,69,0.18);
}

.coin-main-image.circle-blue {
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(0,102,204,0.28);
}

.coin-thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.coin-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.coin-thumbnail:hover,
.coin-thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
}

.coin-info-section {
    display: flex;
    flex-direction: column;
}

.coin-header {
    text-align: center;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    /* Use CSS variables for easy schema switching */
    background: var(--modal-header-bg);
    border: var(--modal-header-border);
    border-radius: var(--modal-header-radius);
    box-shadow: var(--modal-header-shadow);
    color: var(--modal-header-text);
}

/* Modal-specific header overrides: align left and ensure country name truncates */
#coinDetailModal .coin-header {
    text-align: left;
    /* Ensure text is visible on gradient background */
    color: var(--modal-header-text);
}

#coinDetailModal .coin-country {
    max-width: 220px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    color: var(--modal-header-text);
}

#coinDetailModal .coin-value-badge {
    /* keep the same visual style but ensure it doesn't wrap */
    white-space: nowrap;
    color: var(--modal-header-text);
}

/* Modal-specific visual adjustments */
#coinDetailModal .modal-coin-flag {
    font-size: 2.2rem; /* larger flag */
    line-height: 1;
}

#coinDetailModal .modal-coin-country {
    font-size: 1.25rem; /* larger country text */
    font-weight: 700;
    color: rgba(255,255,255,0.95);
}

#coinDetailModal .modal-coin-value {
    font-size: 1.6rem; /* larger value */
    font-weight: 800;
    color: white;
.ownership-modal-badges .badge.bg-primary,
.badge.bg-primary {
    background: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Owner info modal: selected owner row */
.owner-item.selected-owner {
    background: rgba(99, 102, 241, 0.08);
    border-left: 4px solid var(--primary-color);
    padding-left: 0.5rem;
    border-radius: 6px;
}

.owner-item .owner-name {
    font-weight: 600;
}
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

#coinDetailModal .coin-type-year {
    /* match card small muted text: smaller, muted white */
    font-size: 0.875rem; /* small */
    color: rgba(255,255,255,0.5) !important;
    font-weight: 500;
}

/* Remove the pill background for the value in the modal */
#coinDetailModal .modal-coin-value {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Make the modal header sticky so it remains visible while scrolling */
#coinDetailModal .coin-header {
    position: sticky;
    top: 0;
    /* Use modal header variables for consistent theming */
    background: var(--modal-header-bg);
    z-index: 10;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    /* offset text from edges */
    padding-left: 1rem;
    padding-right: 1rem;
    /* rounded top corners to match modal content */
    border-top-left-radius: var(--modal-header-radius);
    border-top-right-radius: var(--modal-header-radius);
    /* ensure background respects rounded corners */
    background-clip: padding-box;
    color: var(--modal-header-text);
    /* subtle inner separation */
    box-shadow: var(--modal-header-shadow);
}

#coinDetailModal .modal-body {
    max-height: calc(100vh - 120px);
    overflow: auto;
}

.coin-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.coin-value-badge {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.3rem;
}

.coin-type-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

/* Ensure coin type badges and ownership badges align at the same level */
.position-relative .badge.position-absolute.top-0.start-0,
.position-relative .badge.position-absolute.top-0.end-0 {
    top: 8px !important;
}

.position-relative .badge.position-absolute.top-0.start-0 {
    left: 8px !important;
}

.position-relative .badge.position-absolute.top-0.end-0 {
    right: 8px !important;
}

/* Navigation controls */
.coin-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
}

.nav-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.coin-position {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Modal transition styles */
#coinDetailModal .modal-body {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.coin-details-wrapper {
    margin-top: 1.5rem;
}

.coin-simple-info {
    text-align: center;
}

.info-line {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.info-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    max-height: 120px;
    overflow-y: auto;
}

/* Ownership section in modal */
.ownership-modal-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.ownership-modal-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.ownership-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ownership-modal-badges .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@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;
    }
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .coin-detail-container {
        padding: 1rem;
    }
    
    .coin-main-image {
        width: 180px;
        height: 180px;
    }
    
    .coin-simple-details {
        gap: 1.5rem;
        margin-bottom: 1rem;
    }

    /* other responsive modal rules */
    
    .simple-detail {
        min-width: 70px;
    }
    
    .coin-title {
        font-size: 1.2rem;
    }
    
    .coin-value-badge {
        font-size: 1rem;
        padding: 0.25rem 0.6rem;
    }
    
    .coin-feature-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-description {
        font-size: 0.95rem;
        color: #6c757d;
        line-height: 1.3;
    }
}

/* Highlight feature cell when there is a conflict (same id but different feature) */
.conflict-feature {
    background: linear-gradient(90deg, rgba(255,245,230,0.9), rgba(255,250,240,0.9));
    border-left: 4px solid rgba(255,193,7,0.6);
}

/* Responsive adjustments for simplified modal */
@media (max-width: 576px) {
    .coin-navigation {
        padding: 0.4rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .coin-position {
        font-size: 0.8rem;
    }
    
    .coin-main-image {
        width: 200px;
        height: 200px;
    }
    
    .info-line {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .info-description {
        font-size: 0.85rem;
        padding: 0.5rem;
        margin-top: 0.75rem;
        max-height: 100px;
    }
}

/* Group-specific styles */
.group-indicator {
    z-index: 1000;
}

.group-indicator .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.ownership-info {
    margin-top: 8px;
    display: none; /* Ownership info moved to coin details modal */
}

.ownership-info .badge {
    font-size: 0.7em;
    padding: 0.3rem 0.5rem;
}

.coin-card.group-mode {
    position: relative;
}

.coin-card.group-mode .ownership-info {
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    margin-top: 8px;
}

.badge.bg-outline-secondary {
    color: #6c757d;
    border: 1px solid #6c757d;
    background-color: transparent;
}

/* Semantic coin type badges (Option A) - avoid using bg-success for RE to keep ownership badge distinct */
.catalog-page .coin-card .badge.coin-type-cc,
.catalog-page .coin-card .coin-type-cc {
    background: linear-gradient(145deg, #3b82f6, #1e40af) !important;
    color: #fff !important;
    border-radius: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 6px rgba(14,165,233,0.08);
}
.catalog-page .coin-card .badge.coin-type-re,
.catalog-page .coin-card .coin-type-re {
    background: linear-gradient(145deg, #6c757d, #495057) !important;
    color: #fff !important;
    border-radius: 0.5rem;
    padding: 0.2rem 0.45rem;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 6px rgba(0,0,0,0.06);
}

/* Extra-specific rules (matching the badge position classes) to guarantee override */
.catalog-page .coin-card .badge.position-absolute.start-0.coin-type-cc {
    background: linear-gradient(145deg, #3b82f6, #1e40af) !important;
    color: #fff !important;
}
.catalog-page .coin-card .badge.position-absolute.start-0.coin-type-re {
    background: linear-gradient(145deg, #6c757d, #495057) !important;
    color: #fff !important;
}

/* Ownership badge in upper right corner - Override all Bootstrap styles */
.ownership-badge {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, #1e7e34, #198754) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2) !important;
    z-index: 10 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: white !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    line-height: 1 !important;
}

/* Coin detail modal: reuse coin-type styles from catalog cards */
.coin-type-section .badge.coin-type-cc,
.coin-type-section .coin-type-cc {
    background: linear-gradient(145deg, #3b82f6, #1e40af) !important;
    color: #fff !important;
    border-radius: 0.5rem;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 18px rgba(14,165,233,0.06);
}
.coin-type-section .badge.coin-type-re,
.coin-type-section .coin-type-re {
    background: linear-gradient(145deg, #6c757d, #495057) !important;
    color: #fff !important;
    border-radius: 0.5rem;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 18px rgba(0,0,0,0.06);
}


/* Hero latest coin small card */
#hero-latest-coin {
    border-radius: 12px;
    overflow: hidden;
}
#hero-latest-coin .card-body { padding: .5rem .75rem; }
#hero-latest-coin .coin-image { height: 140px; object-fit: contain; background: #ffffff; }

/* Hero-specific coin card styling - now using unified coin card variables */
.hero-coin-card {
    background: var(--coin-card-bg);
    border: var(--coin-card-border);
    border-radius: var(--coin-card-radius);
    box-shadow: var(--coin-card-shadow);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    color: var(--coin-card-text);
}
.hero-coin-card .hero-flag { font-size: 2rem; }
.hero-coin-card .fw-semibold { color: var(--coin-card-text); }
.hero-coin-card .card-body { background: transparent; }

.hero-card-pop {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--coin-card-shadow-hover);
}

/* Hero coin image */
.hero-coin-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    background: #ffffff;
}

.hero-coin-card .d-flex.align-items-center { color: white; }
#hero-latest-coin .fw-semibold { font-weight: 700; }

/* Footer-specific overrides */
.footer-coin-logo {
    /* Remove any spinning/animation on the small footer logo */
    animation: none !important;
    transform: none !important;
}

.footer-coin-text {
    /* Make footer text more visible against dark background */
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.9rem;
}

/* Ensure footer contrast for small screens */
@media (max-width: 576px) {
    .footer-coin-text {
        color: rgba(255,255,255,0.95) !important;
    }
}

/* Compact footer adjustments to reduce offsets from edges and vertical padding */
.bg-dark.py-2.mt-auto {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
}

.footer-coin-text {
    font-size: 0.85rem;
}

.footer .row > div {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

@media (max-width: 768px) {
    .footer .row {
        text-align: center;
    }
    .footer .col.text-end {
        text-align: center !important;
        margin-top: 0.25rem;
    }
}
/* Ensure arrow appears on all ownership badge types */
/* Removed ::after arrow from ownership badges to prevent the small ▼ pointer from appearing */

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.ownership-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.15),
        0 8px 16px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.ownership-badge.ownership-full:hover,
.ownership-badge.ownership-partial:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 12px rgba(25, 135, 84, 0.3),
        0 10px 20px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

/* Special styling for the "everyone owns" badge - maintain circular 3D style */
.ownership-badge.ownership-full {
    background: linear-gradient(145deg, #1e7e34, #198754) !important;
    color: white !important;
    font-size: 0.65rem !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50% !important;
    animation: pulse-success 2s infinite;
    padding: 0 !important;
    /* Maintain 3D box-shadow */
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* Numeric ownership badge - maintain circular 3D style */
.ownership-badge.ownership-partial {
    background: linear-gradient(145deg, #1e7e34, #198754) !important;
    color: white !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    /* Maintain 3D box-shadow */
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* Pulse animation for full ownership - updated for circular 3D style */
@keyframes pulse-success {
    0% {
        box-shadow: 
            0 2px 4px rgba(0,0,0,0.1),
            0 4px 8px rgba(0,0,0,0.1),
            inset 0 1px 0 rgba(255,255,255,0.2);
    }
    50% {
        box-shadow: 
            0 4px 8px rgba(25, 135, 84, 0.4),
            0 8px 16px rgba(25, 135, 84, 0.2),
            inset 0 1px 0 rgba(255,255,255,0.3);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 
            0 2px 4px rgba(0,0,0,0.1),
            0 4px 8px rgba(0,0,0,0.1),
            inset 0 1px 0 rgba(255,255,255,0.2);
    }
}

/* Group filter sections */
.filter-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Owner Info Modal */
.owner-info-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1055 !important;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(3px);
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    box-sizing: border-box;
}

.owner-info-modal[style*="flex"] {
    display: flex !important;
}

.owner-info-content {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    padding: 0;
    min-width: 300px;
    max-width: 350px;
    width: 100%;
    animation: fadeInScale 0.3s ease-out;
    position: relative;
    border: 2px solid #e9ecef;
    overflow: hidden;
    margin: auto;
}

.owner-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid #f1f3f4;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.owner-info-header h6 {
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    flex-grow: 1;
    font-size: 1.1rem;
}

.owner-info-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.owner-info-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: scale(1.1);
}

.owner-info-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.owner-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
    gap: 16px;
}

.owner-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.owner-item:first-child {
    padding-top: 0;
}

.owner-name {
    font-weight: 700;
    color: #198754;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
}

.owner-date {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive group indicator */
@media (max-width: 768px) {
    .group-indicator {
        position: static !important;
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .navbar .container,
    .navbar .container-fluid {
        flex-direction: column;
        align-items: center;
    }
    
    .ownership-info .badge {
        font-size: 0.65em;
        margin-bottom: 2px;
    }
    
    /* Mobile improvements for owner info modal */
    .owner-info-modal {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }
    
    .owner-info-content {
        min-width: 280px;
        max-width: calc(100% - 20px);
        margin: 0 auto;
        position: relative !important;
        top: auto !important;
        left: auto !important;
    }
    
    .owner-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .owner-date {
        text-align: left;
        font-size: 0.8rem;
        color: #868e96;
    }
}

/* Compact navbar: reduce horizontal padding and align items closer to edges */
.navbar {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.navbar .container-fluid.px-3,
.navbar .container.px-3 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Make brand slightly more compact */
.navbar-brand {
    gap: 0.5rem;
    padding-right: 0.25rem;
}

/* Reduce space between nav links and edges */
.navbar-nav .nav-link {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

/* Ensure group badge sits flush to the right with small left margin */
.navbar-nav .nav-item .badge {
    margin-left: 0.25rem;
    margin-right: 0; /* remove extra margin */
}

/* Admin Panel Styles */
.admin-panel {
    background-color: #f8f9fa;
    min-height: calc(100vh - 120px);
}

.admin-panel .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.admin-panel .nav-tabs .nav-link {
    background-color: transparent;
    border-color: transparent;
    color: #6c757d;
    font-weight: 500;
}

.admin-panel .nav-tabs .nav-link.active {
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    color: var(--primary-color);
    font-weight: 600;
}

.admin-panel .table {
    margin-bottom: 0;
}

.admin-panel .table th {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.admin-panel .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

.admin-panel .modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
}

.admin-panel .modal-header .btn-close {
    filter: invert(1);
}

.admin-panel .form-text {
    font-size: 0.8rem;
    color: #6c757d;
}

.admin-panel .table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

.admin-panel .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Loading animation */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Highlight selected group row */
.admin-panel .table tbody tr.table-active {
    background-color: rgba(99, 102, 241, 0.1);
}

/* Alert animations */
.alert {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive admin table */
@media (max-width: 768px) {
    .admin-panel .btn-group {
        flex-direction: column;
    }
    
    .admin-panel .btn-group .btn {
        margin-bottom: 2px;
        border-radius: 0.25rem !important;
    }
    
    .admin-panel .table-responsive {
        font-size: 0.9rem;
    }
}

/* Member Statistics Section */
.member-stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.member-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.member-stat-card.border-primary {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.stat-item {
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.stat-date {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.stat-coin {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    line-height: 1.3;
}

.member-stats-section h2 {
    color: #343a40;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* New compact stats line for member cards */
.member-stats-line {
    flex-wrap: wrap;
}

.member-stats-line .text-center {
    min-width: 50px;
    flex: 0 0 auto;
}

.member-stats-line .fw-bold {
    font-size: 0.9rem !important;
    line-height: 1;
}

.member-stats-line .text-muted {
    font-size: 0.7rem;
    line-height: 1;
}

.last-added {
    font-size: 0.8rem;
    padding: 0.25rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

