/* ===============================================
 * SISTEMA DE CHAT ONLINE - ESTILOS PRINCIPAIS
 * ===============================================

 * Tema Claro + Escuro
 */

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary: #e83e8c;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --border-radius: 1rem;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* ===============================================
 * ESTILOS GLOBAIS
 * =============================================== */

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #333;
    overflow-x: hidden;
}

[data-bs-theme="dark"] body {
    background: #0f0f23;
    color: #e0e0e0;
}

.main-content {
    min-height: calc(100vh - 56px);
}

/* ===============================================
 * COMPONENTES
 * =============================================== */

.hover-lift {
    transition: var(--transition);
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg) !important;
}

.hover-bg:hover {
    background: rgba(108, 99, 255, 0.05);
}

.rounded-4 { border-radius: var(--border-radius) !important; }
.rounded-5 { border-radius: 1.5rem !important; }

/* Cards */
.card {
    transition: var(--transition);
    border: none !important;
}

.card:hover {
    box-shadow: var(--shadow);
}

/* Botões */
.btn {
    transition: var(--transition);
    font-weight: 500;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Formulários */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.15);
}

/* ===============================================
 * HERO SECTION
 * =============================================== */

.hero-section {
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: heroFloat 20s linear infinite;
}

@keyframes heroFloat {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===============================================
 * ROOM CARDS
 * =============================================== */

.room-card {
    position: relative;
    overflow: hidden;
}
.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}
.room-card:hover::before {
    opacity: 1;
}

.room-avatar {
    flex-shrink: 0;
}

.category-card {
    transition: var(--transition);
    cursor: pointer;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

/* ===============================================
 * STICKY SIDEBARS
 * =============================================== */

.sticky-sidebar {
    position: sticky;
    top: 80px;
}

/* ===============================================
 * USER LIST
 * =============================================== */

.user-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.user-list::-webkit-scrollbar {
    width: 4px;
}
.user-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* ===============================================
 * PAGINAÇÃO
 * =============================================== */

.page-link {
    border-radius: 50% !important;
    margin: 0 2px;
    border: none;
    color: var(--primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-item.active .page-link {
    background: var(--primary);
}

/* ===============================================
 * RANKING / LISTAS
 * =============================================== */

.ranking-position {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 50%;
}

/* ===============================================
 * TEMA ESCURO
 * =============================================== */

[data-bs-theme="dark"] .card {
    background: #1e1e3a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .bg-light {
    background: #1a1a35 !important;
}

[data-bs-theme="dark"] .table {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table-light {
    background: #2a2a4a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    color: #fff;
    background: rgba(108, 99, 255, 0.1);
}

[data-bs-theme="dark"] .list-group-item {
    background: #1e1e3a;
    color: #e0e0e0;
    border-color: #2a2a4a;
}

[data-bs-theme="dark"] .list-group-item:hover {
    background: #2a2a4a;
}

[data-bs-theme="dark"] .modal-content {
    background: #1e1e3a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .btn-light {
    background: #2a2a4a;
    border-color: #2a2a4a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .btn-light:hover {
    background: #3a3a5a;
}

[data-bs-theme="dark"] .bg-opacity-10 {
    opacity: 0.2;
}

[data-bs-theme="dark"] .text-muted {
    color: #8a8aaa !important;
}

[data-bs-theme="dark"] .site-footer {
    background: #0a0a1a !important;
    border-top: 1px solid #1e1e3a;
}

[data-bs-theme="dark"] .table td, 
[data-bs-theme="dark"] .table th {
    border-color: #2a2a4a;
}

[data-bs-theme="dark"] .navbar-dark {
    background: #0a0a1a !important;
}

/* ===============================================
 * RESPONSIVO
 * =============================================== */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .sticky-sidebar {
        position: static;
    }
}

/* ===============================================
 * ANIMAÇÕES
 * =============================================== */

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.pulse {
    animation: pulse 2s infinite;
}
