/**
 * CURSING — dark-theme.css
 * Glassmorphism, Orbs, Glow Effects
 */

/* ==============================================
   GLASSMORPHISM CONTAINERS
   ============================================== */
.glass {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
}

.glass-light {
    background: rgba(26, 34, 53, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
}

.glass-card {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.2);
}

/* ==============================================
   NEON GLOW EFFECTS
   ============================================== */
.glow-primary {
    box-shadow: 0 0 20px rgba(99,102,241,0.4), 0 0 60px rgba(99,102,241,0.15);
}

.glow-cyan {
    box-shadow: 0 0 20px rgba(6,182,212,0.4), 0 0 60px rgba(6,182,212,0.15);
}

.glow-success {
    box-shadow: 0 0 20px rgba(16,185,129,0.4);
}

.glow-border {
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--gradient-neon);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition);
}

.glow-border:hover::before {
    opacity: 1;
}

/* ==============================================
   ORB BACKGROUND (CSS puro, sem canvas)
   ============================================== */
.orb-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
    top: -200px;
    left: -150px;
    border-radius: 50%;
    animation: orbFloat1 25s ease-in-out infinite;
}

.orb-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6,182,212,0.14) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    border-radius: 50%;
    animation: orbFloat2 20s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(60px, -40px) scale(1.1); }
    66%       { transform: translate(-40px, 30px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(-50px, 40px) scale(1.08); }
    66%       { transform: translate(30px, -30px) scale(0.93); }
}

/* Terceiro orb via wrapper */
.orb-mid {
    position: fixed;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
    top: 40%;
    left: 45%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orbFloat3 30s ease-in-out infinite;
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%       { transform: translate(-50%, -50%) scale(1.2); }
}

/* ==============================================
   GRID LINES BACKGROUND (tech effect)
   ============================================== */
.grid-bg {
    background-image:
        linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ==============================================
   NEON BORDERS ANIMADOS
   ============================================== */
.neon-border {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #8b5cf6, #6366f1);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gradientShift 4s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==============================================
   SHIMMER LOADING
   ============================================== */
.shimmer {
    background: linear-gradient(
        90deg,
        var(--bg-surface) 25%,
        var(--bg-elevated) 50%,
        var(--bg-surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmerAnim 1.5s infinite;
    border-radius: var(--radius);
}

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

/* ==============================================
   PROGRESS BARS
   ============================================== */
.progress-bar {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-neon);
    border-radius: var(--radius-full);
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent-light);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ==============================================
   AVATAR
   ============================================== */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    color: white;
    flex-shrink: 0;
}

.avatar-sm  { width: 32px; height: 32px; font-size: 13px; }
.avatar-md  { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg  { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl  { width: 64px; height: 64px; font-size: 22px; }

.avatar-gradient {
    background: var(--gradient-primary);
}

.avatar-accent {
    background: var(--gradient-accent);
}

/* ==============================================
   TOOLTIPS DARK
   ============================================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    border: 1px solid var(--border);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 999;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ==============================================
   FOCUS VISIBLE DARK
   ============================================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==============================================
   MODAL DARK
   ============================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.8);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(99,102,241,0.15);
    animation: scaleIn 0.3s var(--transition-bounce);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-close {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

/* ==============================================
   DROPDOWN DARK
   ============================================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-width: 180px;
    z-index: 100;
    animation: fadeInDown 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(99,102,241,0.08);
    color: var(--text-primary);
}

.dropdown-item.danger {
    color: #f87171;
}

.dropdown-item.danger:hover {
    background: rgba(239,68,68,0.08);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* ==============================================
   EMPTY STATE DARK
   ============================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ==============================================
   NOTIFICATION TOAST
   ============================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

.toast-icon { font-size: 20px; }
.toast-msg  { font-size: 14px; color: var(--text-secondary); flex: 1; }

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.info    { border-left: 3px solid var(--primary); }
