/*=====================================================
   GUITAR MASTER ACADEMY - SISTEMA DE MÓDULOS
   Com Gamificação: Rookie do Som → Eco Crescente → Guardião do Ritmo → Forjador da Harmonia → Lenda Musical
=====================================================*/

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

:root {
    /* Cores Principais */
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --secondary-color: #34495e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    /* Cores dos Níveis/Ranks */
    --rank-rookie: #718096;
    --rank-eco: #48bb78;
    --rank-guardian: #4299e1;
    --rank-forger: #9f7aea;
    --rank-legend: #ecc94b;
    
    /* Backgrounds */
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;
    
    /* Texto */
    --text-dark: #ffffff;
    --text-light: #ffffff;
    --text-muted: #a0aec0;
    
    /* Gradientes de Módulos */
    --gradient-iniciante: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-intermediario: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-avancado: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 30px rgba(231, 76, 60, 0.3);
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-light);
    line-height: 1.6;
}

/*=====================================================
   BRASÕES DOS NÍVEIS - TAMANHOS FIXOS
=====================================================*/

/* Container principal dos escudos */
.rank-badge,
.gma-rank-badge {
    width: 60px !important;
    height: 72px !important;
    max-width: 60px !important;
    max-height: 72px !important;
    min-width: 60px !important;
    min-height: 72px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    overflow: hidden !important;
}

/* Tamanho pequeno */
.rank-badge.small,
.gma-rank-badge.small {
    width: 32px !important;
    height: 38px !important;
    max-width: 32px !important;
    max-height: 38px !important;
    min-width: 32px !important;
    min-height: 38px !important;
}

/* Tamanho grande */
.rank-badge.large,
.gma-rank-badge.large {
    width: 100px !important;
    height: 120px !important;
    max-width: 100px !important;
    max-height: 120px !important;
    min-width: 100px !important;
    min-height: 120px !important;
}

/* SVG dentro do escudo - FORÇAR TAMANHO */
.rank-badge svg,
.gma-rank-badge svg {
    width: 60px !important;
    height: 72px !important;
    max-width: 60px !important;
    max-height: 72px !important;
    min-width: 60px !important;
    min-height: 72px !important;
    display: block !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.rank-badge.small svg,
.gma-rank-badge.small svg {
    width: 32px !important;
    height: 38px !important;
    max-width: 32px !important;
    max-height: 38px !important;
    min-width: 32px !important;
    min-height: 38px !important;
}

.rank-badge.large svg,
.gma-rank-badge.large svg {
    width: 100px !important;
    height: 120px !important;
    max-width: 100px !important;
    max-height: 120px !important;
    min-width: 100px !important;
    min-height: 120px !important;
}

/* Container dentro da timeline */
.rank-badge-container {
    width: 60px !important;
    height: 72px !important;
    max-width: 60px !important;
    max-height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden !important;
}

.rank-badge-container .rank-badge,
.rank-badge-container .gma-rank-badge {
    width: 60px !important;
    height: 72px !important;
}

.rank-badge-container svg {
    width: 60px !important;
    height: 72px !important;
    max-width: 60px !important;
    max-height: 72px !important;
}

/* Animação de brilho para rank atual */
.rank-badge.current,
.gma-rank-badge.current {
    animation: rankGlow 2s ease-in-out infinite;
}

@keyframes rankGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(255,255,255,0.6)); }
}

/*=====================================================
   HEADER DO MÓDULO
=====================================================*/

.module-header {
    background: var(--gradient-iniciante);
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.module-header.intermediario {
    background: var(--gradient-intermediario);
}

.module-header.avancado {
    background: var(--gradient-avancado);
}

.module-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.module-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.module-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.module-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.module-meta-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.meta-item {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.meta-item.gold {
    background: linear-gradient(135deg, #f6e05e 0%, #ecc94b 50%, #d69e2e 100%);
    color: #744210;
    font-weight: 600;
}

/*=====================================================
   CONTAINER PRINCIPAL
=====================================================*/

.gma-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.gma-module-wrapper {
    background: var(--bg-dark);
    min-height: 100vh;
}

/*=====================================================
   PAINEL DO ALUNO
=====================================================*/

.student-panel {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.student-panel-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.student-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-iniciante);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.student-info {
    flex: 1;
    min-width: 200px;
}

.student-info h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.student-info .student-level {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* Escudo no header do aluno - PEQUENO */
.student-info .student-level .rank-badge,
.student-info .student-level .gma-rank-badge,
.student-level .rank-badge,
.student-level .gma-rank-badge {
    width: 32px !important;
    height: 38px !important;
    max-width: 32px !important;
    max-height: 38px !important;
    min-width: 32px !important;
    min-height: 38px !important;
}

.student-info .student-level .rank-badge svg,
.student-info .student-level .gma-rank-badge svg,
.student-level .rank-badge svg,
.student-level .gma-rank-badge svg {
    width: 32px !important;
    height: 38px !important;
    max-width: 32px !important;
    max-height: 38px !important;
}

.student-info .student-level .level-name {
    font-weight: 600;
    color: var(--rank-rookie);
}

.student-info .student-level .level-name.rookie { color: var(--rank-rookie); }
.student-info .student-level .level-name.eco { color: var(--rank-eco); }
.student-info .student-level .level-name.guardian { color: var(--rank-guardian); }
.student-info .student-level .level-name.forger { color: var(--rank-forger); }
.student-info .student-level .level-name.legend { color: var(--rank-legend); }

.xp-progress-container {
    flex: 1;
    min-width: 250px;
}

.xp-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.xp-progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.xp-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
    background: var(--rank-rookie);
}

.xp-progress-fill.rookie { background: var(--rank-rookie); }
.xp-progress-fill.eco { background: var(--rank-eco); }
.xp-progress-fill.guardian { background: var(--rank-guardian); }
.xp-progress-fill.forger { background: var(--rank-forger); }
.xp-progress-fill.legend { background: linear-gradient(90deg, var(--rank-legend), #f6e05e); }

/*=====================================================
   ESTATÍSTICAS DO ALUNO
=====================================================*/

.student-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/*=====================================================
   TIMELINE DE RANKS - CORRIGIDA
=====================================================*/

.ranks-showcase {
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.ranks-showcase h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

/* Timeline - JS e PHP */
.ranks-timeline,
.gma-ranks-timeline {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    position: relative;
    padding: 0 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.ranks-timeline::before,
.gma-ranks-timeline::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(255,255,255,0.2);
    z-index: 0;
}

/* Items da timeline - JS e PHP */
.rank-item,
.gma-rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 1;
    flex: 0 0 auto;
    width: 90px;
    opacity: 0.5;
    transition: var(--transition-normal);
}

.rank-item.achieved,
.gma-rank-item.achieved {
    opacity: 1;
}

.rank-item.current,
.gma-rank-item.current {
    opacity: 1;
    transform: scale(1.1);
}

/* Container do badge na timeline */
.rank-item .rank-badge-container,
.gma-rank-item .gma-rank-badge {
    width: 60px !important;
    height: 72px !important;
    max-width: 60px !important;
    max-height: 72px !important;
    margin-bottom: 10px;
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.rank-item.current .rank-badge-container::after,
.gma-rank-item.current::after {
    content: '★';
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 1rem;
    color: gold;
    animation: starPulse 1s infinite;
    z-index: 10;
}

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

.rank-item .rank-name,
.gma-rank-item .gma-rank-name {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 3px;
    white-space: nowrap;
}

.rank-item .rank-xp,
.gma-rank-item .gma-rank-xp {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/*=====================================================
   NAVEGAÇÃO DE MÓDULOS
=====================================================*/

.module-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/*=====================================================
   BOTÕES
=====================================================*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--text-light);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/*=====================================================
   GRID DE LIÇÕES
=====================================================*/

.lessons-section {
    margin-bottom: 40px;
}

.lessons-section h2 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: #ffffff;
}

.section-icon {
    font-size: 1.3rem;
}

.section-description {
    color: var(--text-muted);
    margin-bottom: 20px;
    margin-top: -15px;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/*=====================================================
   CARDS DE LIÇÃO
=====================================================*/

.lesson-card {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid rgba(255,255,255,0.1);
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.2);
}

.lesson-card.completed {
    border-color: var(--success-color);
}

.lesson-card.completed::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.lesson-card.locked {
    opacity: 0.7;
}

.lesson-thumbnail {
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-iniciante);
}

.lesson-thumbnail.gradient-easy,
.gradient-easy {
    background: var(--gradient-iniciante);
}

.lesson-thumbnail.gradient-medium,
.gradient-medium {
    background: var(--gradient-intermediario);
}

.lesson-thumbnail.gradient-hard,
.gradient-hard {
    background: var(--gradient-avancado);
}

.lesson-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.lesson-icon {
    font-size: 3rem;
}

.lesson-difficulty {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0,0,0,0.5);
}

.lesson-difficulty.easy { color: #48bb78; }
.lesson-difficulty.medium { color: #f6ad55; }
.lesson-difficulty.hard { color: #fc8181; }

.lesson-content {
    padding: 20px;
}

.lesson-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

.lesson-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.premium-badge {
    background: linear-gradient(135deg, #f6e05e 0%, #ecc94b 100%);
    color: #744210;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.lesson-xp {
    font-size: 0.85rem;
    color: var(--rank-legend);
    font-weight: 600;
    margin-bottom: 15px;
}

.lesson-actions {
    margin-top: 15px;
}

/*=====================================================
   FERRAMENTAS
=====================================================*/

.tools-section {
    margin-bottom: 40px;
}

.tools-section h2 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.quick-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition-normal);
    border: 1px solid rgba(255,255,255,0.1);
}

.quick-tool-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tool-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/*=====================================================
   CONQUISTAS
=====================================================*/

.achievements-section {
    margin-bottom: 40px;
}

.achievements-section h2 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievements-mini {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.achievement-badge {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.achievement-badge:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.15);
}

.achievement-badge.locked {
    filter: grayscale(1);
    opacity: 0.5;
}

.achievement-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-darker);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    margin-bottom: 5px;
}

.achievement-badge:hover .achievement-tooltip {
    opacity: 1;
    visibility: visible;
}

/*=====================================================
   AVISOS E ALERTAS
=====================================================*/

.prerequisite-warning {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
    border: 1px solid var(--danger-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.prerequisite-warning h3 {
    margin-bottom: 10px;
    color: var(--danger-color);
}

.prerequisite-warning p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/*=====================================================
   SEÇÕES ESPECIAIS
=====================================================*/

.virtuoso-banner {
    background: linear-gradient(135deg, rgba(236, 201, 75, 0.2) 0%, rgba(214, 158, 46, 0.2) 100%);
    border: 1px solid var(--rank-legend);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.virtuoso-banner h3 {
    color: var(--rank-legend);
    margin-bottom: 10px;
}

.virtuoso-banner p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/*=====================================================
   TABELA DE MODOS
=====================================================*/

.modes-table-section {
    margin-bottom: 40px;
}

.modes-table-wrapper {
    overflow-x: auto;
}

.modes-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    overflow: hidden;
}

.modes-table th,
.modes-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modes-table th {
    background: rgba(0,0,0,0.3);
    font-weight: 600;
    color: var(--text-light);
}

.modes-table tr:last-child td {
    border-bottom: none;
}

.modes-table tr:hover td {
    background: rgba(255,255,255,0.05);
}

/*=====================================================
   FUNÇÕES HARMÔNICAS
=====================================================*/

.harmony-functions-section {
    margin-bottom: 40px;
}

.harmony-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.harmony-card {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
}

.harmony-card.tonica {
    border-color: var(--success-color);
}

.harmony-card.subdominante {
    border-color: var(--warning-color);
}

.harmony-card.dominante {
    border-color: var(--danger-color);
}

.harmony-card h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.harmony-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.harmony-chords {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chord-main {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
}

.chord-sub {
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.cadences-bar {
    background: rgba(0,0,0,0.2);
    padding: 15px 20px;
    border-radius: 12px;
}

.cadences-bar h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cadences-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cadence {
    font-size: 0.85rem;
}

/*=====================================================
   CERTIFICADO
=====================================================*/

.certificate-section {
    margin-bottom: 40px;
}

.certificate-card {
    background: linear-gradient(135deg, rgba(236, 201, 75, 0.1) 0%, rgba(214, 158, 46, 0.1) 100%);
    border: 2px solid var(--rank-legend);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.certificate-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.certificate-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--rank-legend);
}

.certificate-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.certificate-progress {
    height: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.certificate-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rank-legend), #f6e05e);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.certificate-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/*=====================================================
   XP POPUP
=====================================================*/

.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(236, 201, 75, 0.95) 0%, rgba(214, 158, 46, 0.95) 100%);
    color: #744210;
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    z-index: 10000;
    animation: popupIn 0.3s ease-out;
    box-shadow: 0 10px 50px rgba(236, 201, 75, 0.5);
}

.xp-popup.hide {
    animation: popupOut 0.3s ease-in forwards;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popupOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

.xp-amount {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.xp-label {
    font-size: 1rem;
    font-weight: 600;
}

/*=====================================================
   RESPONSIVIDADE
=====================================================*/

@media (max-width: 768px) {
    .module-header h1 {
        font-size: 1.8rem;
    }
    
    .module-meta-bar {
        gap: 10px;
    }
    
    .meta-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .student-panel-header {
        flex-direction: column;
        text-align: center;
    }
    
    .student-info {
        min-width: 100%;
    }
    
    .student-info .student-level {
        justify-content: center;
    }
    
    .xp-progress-container {
        min-width: 100%;
    }
    
    .student-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Timeline responsiva */
    .ranks-timeline,
    .gma-ranks-timeline {
        justify-content: center;
        gap: 10px;
    }
    
    .ranks-timeline::before,
    .gma-ranks-timeline::before {
        display: none;
    }
    
    .rank-item,
    .gma-rank-item {
        width: 70px;
    }
    
    .rank-item .rank-badge-container,
    .gma-rank-item .gma-rank-badge {
        width: 50px !important;
        height: 60px !important;
        max-width: 50px !important;
        max-height: 60px !important;
    }
    
    .rank-item .rank-badge-container svg,
    .gma-rank-item .gma-rank-badge svg,
    .rank-badge-container .rank-badge svg {
        width: 50px !important;
        height: 60px !important;
        max-width: 50px !important;
        max-height: 60px !important;
    }
    
    .rank-item .rank-name,
    .gma-rank-item .gma-rank-name {
        font-size: 0.65rem;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gma-container {
        padding: 15px 10px;
    }
    
    .student-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .rank-item,
    .gma-rank-item {
        width: 60px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .harmony-grid {
        grid-template-columns: 1fr;
    }
}
