/* ShareHub Modern Theme */

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #60a5fa;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #1e293b;
}

/* Navigation Bar */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.navbar-brand i {
    -webkit-text-fill-color: var(--primary-color);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: #475569 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(59, 130, 246, 0.1);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(59, 130, 246, 0.15);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: var(--card-shadow-lg);
    border-radius: 0.75rem;
    padding: 0.5rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Headings - Ensure visibility on light background */
h1, h2, h3, h4, h5, h6 {
    color: #0f172a;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

/* Cards */
.card {
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--card-shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    padding: 1.25rem;
    border: none;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header i,
.card-header .bi {
    color: white !important;
}

.card-title {
    color: #0f172a;
    font-weight: 600;
}

.card-text {
    color: #475569;
}

.card-body h4,
.card-body h5,
.card-body h6 {
    color: #0f172a;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary i,
.btn-primary .bi {
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #94a3b8;
    color: #475569;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #94a3b8;
    color: white;
}

.btn-outline-warning {
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #0f172a;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
    background: #ffffff;
    color: #0f172a;
}

/* Ensure input text is always visible */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="datetime-local"],
textarea,
select {
    color: #0f172a !important;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
}

.form-label {
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

.form-text, .text-muted {
    color: #64748b !important;
}

/* Links */
a {
    color: #2563eb;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Badge colors for light background */
.badge.bg-warning {
    color: #ffffff !important;
}

.badge.bg-info {
    color: #ffffff !important;
}

/* Alert headings */
.alert h4,
.alert h5,
.alert h6 {
    color: inherit;
}

/* Preformatted text in light theme */
pre {
    color: #334155;
    background: rgba(241, 245, 249, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 1rem;
    border-radius: 0.5rem;
}

/* List group items */
.list-group-item {
    background: transparent;
    color: #334155;
    border-color: rgba(59, 130, 246, 0.1);
}

/* Display numbers */
.display-4 {
    color: #0f172a;
}

/* Icon Colors for Light Theme */
.bi {
    color: #3b82f6;
}

/* Override for specific icon contexts */
.card-header .bi,
.hero-title .bi {
    color: inherit;
}

.text-success .bi,
.badge.bg-success .bi {
    color: #10b981;
}

.text-warning .bi,
.badge.bg-warning .bi {
    color: #ffffff;
}

.text-danger .bi,
.badge.bg-danger .bi {
    color: #ffffff;
}

.text-info .bi,
.badge.bg-info .bi {
    color: #ffffff;
}

/* Share Card Styles */
.share-card {
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.share-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.share-card:hover::before {
    transform: scaleX(1);
}

.share-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.share-title-link {
    color: #0f172a;
    transition: color 0.2s ease;
}

.share-title-link:hover {
    color: var(--primary-color);
}

.share-stats {
    padding: 0.75rem;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #475569;
    font-size: 0.875rem;
}

.stat-item i {
    color: var(--primary-color);
}

/* Badge improvements for light theme */
.badge {
    padding: 0.45rem 0.65rem;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(245, 158, 11, 0.6);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(239, 68, 68, 0.6);
}

.badge.bg-info {
    background: rgba(6, 182, 212, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(6, 182, 212, 0.6);
}

.badge i {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Icon Button Styles */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-icon:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-outline-secondary.btn-icon:hover {
    background: #64748b;
    color: white;
    border-color: #64748b;
}

.btn-outline-warning.btn-icon:hover {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.btn-outline-danger.btn-icon:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Hero Section */
.hero-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--card-shadow-lg);
    text-align: center;
    margin: 2rem 0;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #475569;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    padding: 2rem 0;
    margin-top: auto;
    color: #64748b;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Table Styles */
.table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.75rem;
    overflow: hidden;
    color: #1e293b;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.01);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

/* Badge */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Share Action Dropdown Menu */
.share-action-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.05) !important;
    border-radius: 0.75rem !important;
    padding: 0.5rem 0 !important;
    min-width: 180px !important;
    z-index: 9999 !important;
    margin-top: 0.75rem !important;  /* Increased from 0.5rem */
}

/* Share popup menu */
.share-popup-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.05) !important;
    border-radius: 0.75rem !important;
    padding: 0 !important;
    min-width: 240px !important;  /* Adjusted for horizontal layout */
    max-width: 280px !important;
    z-index: 9999 !important;
    margin-top: 0.75rem !important;
}

/* Fix dropdown positioning - disable Popper.js transform to prevent jumping */
.dropdown-menu.show {
    animation: dropdownFadeIn 0.15s ease-out;
    /* Override Popper.js transform to prevent position jump */
    transform: none !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Copy link button in stats */
.share-stats .btn-link {
    opacity: 0.7;
}

.share-stats .btn-link:hover {
    opacity: 1;
    color: #93c5fd !important;
    transform: scale(1.15);
}

.share-popup-menu img {
    transition: transform 0.2s ease;
}

.share-popup-menu img:hover {
    transform: scale(1.05);
}

.share-action-menu .dropdown-item {
    color: #334155 !important;
    font-size: 0.85rem !important;
    padding: 0.6rem 1rem !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
}

.share-action-menu .dropdown-item i {
    font-size: 0.9rem !important;
    width: 18px !important;
    text-align: center !important;
}

.share-action-menu .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #0f172a !important;
    padding-left: 1.25rem !important;
}

.share-action-menu .dropdown-item:active {
    background: rgba(59, 130, 246, 0.15) !important;
}

.share-action-menu .dropdown-divider {
    border-color: rgba(59, 130, 246, 0.15) !important;
    margin: 0.4rem 0 !important;
}

.share-action-menu .dropdown-item.text-danger {
    color: #ef4444 !important;
}

.share-action-menu .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* Ensure dropdown is above cards */
.dropdown-menu {
    z-index: 9999 !important;
}

.card {
    position: relative;
    overflow: visible !important;
}

/* Fix for mobile dropdown menu being clipped by parent containers */
@media (max-width: 768px) {
    .share-card,
    .card {
        overflow: visible !important;
    }
    
    /* Ensure dropdown container doesn't clip */
    .dropdown {
        overflow: visible !important;
    }
}

/* Updated: 2026-05-19 - Fix dropdown and badge colors */
/* Updated: 2026-05-19 15:30 - Fix card-header text and icon colors */
