/* ==========================================================================
   CODEMASTERY HUB - MASTER STYLESHEET
   Home Dashboard, Auth Modals, Certificate Diploma & Workspace
   ========================================================================== */

:root {
  --bg-dark: #070a12;
  --bg-card: #0f1626;
  --bg-card-hover: #162035;
  --bg-editor: #0a0e1a;
  --border-color: #1b263b;
  --border-highlight: #2c3e60;

  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #7c4dff;
  --accent-green: #00e676;
  --accent-orange: #ff9100;
  --accent-red: #ff5252;
  --accent-gold: #ffd700;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'Fira Code', monospace;
  --font-serif: 'Cinzel', serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* NAVBAR GLOBAL */
.global-navbar {
  height: 64px;
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* BUTTON DESIGN SYSTEM */
button, .btn {
  font-family: var(--font-sans);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: all 0.2s ease;
  outline: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 242, 254, 0.35);
}

.btn-outline {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.btn-outline:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.btn-success {
  background: var(--accent-green);
  color: #000;
  font-weight: 700;
}

.btn-run {
  background: linear-gradient(90deg, var(--accent-green), #00c853);
  color: #000;
  font-weight: 700;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-text h1 span {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 10px;
  color: var(--text-muted);
}

/* USER AUTH PANEL NO NAVBAR */
.user-auth-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-auth-panel button,
.user-auth-panel .btn-outline {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  font-family: var(--font-sans) !important;
  background: rgba(0, 242, 254, 0.12) !important;
  border: 1px solid var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2) !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  text-decoration: none !important;
}

.user-auth-panel button:hover,
.user-auth-panel .btn-outline:hover {
  background: var(--accent-cyan) !important;
  color: #000 !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4) !important;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.user-name-text {
  font-weight: 600;
  font-size: 12px;
}

/* ==========================================================================
   TELA 1: HOME DASHBOARD / LANDING PAGE
   ========================================================================== */

.home-screen {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* HERO BANNER */
.hero-banner {
  background: linear-gradient(135deg, rgba(15, 22, 38, 0.9), rgba(22, 32, 53, 0.9));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  margin-bottom: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn-hero {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.45);
}

.btn-outline-hero {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card i {
  font-size: 32px;
  color: var(--accent-cyan);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
}

.stat-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* CARDS DE LINGUAGENS */
.section-title-wrapper {
  margin-bottom: 30px;
}

.section-title-wrapper h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-wrapper p {
  color: var(--text-muted);
  font-size: 14px;
}

.language-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.lang-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
}

.lang-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.15);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.card-header-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-level {
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

.tag-workload {
  background: rgba(124, 77, 255, 0.1);
  color: var(--accent-purple);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

.lang-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 8px;
}

.lang-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.card-features {
  list-style: none;
  margin-bottom: 24px;
}

.card-features li {
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-features li i {
  color: var(--accent-green);
}

.btn-card-launch {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-card-launch:hover {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}

/* CERTIFIED BANNER */
.certified-feature-banner {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 145, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 30px;
}

.cert-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cert-icon {
  font-size: 48px;
  color: var(--accent-gold);
}

.cert-banner-content h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.btn-gold {
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   TELA 2: WORKSPACE & IDE
   ========================================================================== */

.workspace-wrapper {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
}

.back-to-home-btn {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-header-workspace {
  height: 48px;
  padding: 0 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  height: calc(100vh - 112px);
  overflow: hidden;
}

.left-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  height: 100%;
  overflow: hidden;
  background: var(--bg-card);
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
}

.tab-content {
  flex: 1;
  display: none !important;
  padding: 24px;
  overflow-y: auto;
}

.tab-content.active {
  display: block !important;
}

/* MARKDOWN STYLES */
.markdown-body {
  line-height: 1.7;
  color: #cbd5e1;
}

.markdown-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #fff;
  margin: 20px 0 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.markdown-body h4 {
  font-size: 15px;
  color: var(--accent-cyan);
  margin: 14px 0 6px;
}

.markdown-body p {
  margin-bottom: 12px;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.markdown-body code:not(pre code) {
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.markdown-body pre {
  background: var(--bg-editor);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 16px;
}

/* EXERCISE & QUIZ CARDS */
.exercise-card, .quiz-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.quiz-option {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-option:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.05);
}

.quiz-option.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.12);
  font-weight: 600;
}

/* PANEL RIGHT */
.right-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
}

.editor-header {
  height: 42px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.editor-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-editor-wrapper {
  height: 40%;
  display: flex;
  background: var(--bg-editor);
  border-bottom: 1px solid var(--border-color);
}

.line-numbers {
  width: 40px;
  padding: 16px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  user-select: none;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border-color);
  line-height: 1.6;
}

#code-editor {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  resize: none;
  white-space: pre;
  overflow-y: auto;
}

/* TERMINAL */
.terminal-wrapper {
  height: 25%;
  background: #060911;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.terminal-header {
  padding: 6px 14px;
  background: #0e1320;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.status-indicator {
  font-size: 11px;
  color: var(--accent-green);
}

.terminal-body {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #00ff66;
  overflow-y: auto;
  margin: 0;
  white-space: pre-wrap;
}

/* MEMORY INSPECTOR */
.memory-inspector-container {
  flex: 1;
  background: var(--bg-card);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.memory-inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.memory-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.memory-legend {
  display: flex;
  gap: 8px;
  font-size: 10px;
}

.legend-item {
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.stack-badge { background: rgba(0, 242, 254, 0.15); color: var(--accent-cyan); }
.heap-badge { background: rgba(255, 145, 0, 0.15); color: var(--accent-orange); }

.memory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}

.memory-section {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.memory-cells {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.memory-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
}

.cell-addr { color: var(--text-dim); font-size: 10px; }
.cell-name { color: var(--accent-cyan); font-weight: 600; }
.cell-value { color: var(--text-main); }
.empty-memory { text-align: center; padding: 20px; color: var(--text-dim); font-size: 11px; }

/* MODAIS DE AUTH E CERTIFICADO */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.auth-form h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent-cyan);
}

.auth-error-msg {
  color: var(--accent-red);
  font-size: 12px;
  margin-bottom: 14px;
}

.btn-block { width: 100%; padding: 12px; font-weight: 700; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-muted); }
.link-switch, .link-forgot { color: var(--accent-cyan); cursor: pointer; text-decoration: underline; }

/* DIPLOMA PRINTABLE CERTIFICATE */
.certificate-modal-card {
  max-width: 900px;
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diploma-paper {
  background: #fff8eb;
  color: #1a1a1a;
  padding: 40px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.diploma-border {
  border: 6px double #b8860b;
  padding: 30px;
  text-align: center;
}

.diploma-seal-icon { font-size: 54px; color: #b8860b; }
.diploma-header h2 { font-family: var(--font-serif); font-size: 28px; color: #8b0000; letter-spacing: 2px; }
.diploma-header h3 { font-family: var(--font-sans); font-size: 14px; color: #555; margin-bottom: 20px; }
.diploma-text { font-size: 14px; color: #444; margin: 10px 0; }
.student-name { font-family: var(--font-serif); font-size: 34px; color: #000; border-bottom: 2px solid #b8860b; display: inline-block; padding: 0 20px 6px; margin: 10px 0; }
.course-title { font-family: var(--font-heading); font-size: 18px; color: #b8860b; margin: 10px 0; }
.diploma-details { font-size: 12px; color: #666; max-width: 600px; margin: 0 auto 30px; }

.diploma-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #ddd;
  padding-top: 20px;
  font-size: 11px;
  color: #666;
}

.signature-line { width: 200px; height: 1px; background: #000; margin-bottom: 6px; }

@media print {
  body * { visibility: hidden; }
  #printable-diploma, #printable-diploma * { visibility: visible; }
  #printable-diploma { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ==========================================================================
   SISTEMA DE ANIMAÇÕES FLUIDAS, TRANSITION & POPUPS (TOASTS)
   ========================================================================== */

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(60px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.home-screen, .workspace-screen {
  animation: fadeScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-form {
  animation: fadeScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-card, .certificate-modal-card {
  animation: modalPopIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tab-content.active {
  animation: fadeScaleIn 0.25s ease-out forwards;
}

/* EFEITOS FLUIDOS EM BOTÕES E CARDS */
button, .btn {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.25);
}

button:active, .btn:active {
  transform: translateY(0) scale(0.98);
}

.lang-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lang-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 15px 35px rgba(0, 242, 254, 0.15);
}

/* POPUPS / TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: rgba(15, 22, 38, 0.95);
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.toast-item.success { border-left-color: var(--accent-green); }
.toast-item.error { border-left-color: var(--accent-red); }
.toast-item.info { border-left-color: var(--accent-cyan); }
.toast-item.warning { border-left-color: var(--accent-orange); }

.toast-item.hiding {
  opacity: 0;
  transform: translateX(40px) scale(0.9);
}
