* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow-x: hidden;
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 25% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 75% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.dashboard-header {
    position: relative;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    z-index: 20;
}

.header-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.8), transparent);
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(30, 41, 59, 0.5);
    padding: 8px 20px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.stat-value {
    font-weight: 700;
    color: white;
    font-size: 16px;
}

.stat-icon {
    color: #8b5cf6;
    font-size: 14px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-ring-inner {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

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

.loading-text {
    margin-top: 16px;
    color: #94a3b8;
    font-size: 13px;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.bot-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bot-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
}

.bot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s;
}

.bot-card:hover::before {
    opacity: 1;
}

.bot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.bot-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.bot-info {
    flex: 1;
}

.bot-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.bot-number {
    font-size: 11px;
    color: #94a3b8;
    font-family: monospace;
}

.bot-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
}

.status-online {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-offline {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.bot-stats {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
}

.stat-badge i {
    color: #8b5cf6;
    font-size: 10px;
}

.last-seen {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 16px;
}

.contact-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 100px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.contact-btn:hover {
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: #475569;
    margin-bottom: 16px;
}

.empty-state p {
    color: #94a3b8;
}

.hidden {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-message {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.recipient-info {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.recipient-info i {
    color: #8b5cf6;
}

.recipient-info span:first-of-type {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.message-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-size: 14px;
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

.message-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
}

.send-wa-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 100px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.send-wa-btn:hover {
    transform: scale(0.98);
}

.flex {
    display: flex;
}

.hidden {
    display: none !important;
}