/* ============================================
   KYRACHAT V2 - NOVO DESIGN MODERNO
   Inspirado em Nemora.ai / Character.AI
   ============================================ */

/* IMPORTAR FONTE INTER */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   SISTEMA DE CORES - PALETA MODERNA
   ============================================ */
:root {
    /* Cores Primárias - Rosa/Magenta */
    --primary-50: rgba(254, 231, 243, 1);
    --primary-100: rgba(252, 202, 228, 1);
    --primary-200: rgba(249, 159, 206, 1);
    --primary-300: rgba(247, 110, 181, 1);
    --primary-400: rgba(244, 62, 156, 1);
    --primary-500: rgba(222, 13, 121, 1);
    --primary-600: rgba(211, 12, 115, 1);
    --primary-700: rgba(174, 10, 95, 1);
    --primary-800: rgba(145, 8, 79, 1);
    --primary-900: rgba(89, 5, 49, 1);
    
    /* Cores Secundárias - Azul/Roxo */
    --secondary-50: rgba(213, 227, 255, 1);
    --secondary-100: rgba(179, 202, 255, 1);
    --secondary-200: rgba(133, 166, 255, 1);
    --secondary-300: rgba(86, 114, 255, 1);
    --secondary-400: rgba(47, 64, 255, 1);
    --secondary-500: rgba(15, 12, 255, 1);
    
    /* Cores de Background - Escuro */
    --bg-50: rgba(83, 83, 95, 1);
    --bg-100: rgba(59, 59, 68, 1);
    --bg-200: rgba(38, 38, 44, 1);
    --bg-300: rgba(28, 28, 33, 1);
    --bg-400: rgba(14, 14, 16, 1);
    --bg-500: rgba(7, 7, 8, 1);
    --bg-600: rgba(6, 6, 7, 1);
    --bg-700: rgba(5, 5, 6, 1);
    --bg-800: rgba(4, 4, 4, 1);
    --bg-900: rgba(3, 3, 3, 1);
    
    /* Cores de Texto */
    --text-primary: rgba(255, 255, 255, 1);
    --text-secondary: rgba(194, 202, 209, 1);
    --text-tertiary: rgba(160, 160, 160, 1);
    --text-muted: rgba(128, 128, 128, 1);
    
    /* Cores de Divisor */
    --divider: rgba(38, 32, 46, 1);
    
    /* Cores de Glow/Efeitos */
    --glow-bg1: rgba(23, 40, 65, 1);
    --glow-bg2: rgba(65, 18, 44, 1);
    --glow-border1: rgba(255, 44, 247, 1);
    --glow-border2: rgba(251, 4, 123, 1);
    --glow-border3: rgba(255, 126, 188, 1);
    --glow-shadow1: rgba(0, 56, 255, 1);
    --glow-shadow2: rgba(248, 0, 59, 1);
    
    /* Cores de Status */
    --success: rgba(87, 208, 27, 1);
    --warning: rgba(230, 155, 5, 1);
    --error: rgba(224, 11, 21, 1);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-400) 0%, var(--primary-500) 100%);
    --gradient-glow: linear-gradient(135deg, var(--glow-bg1) 0%, var(--glow-bg2) 100%);
    --gradient-card: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    
    /* Espaçamentos */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(222, 13, 121, 0.3);
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
}

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-500);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   LOGO EM TEXTO
   ============================================ */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 700;
}

.logo-kyra,
.logo-kyra {
    color: var(--text-primary);
}

.logo-chat {
    color: var(--primary-500);
}

/* ============================================
   SIDEBAR ESQUERDA - DESKTOP (Estilo Candy.ai)
   ============================================ */
.sidebar-left {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    background: var(--bg-400);
    border-right: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: var(--space-lg) 0;
}

.sidebar-logo {
    padding: 0 var(--space-lg) var(--space-xl);
}

.sidebar-logo .logo {
    font-size: 1.5rem;
}

/* Menu Principal */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 0 var(--space-md);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 14px var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.sidebar-item i {
    width: 22px;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-item.premium {
    color: var(--warning);
}

.sidebar-item.premium i {
    color: var(--warning);
}

.badge-off {
    margin-left: auto;
    background: var(--primary-500);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.sidebar-spacer {
    flex: 1;
}

.sidebar-footer {
    padding: var(--space-lg) var(--space-lg);
    border-top: 1px solid var(--divider);
}

.sidebar-footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color var(--transition-fast);
}

.sidebar-footer-link:hover {
    color: var(--text-secondary);
}

/* ============================================
   DESKTOP TOP BAR
   ============================================ */
.desktop-topbar {
    display: block;
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    height: 60px;
    background: var(--bg-400);
    border-bottom: 1px solid var(--divider);
    z-index: 100;
}

.desktop-topbar-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding: 0 var(--space-xl);
}

.desktop-topbar-spacer {
    flex: 1;
}

.desktop-topbar-auth {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.btn-join-desktop {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-join-desktop:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-login-desktop {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--divider);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-login-desktop:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.desktop-tokens-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.desktop-tokens-btn:hover {
    background: rgba(255, 215, 0, 0.2);
}

.desktop-profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-500);
}

.desktop-profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   MOBILE TOP BAR
   ============================================ */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-400);
    border-bottom: 1px solid var(--divider);
    z-index: 1000;
}

.mobile-topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 var(--space-md);
}

.mobile-topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-topbar-left .logo {
    font-size: 1.25rem;
}

.mobile-topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-join-free {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.btn-join-free:hover {
    background: var(--primary-600);
}

.btn-login-sm {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--divider);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.btn-login-sm:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-tokens-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.mobile-profile-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-500);
}

.mobile-profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   MOBILE DRAWER (Menu Lateral Esquerdo)
   ============================================ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-400);
    z-index: 1001;
    transition: transform var(--transition-normal), visibility var(--transition-normal);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    visibility: hidden;
}

.mobile-drawer.active,
.mobile-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

/* Estilos para classes antigas (compatibilidade com index.php) */
.drawer-header,
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--divider);
}

.drawer-header .logo,
.mobile-drawer-header .logo {
    font-size: 1.35rem;
}

.drawer-close,
.mobile-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
}

.drawer-menu,
.mobile-drawer-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.drawer-item,
.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 14px var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.drawer-item:hover,
.drawer-item.active,
.mobile-drawer-item:hover,
.mobile-drawer-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.drawer-item i,
.mobile-drawer-item i {
    width: 22px;
    font-size: 1.1rem;
    text-align: center;
}

.drawer-item.premium,
.mobile-drawer-item.premium {
    color: var(--warning);
}

.drawer-item.premium i,
.mobile-drawer-item.premium i {
    color: var(--warning);
}

.mobile-drawer-auth {
    padding: var(--space-lg);
    border-top: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.btn-join-drawer {
    width: 100%;
    padding: 12px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-login-drawer {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

.mobile-drawer-user {
    padding: var(--space-md);
    border-top: 1px solid var(--divider);
}

.drawer-user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
}

.drawer-user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.drawer-user-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-lg);
}

.drawer-user-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.drawer-user-link.logout {
    color: var(--danger-500);
}

.drawer-user-link i {
    width: 22px;
    text-align: center;
}

.drawer-spacer {
    flex: 1;
}

.drawer-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--divider);
}

.drawer-footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.drawer-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.drawer-footer a:hover {
    color: var(--primary-500);
}

.drawer-footer span {
    color: var(--text-muted);
    margin: 0 6px;
}

/* ============================================
   DRAWER LANGUAGE SELECTOR
   ============================================ */
.drawer-language-selector {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--divider);
    position: relative;
}

.drawer-lang-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.drawer-lang-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.drawer-lang-btn .lang-flag-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.drawer-lang-btn .lang-name {
    flex: 1;
    text-align: left;
}

.drawer-lang-btn i {
    font-size: 12px;
    transition: transform var(--transition-fast);
}

.drawer-language-selector.open .drawer-lang-btn i {
    transform: rotate(180deg);
}

.drawer-lang-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    margin-top: 8px;
}

.drawer-language-selector.open .drawer-lang-dropdown {
    max-height: 200px;
}

.drawer-lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.drawer-lang-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.drawer-lang-item.active {
    background: rgba(222, 13, 121, 0.15);
    color: var(--text-primary);
}

.drawer-lang-item .lang-flag-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================
   DRAWER EXTERNAL LINKS
   ============================================ */
.drawer-external-links {
    padding: var(--space-sm) var(--space-md);
}

.drawer-external-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.drawer-external-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.drawer-external-item i {
    width: 20px;
    text-align: center;
}

.drawer-divider {
    height: 1px;
    background: var(--divider);
    margin: var(--space-sm) var(--space-md);
}

/* ============================================
   DRAWER AUTH BUTTONS (NOVO)
   ============================================ */
.drawer-auth-buttons {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    border-top: 1px solid var(--divider);
}

.drawer-user-section {
    padding: var(--space-md);
    border-top: 1px solid var(--divider);
}

.drawer-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================
   AUTH SOCIAL BUTTON (GOOGLE)
   ============================================ */
.auth-social {
    margin-bottom: 20px;
}

.btn-social.google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #4285F4;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-social.google:hover {
    background: #357ae8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.btn-social.google i {
    font-size: 18px;
}

/* ============================================
   AUTH DIVIDER
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--divider);
}

.auth-divider:not(:empty)::before {
    margin-right: 12px;
}

.auth-divider:not(:empty)::after {
    margin-left: 12px;
}

/* ============================================
   LAYOUT PRINCIPAL - COM SIDEBAR
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-layout.with-sidebar {
    padding-left: 220px;
}

.main-content {
    flex: 1;
    width: 100%;
}

/* ============================================
   SIDEBAR - NAVEGAÇÃO LATERAL
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-400);
    border-right: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-slow);
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--divider);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
}

.sidebar-logo img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Menu de Navegação */
.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.nav-section {
    margin-bottom: var(--space-lg);
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-xs);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item-badge {
    margin-left: auto;
    background: var(--primary-500);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Área de Tokens na Sidebar */
.sidebar-tokens {
    padding: var(--space-md);
    border-top: 1px solid var(--divider);
}

.tokens-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.tokens-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tokens-icon {
    font-size: 1.5rem;
    color: #ffd700;
}

.tokens-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tokens-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.tokens-add-btn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tokens-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Perfil do Usuário na Sidebar */
.sidebar-profile {
    padding: var(--space-md);
    border-top: 1px solid var(--divider);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-500);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-status {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ============================================
   CONTEÚDO PRINCIPAL
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: 60px; /* Altura da desktop-topbar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header do Conteúdo */
.content-header {
    position: sticky;
    top: 0;
    background: rgba(7, 7, 8, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--divider);
    padding: var(--space-md) var(--space-xl);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-300);
    border: 1px solid var(--divider);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
    width: 280px;
    transition: all var(--transition-fast);
}

.header-search:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(222, 13, 121, 0.1);
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 100%;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search i {
    color: var(--text-muted);
}

/* ============================================
   ÁREA DE STORIES
   ============================================ */
.stories-section {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--divider);
}

.stories-container {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.story-avatar-wrapper {
    position: relative;
    padding: 3px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
}

.story-avatar-wrapper.viewed {
    background: var(--bg-100);
}

.story-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--bg-500);
}

.story-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-add {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--bg-200);
    border: 2px dashed var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
}

.story-add:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: rgba(222, 13, 121, 0.1);
}

/* ============================================
   GRID DE PERSONAGENS - DESIGN MODERNO
   ============================================ */
.characters-section {
    padding: var(--space-xl);
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-filters {
    display: flex;
    gap: var(--space-sm);
}

.filter-btn {
    background: var(--bg-300);
    border: 1px solid var(--divider);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: var(--bg-200);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

/* Grid de Cards */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-lg);
}

/* Card de Personagem - Novo Design */
.character-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: all var(--transition-slow);
    background: var(--bg-300);
}

.character-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.card-image-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.character-card:hover .character-image {
    transform: scale(1.1);
}

/* Overlay Gradiente */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.95) 100%
    );
    opacity: 1;
    transition: opacity var(--transition-fast);
}

/* Badges */
.card-badges {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.badge-vip {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.badge-new {
    background: var(--gradient-primary);
    color: white;
}

.badge-photo {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.badge-online {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Botão Favorito */
.favorite-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
    opacity: 0;
}

.character-card:hover .favorite-btn {
    opacity: 1;
}

.favorite-btn:hover {
    background: rgba(255, 107, 107, 0.8);
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.3);
    opacity: 1;
}

/* Conteúdo do Card */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    z-index: 5;
}

.character-info {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.character-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.character-age {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.character-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

/* Tags do Personagem */
.character-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Ação de Desbloqueio VIP */
.card-unlock {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 15;
}

.character-card.locked:hover .card-unlock {
    opacity: 1;
}

.unlock-icon {
    font-size: 2.5rem;
    color: #ffd700;
}

.unlock-text {
    font-size: 0.875rem;
    color: white;
    text-align: center;
}

.unlock-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.unlock-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4);
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-500);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 120px;
    height: auto;
    margin-bottom: var(--space-xl);
    animation: pulse 2s ease-in-out infinite;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.loading-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--primary-500);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.loading-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0.4s; }

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

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* ============================================
   MOBILE HEADER - APENAS MOBILE
   ============================================ */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(7, 7, 8, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--divider);
    padding: 0 var(--space-md);
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.mobile-logo img {
    height: 36px;
    width: auto;
}

.mobile-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-tokens {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-full);
    padding: var(--space-xs) var(--space-md);
}

.mobile-tokens i {
    color: #ffd700;
}

.mobile-tokens span {
    font-weight: 700;
    color: white;
}

/* ============================================
   MOBILE NAVIGATION - BOTTOM BAR
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, rgba(15, 15, 18, 0.95) 0%, rgba(7, 7, 8, 0.99) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    padding: 0 var(--space-sm);
}

/* Container para itens (usado no index.php) */
.mobile-nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    width: 100%;
}

/* Estilos diretos para a navegação quando não tem .mobile-nav-items */

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    min-width: 56px;
    border-radius: var(--radius-md);
}

.mobile-nav-item i {
    font-size: 1.3rem;
    transition: all var(--transition-fast);
}

.mobile-nav-item span {
    opacity: 0.9;
}

.mobile-nav-item.active {
    color: var(--primary-500);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

.mobile-nav-item:hover {
    color: var(--text-primary);
}

/* Item Premium na nav mobile */
.mobile-nav-item.premium {
    color: var(--text-muted);
}

.mobile-nav-item.premium i {
    color: #8B5CF6;
}

.mobile-nav-item.premium.active,
.mobile-nav-item.premium:hover {
    color: #8B5CF6;
}

/* Botão Central - Criar (versão layout_footer.php) */
.mobile-nav-item.create {
    position: relative;
    min-width: 56px;
    padding: 0;
}

.mobile-nav-item.create i {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
    margin-top: -20px;
    border: 3px solid var(--bg-400);
    transition: all var(--transition-fast);
}

.mobile-nav-item.create:hover i {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(236, 72, 153, 0.5);
}

.mobile-nav-item.create span {
    display: none;
}

/* Botão Central - Criar (versão index.php) */
.mobile-nav-create {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-create .nav-create-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 3px solid var(--bg-400);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
    margin-top: -20px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.mobile-nav-create .nav-create-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(236, 72, 153, 0.5);
}

/* ============================================
   RESPONSIVIDADE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .sidebar-left {
        width: 200px;
    }
    
    .app-layout.with-sidebar {
        padding-left: 200px;
    }
    
    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: var(--space-md);
    }
}

/* ============================================
   RESPONSIVIDADE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    /* Esconder Sidebar Desktop e Desktop Top Bar */
    .sidebar-left {
        display: none;
    }
    
    .desktop-topbar {
        display: none;
    }
    
    /* Mostrar Mobile Top Bar */
    .mobile-topbar {
        display: block;
    }
    
    /* Ajustar Layout */
    .app-layout.with-sidebar {
        padding-left: 0;
        padding-top: 56px;
    }
    
    .main-content {
        padding-bottom: 80px;
        padding-top: 56px !important; /* Altura da mobile-topbar */
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
    }
    
    /* Esconder hero images no mobile para melhor visualização */
    .hero-images {
        display: none;
    }
    
    .hero-text {
        text-align: center;
        width: 100%;
    }
    
    .hero-cta {
        margin: 0 auto;
    }
    
    /* Mostrar Nav Mobile */
    .mobile-nav {
        display: flex !important;
        align-items: center;
        justify-content: space-around;
    }
    
    /* Hero Banner Mobile */
    .hero-banner {
        padding: var(--space-lg) var(--space-md);
    }
    
    .hero-content {
        flex-direction: column;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-images {
        margin-top: var(--space-lg);
    }
    
    /* Stories */
    .stories-section {
        padding: var(--space-md);
    }
    
    .story-avatar {
        width: 56px;
        height: 56px;
    }
    
    /* Grid de Personagens */
    .characters-section {
        padding: var(--space-md);
    }
    
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .character-card {
        aspect-ratio: 3/4.5;
    }
    
    .card-content {
        padding: var(--space-md);
    }
    
    .character-name {
        font-size: 1rem;
    }
    
    .character-age {
        font-size: 0.875rem;
    }
    
    .character-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }
    
    .favorite-btn {
        opacity: 1;
        width: 36px;
        height: 36px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .section-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: var(--space-sm);
    }
    
    /* Category Section Mobile */
    .category-section {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .category-tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        gap: var(--space-sm);
        padding-bottom: var(--space-sm);
    }
    
    .category-search {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVIDADE - MOBILE PEQUENO
   ============================================ */
@media (max-width: 480px) {
    .characters-grid {
        gap: var(--space-sm);
    }
    
    .character-card {
        border-radius: var(--radius-lg);
    }
    
    .card-content {
        padding: var(--space-sm);
    }
    
    .character-name {
        font-size: 0.9rem;
    }
    
    .character-description {
        display: none;
    }
    
    .character-tags {
        display: none;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 0.6rem;
    }
    
    .story-avatar {
        width: 48px;
        height: 48px;
    }
    
    .story-name {
        font-size: 0.65rem;
        max-width: 56px;
    }
}

/* ============================================
   ANIMAÇÕES GLOBAIS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideUp {
    animation: slideUp 0.5s ease forwards;
}

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

/* Stagger Animation para Cards */
.character-card {
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
}

.character-card:nth-child(1) { animation-delay: 0.05s; }
.character-card:nth-child(2) { animation-delay: 0.1s; }
.character-card:nth-child(3) { animation-delay: 0.15s; }
.character-card:nth-child(4) { animation-delay: 0.2s; }
.character-card:nth-child(5) { animation-delay: 0.25s; }
.character-card:nth-child(6) { animation-delay: 0.3s; }
.character-card:nth-child(7) { animation-delay: 0.35s; }
.character-card:nth-child(8) { animation-delay: 0.4s; }
.character-card:nth-child(9) { animation-delay: 0.45s; }
.character-card:nth-child(10) { animation-delay: 0.5s; }

/* ============================================
   UTILITÁRIOS
   ============================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-400);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-50);
}

/* Selection */
::selection {
    background: var(--primary-500);
    color: white;
}

/* ============================================
   MODAL DE AUTENTICAÇÃO (Login/Cadastro)
   ============================================ */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    padding: var(--space-md);
}

.auth-modal-container {
    background: var(--bg-300);
    border: 1px solid var(--divider);
    border-radius: var(--radius-xl);
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.auth-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    z-index: 10;
}

.auth-modal-close:hover {
    background: var(--bg-200);
    color: var(--text-primary);
}

.auth-modal-content {
    padding: var(--space-2xl);
    text-align: center;
}

.auth-logo {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.auth-logo .logo-kyra,
.auth-logo .logo-kyra {
    color: var(--text-primary);
}

.auth-logo .logo-chat {
    color: var(--primary-500);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-xl);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-form .form-group {
    position: relative;
    width: 100%;
}

/* Estilos removidos - agora controlados via .auth-input-group */

/* Botão de submissão do auth */
.btn-auth-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-sm);
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-form .auth-terms {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-md);
    text-align: center;
}

.auth-form .auth-terms a {
    color: var(--primary-500);
    text-decoration: none;
}

.auth-form .auth-terms a:hover {
    text-decoration: underline;
}

/* Auth Input Group - Estilo unificado para todos os popups de auth */
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--bg-400);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.auth-input-group:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

.auth-input-group > i:first-child {
    padding: 0 14px 0 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.auth-input-group input {
    flex: 1;
    width: 100%;
    padding: 14px 14px 14px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
}

.auth-input-group input:focus {
    outline: none;
}

.auth-input-group input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    padding: 0 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.auth-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: left;
    margin-top: -8px;
    margin-bottom: 8px;
}

.auth-forgot {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 8px;
}

.auth-forgot a {
    font-size: 0.85rem;
    color: var(--primary-500);
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

/* Auth Submit Btn (para index.php) */
.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auth Toggle (para index.php) */
.auth-toggle {
    margin-top: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.auth-toggle button {
    background: none;
    border: none;
    color: var(--primary-500);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: var(--space-xs);
}

.auth-toggle button:hover {
    text-decoration: underline;
}

/* Auth Message */
.auth-message {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.auth-message.show {
    display: block;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.toggle-password {
    position: absolute;
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.auth-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: left;
    margin-top: calc(var(--space-xs) * -1);
}

.auth-forgot {
    text-align: right;
    margin-top: calc(var(--space-xs) * -1);
}

.auth-forgot a {
    font-size: 0.85rem;
    color: var(--primary-500);
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

.auth-terms {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-lg);
}

.auth-terms a {
    color: var(--primary-500);
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

.auth-toggle {
    margin-top: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-toggle button {
    background: none;
    border: none;
    color: var(--primary-500);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: var(--space-xs);
}

.auth-toggle button:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    text-align: center;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-social-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-400);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.auth-social-btn:hover {
    background: var(--bg-200);
    border-color: var(--text-muted);
}

.auth-social-btn img {
    width: 20px;
    height: 20px;
}

.auth-submit-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-submit-btn:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.auth-submit-btn:disabled {
    background: var(--bg-400);
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: var(--space-xl) 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--divider);
}

.auth-divider span {
    padding: 0 var(--space-md);
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.btn-social {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-400);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-social:hover {
    background: var(--bg-200);
    border-color: var(--text-muted);
}

.btn-social.google i {
    color: #4285f4;
}

.auth-switch {
    margin-top: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-switch button {
    background: none;
    border: none;
    color: var(--primary-500);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: var(--space-xs);
}

.auth-switch button:hover {
    text-decoration: underline;
}

/* Responsivo para modal */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: var(--space-xl);
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
}

