/* XLX Dashboard Modern Glassmorphism Styles */
/* Color Palette: Light modern backgrounds with frosted glass panels */

:root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --bg-tertiary: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-border-hover: rgba(124, 58, 237, 0.2);
    --accent-purple: #7c3aed;
    --accent-cyan: #0891b2;
    --accent-green: #059669;
    --accent-red: #dc2626;
    --accent-yellow: #d97706;
    --accent-blue: #2563eb;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --gradient-purple-cyan: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --gradient-cyan-green: linear-gradient(135deg, #0891b2 0%, #059669 100%);
    --gradient-purple-pink: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    --shadow-glow: 0 4px 20px rgba(124, 58, 237, 0.15);
    --shadow-glow-cyan: 0 4px 20px rgba(8, 145, 178, 0.15);
    --shadow-glow-green: 0 4px 20px rgba(5, 150, 105, 0.15);
}

/* Base Reset for Modern Look */
html {
    scroll-behavior: smooth;
}

body.modern-theme {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(8, 145, 178, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(5, 150, 105, 0.05) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 22px;
    line-height: 1.85;
    letter-spacing: -0.01em;
    min-height: 100vh;
    padding-top: 80px;
    margin-bottom: 0;
}

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
}

.glass-card-static {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Glow Effects */
.glow-border {
    box-shadow: var(--shadow-glow);
}

.glow-border-cyan {
    box-shadow: var(--shadow-glow-cyan);
}

.glow-border-green {
    box-shadow: var(--shadow-glow-green);
}

.glow-text {
    text-shadow: 0 0 10px currentColor;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-purple-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-green {
    background: var(--gradient-cyan-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Navbar */
.modern-navbar {
    background: rgba(240, 244, 248, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 1.5rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.8rem;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.modern-navbar .navbar-brand img {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.modern-navbar .nav-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modern-navbar .nav-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: 28px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-navbar .nav-info-item:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.2);
}

.modern-navbar .nav-info-item .label {
    color: var(--text-muted);
    font-weight: 500;
}

.modern-navbar .nav-info-item .value {
    color: #7c3aed;
    font-weight: 800;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 14px 18px;
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-menu:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.hamburger-menu span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Modern Sidebar */
.modern-sidebar {
    position: fixed;
    top: 75px;
    left: 0;
    bottom: 0;
    width: 290px;
    background: rgba(240, 244, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    transition: transform 0.3s ease;
}

.modern-sidebar::-webkit-scrollbar {
    width: 6px;
}

.modern-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.modern-sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.modern-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-hover);
}

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

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.15rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-purple-cyan);
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 0 0 2px;
}

.sidebar-nav-link:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
    transform: translateX(4px);
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.sidebar-nav-link:hover::before {
    transform: scaleY(1);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
    font-weight: 700;
}

.sidebar-nav-link.active::before {
    transform: scaleY(1);
}

.sidebar-nav-link .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sidebar-nav-link .badge {
    margin-left: auto;
    background: var(--gradient-purple-cyan);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* Main Content Area */
.modern-main {
    margin-left: 290px;
    padding: 2.5rem;
    min-height: calc(100vh - 75px);
}

/* Centered Content Wrapper */
.content-centered {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.reflector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2.5rem;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.4rem;
    font-weight: 500;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple-cyan);
}

.stat-card.cyan::before {
    background: var(--gradient-cyan-green);
}

.stat-card.green::before {
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.stat-card .stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modern Tables */
.modern-table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: rgba(124, 58, 237, 0.08);
    border-bottom: 1px solid var(--glass-border);
}

.modern-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.modern-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 400;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background: var(--glass-bg-hover);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

.modern-table .table-flag {
    width: 28px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Status Indicators */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.status-dot.online {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse-green 2s infinite;
}

.status-dot.offline {
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

.status-dot.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse-cyan 1s infinite;
}

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

@keyframes pulse-cyan {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* TX Animation */
.tx-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-red);
    animation: tx-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes tx-pulse {
    0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
    100% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
}

/* Module Badge */
.module-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    background: var(--gradient-purple-cyan);
    color: white;
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.25);
}

.module-badge.module-a { background: linear-gradient(135deg, #ef4444, #f97316); }
.module-badge.module-b { background: linear-gradient(135deg, #f97316, #eab308); }
.module-badge.module-c { background: linear-gradient(135deg, #eab308, #22c55e); }
.module-badge.module-d { background: linear-gradient(135deg, #22c55e, #14b8a6); }
.module-badge.module-e { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.module-badge.module-s { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.module-badge.module-k { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.module-badge.module-l { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.module-badge.module-m { background: linear-gradient(135deg, #a855f7, #ec4899); }

/* Protocol Badge */
.protocol-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.protocol-badge.dstar { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.protocol-badge.dmr { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.protocol-badge.ysf { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.protocol-badge.p25 { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.protocol-badge.nxdn { background: rgba(251, 146, 60, 0.2); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.3); }
.protocol-badge.m17 { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Filter Controls */
.filter-container {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--glass-border);
}

.filter-input {
    flex: 1;
    max-width: 220px;
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.filter-input:focus {
    outline: none;
    border-color: #7c3aed;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2), 0 6px 20px rgba(124, 58, 237, 0.15);
    transform: translateY(-1px);
}

.filter-btn {
    padding: 16px 30px;
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.filter-btn:active {
    transform: translateY(-1px);
}

.filter-reset {
    padding: 16px 26px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(124, 58, 237, 0.25);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.filter-reset:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

/* Module Grid */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.module-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.module-card:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
}

.module-card .module-letter {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-purple-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.module-card .module-name {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.module-card .module-users {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Charts Container */
.chart-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.chart-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Callsign Link */
.callsign-link {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.callsign-link:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-purple-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

/* Footer */
.modern-footer {
    margin-left: 290px;
    background: linear-gradient(135deg, rgba(240, 244, 248, 0.85) 0%, rgba(226, 232, 240, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(124, 58, 237, 0.15);
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.modern-footer img {
    display: block;
    max-width: 480px;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.modern-footer p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0.75rem 0;
    font-weight: 500;
    text-align: center;
    max-width: 720px;
    line-height: 1.6;
}

.modern-footer img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.4s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease forwards;
}

/* Staggered animation delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* New row highlight */
.new-row {
    animation: newRowHighlight 2s ease;
}

@keyframes newRowHighlight {
    0% { background: rgba(124, 58, 237, 0.3); }
    100% { background: transparent; }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--glass-bg) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        var(--glass-bg) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Reflector Grid */
.reflector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
}

.reflector-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.reflector-card:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.reflector-card .reflector-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.reflector-card .reflector-country {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.reflector-card .reflector-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}

/* Timeline View for Last Seen */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding: 1rem 0 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 1.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-purple);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 10px var(--accent-purple);
}

.timeline-item.recent::before {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse-cyan 1s infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-sidebar {
        transform: translateX(-100%);
    }

    .modern-sidebar.open {
        transform: translateX(0);
    }

    .modern-main {
        margin-left: 0;
    }

    .modern-footer {
        margin-left: 0;
    }

    .hamburger-menu {
        display: flex;
    }

    .modern-navbar .nav-info {
        display: none;
    }

    .modern-main {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .modern-main {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modern-table-container {
        overflow-x: auto;
    }

    .filter-container {
        flex-wrap: wrap;
    }

    .filter-input {
        max-width: 100%;
    }

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

    .page-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .modern-navbar .navbar-brand span:not(:first-child) {
        display: none;
    }

    .modern-main {
        padding: 1.2rem;
    }
}

/* Sidebar Donation Section */
.sidebar-donation {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    text-align: center;
}

.sidebar-donation img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.sidebar-donation p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

/* Modern Action Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--glass-bg);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 14px;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.15);
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
    text-decoration: none;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.2rem;
}

.btn-icon {
    font-size: 1.3rem;
}

/* Mobile Bottom Nav */
@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(240, 244, 248, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        padding: 0.75rem 0.5rem;
        z-index: 1000;
        justify-content: space-around;
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: var(--glass-bg);
    }

    .mobile-bottom-nav a.active {
        color: #7c3aed;
        background: rgba(124, 58, 237, 0.08);
        border: 2px solid rgba(124, 58, 237, 0.2);
        box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    }

    .mobile-bottom-nav a span {
        font-size: 1.6rem;
    }

    body.modern-theme {
        padding-bottom: 85px;
    }

    .modern-footer {
        margin-left: 0;
        padding: 3rem 1rem;
        text-align: center;
    }

    .modern-footer img {
        max-width: 320px;
    }

    .modern-footer p {
        max-width: 100%;
    }
}

@media (min-width: 1025px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

/* Link styles */
a.pl, .listinglink {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a.pl:hover, .listinglink:hover {
    color: var(--accent-purple);
}

/* Tooltip styles */
a.tip {
    position: relative;
}

a.tip span {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
}

a.tip:hover span {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Small utility text */
.smalllink {
    color: var(--accent-purple);
    font-size: 0.9rem;
    text-decoration: none;
}

.smalllink:hover {
    text-decoration: underline;
}
