/* aura-theme.css - Design System for Sistema de Aura */
:root {
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --gold: #f59e0b; /* Amber/Gold */
    --gold-glow: rgba(245, 158, 11, 0.4);
    --bg-dark: #0f172a; /* Slate 900 */
    --card-bg: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
}

.light-theme {
    --bg-dark: #f8fafc; /* Slate 50 */
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.15);
}

.light-theme .tab-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

.light-theme .mission-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.light-theme table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.light-theme .btn-primary {
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

body.light-theme {
    background-image: 
        radial-gradient(at 0% 0%, hsla(225,39%,95%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(253,16%,90%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,95%,1) 0, transparent 50%);
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 16px;
}

.light-theme .glass {
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.container {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Telas de Autenticação */
.auth-card {
    margin-top: 10vh;
    padding: 30px;
    text-align: center;
}

.logo-container {
    margin-bottom: 30px;
}

.logo-aura {
    font-size: 3rem;
    color: var(--gold);
    filter: drop-shadow(0 0 10px var(--gold-glow));
    margin-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    outline: none;
    transition: 0.3s;
}

.light-theme .input-group input, .light-theme .input-group select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.btn {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0) scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: var(--danger) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.light-theme .btn-logout {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Dashboards */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 10px;
}

.aura-counter {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 20px;
}

.aura-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Aura Premium Effects */
.aura-counter {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.aura-counter::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    z-index: -1;
    animation: aura-pulse 4s infinite alternate ease-in-out;
}

@keyframes aura-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
}

.aura-value {
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1;
    margin: 10px 0;
    color: var(--gold);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    background: linear-gradient(135deg, #fff 0%, var(--gold) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.5s ease;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Partículas de Brilho */
.aura-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    animation: particle-rise 2s infinite ease-out;
    opacity: 0;
}

@keyframes particle-rise {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(0); opacity: 0; }
}

/* Item da Lista de Alunos */
.student-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    transition: 0.2s;
}

.student-info h4 {
    margin: 0;
    font-size: 1.1rem;
}

.student-grade {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.aura-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid var(--gold-glow);
    white-space: nowrap;
}

/* FAB - Botão de Ação Flutuante */
.fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.3s;
}

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

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-dark);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.light-theme .modal-content {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.admin-list-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 10px;
    margin: 25px 0 15px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid var(--primary);
}

.light-theme .admin-list-header {
    background: rgba(0, 0, 0, 0.03);
}

table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.aura-badge-sm {
    font-size: 0.7rem;
    padding: 2px 8px;
}

/* Insígnias de Nível e Cartões de Missão */
.level-badge {
    background: linear-gradient(135deg, var(--gold), #fbbf24);
    color: #000;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--gold-glow);
    margin-top: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mission-card {
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.mission-card.completed {
    border-left-color: var(--success);
    opacity: 0.8;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.mission-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.mission-reward {
    background: rgba(245, 158, 11, 0.2);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mission-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.mission-meta {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

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

/* Level Categories */
.category-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
}

/* Custom Scrollbar for better looks */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.student-award-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}
.student-award-item:hover {
    background: rgba(255, 255, 255, 0.02);
}
