:root {
  --br-green: #009c3b;
  --br-green-dark: #007a2f;
  --br-yellow: #ffdf00;
  --br-blue: #002776;
  --br-blue-soft: #1d3f91;
  --br-white: #ffffff;
  --br-bg: #f4f7f5;
  --br-card: #ffffff;
  --br-text: #1f2937;
  --br-muted: #6b7280;
  --br-border: #dbe4db;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}


body {
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 223, 0, 0.18), transparent 25%),
    radial-gradient(circle at bottom right, rgba(0, 156, 59, 0.14), transparent 30%),
    linear-gradient(180deg, #f9fbf9 0%, #eef5ef 100%);
  color: var(--br-text);
}


.main-header {
  background: linear-gradient(90deg, var(--br-green), var(--br-blue));
  box-shadow: var(--shadow);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.main-header h1 {
  margin: 0;
  color: white;
  letter-spacing: 0.5px;
  font-size: 2rem;
}


.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}


/***************botones de header******************/
.secondary-action,
.danger-action {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(4px);
}

.secondary-action:hover {
  background: rgba(255, 255, 255, 0.28);
}

.danger-action {
  background: rgba(180, 0, 0, 0.18);
  color: white;
}

.danger-action:hover {
  background: rgba(180, 0, 0, 0.32);
}

main {
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 16px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/****************TOP BAR DE LA 53 A LA 100********************************/
.top-bar {
  max-width: 1180px;
  margin: 20px auto 0;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  justify-content: center;
}

.control-group {
  background: white;
  border: 1px solid var(--br-border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  min-width: 190px;
}

.control-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--br-blue);
  font-weight: 600;
}

.control-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #d8e2d8;
  font-size: 0.95rem;
  background: #fff;
}

.level-selector{
  margin: 20px;
  text-align: center;
}

.level-selector select{
  padding: 8px;
  border-radius: 8px;
  border: none;
}

/*****************SECTION GENERAL  102 A LA ************************/
section { 
  background: var(--br-card);
  border: 1px solid var(--br-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

h2 {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--br-blue);
  border-bottom: 3px solid var(--br-yellow);
  padding-bottom: 8px;
}

h3 {
  color: var(--br-green-dark);
  margin-top: 0;
  margin-bottom: 10px;
}

p {
  line-height: 1.5;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#verbs-list li,
#vocabulary-list li {
  margin-bottom: 10px;
}

#verbs-list button {
  width: 100%;
  text-align: left;
  background: linear-gradient(90deg, var(--br-blue), var(--br-blue-soft));
  color: white;
}

button {
  background: linear-gradient(90deg, var(--br-green), var(--br-green-dark));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  margin: 6px 6px 6px 0;
  box-shadow: 0 6px 14px rgba(0, 156, 59, 0.18);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}


button:active {
  transform: scale(0.98);
}

input[type="text"] {
  width: 100%;
  max-width: 360px;
  padding: 12px 14px;
  border: 2px solid #d7e1d7;
  border-radius: 10px;
  outline: none;
  font-size: 1rem;
  margin: 10px 0 12px;
}

input[type="text"]:focus,
select:focus {
  border-color: var(--br-blue-soft);
  box-shadow: 0 0 0 4px rgba(0, 39, 118, 0.10);
}


#conjugations-container,
#practice-container,
#progress-container,
#vocabulary-practice-container,
#study-container {
  background: #fcfffc;
  border: 1px solid #e4ece4;
  border-radius: 14px;
  padding: 16px;
}


.practice-sentence {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(255,223,0,0.18), rgba(0,156,59,0.08));
  color: var(--br-blue);
  padding: 14px;
  border-radius: 12px;
  margin: 10px 0 14px;
  border-left: 5px solid var(--br-green);
}

#progress-container p,
#practice-container p,
#vocabulary-practice-container p {
  margin: 10px 0;
}

/********************Progress Container***************************************/
.progress-card {
  display: grid;
  gap: 14px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.progress-header h3 {
  margin: 0;
}

.progress-status {
  margin: 4px 0 0;
  color: var(--br-muted);
  font-weight: 600;
}

.progress-score {
  background: var(--br-yellow);
  color: var(--br-blue);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.progress-bar {
  width: 100%;
  height: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--br-green), var(--br-blue));
  border-radius: 999px;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.progress-stats div {
  background: #f4f7f5;
  border: 1px solid var(--br-border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.progress-stats strong {
  display: block;
  font-size: 1.4rem;
  color: var(--br-blue);
}

.progress-stats span {
  font-size: 0.85rem;
  color: var(--br-muted);
}

.progress-mastered .progress-status {
  color: var(--br-green-dark);
}

.progress-learning .progress-status {
  color: var(--br-blue);
}

.progress-new .progress-status {
  color: var(--br-muted);
}


/********************************************************************************/

#practice-result,
#vocabulary-result {
  margin-top: 10px;
  font-weight: 700;
}

.conjugations-wrapper {
  position: relative;
  min-height: 220px;
}

#conjugations-overlay {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  background:
    linear-gradient(rgba(0, 39, 118, 0.76), rgba(0, 156, 59, 0.76)),
    radial-gradient(circle at center, rgba(255,223,0,0.18), transparent 35%);
    backdrop-filter: blur(2px);
}

#conjugations-overlay.hidden {
  display: none;
}



.overlay-content {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 20px;
  border-radius: 16px;
  max-width: 320px;
}



.card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
  border-left: 6px solid var(--br-green);
}

.card h3 {
  color: var(--br-blue);
  margin-bottom: 8px;
}

.card .summary {
  margin-bottom: 10px;
  color: var(--br-text);
}

.card .example {
  background: #f5f9f5;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.empty-state {
  color: var(--br-muted);
  font-style: italic;
}

.app-footer {
  margin-top: 40px;
  padding: 20px 10px;
  background: linear-gradient(90deg, var(--br-green), var(--br-blue));
  color: white;
  text-align: center;
}

.footer-copy p {
  margin: 4px 0;
  font-size: 0.9rem;
}

.dev-credit a {
  color: var(--br-yellow);
  text-decoration: none;
  font-weight: 600;
}

.dev-credit a:hover {
  text-decoration: underline;
}

.practice-actions {
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 223, 0, 0.18), rgba(0, 156, 59, 0.12));
}

.primary-action {
  font-size: 1.05rem;
  padding: 14px 22px;
  border-radius: 14px;
}

/********************animaciones*************/
.feedback-correct {
  animation: correctPulse 0.45s ease;
  color: #009c3b;
}

.feedback-wrong {
  animation: wrongShake 0.45s ease;
  color: #c1121f;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes wrongShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

/*******************Celebration*************/
.celebration-modal {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  
}

.celebration-modal.hidden {
  display: none;
}

.celebration-content {
  background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.6));
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  max-width: 380px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  border-top: 8px solid var(--br-yellow);

  /* opcional: borde que combina con el halo */
  border: 4px solid rgba(0, 200, 0, 0.3);
}

.celebration-emoji {
  font-size: 4rem;
  margin: 0 0 10px;
  animation: trophyPop 0.7s ease;
}
#mascot {
  width: 120px;       /* tamaño fijo */
  height: auto;       /* mantiene proporción */
  margin: 0 auto 15px; /* centrado con espacio debajo */
  display: block; 
  background: transparent;
  
}

@keyframes trophyPop {
  0% { transform: scale(0.4) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}


/**********CONJUGACIONES**********************/

.conjugation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.conjugation-list li {
  background: #f5f9f5;
  border-left: 4px solid var(--br-green);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.conjugation-list .pronoun {
  font-weight: 700;
  color: var(--br-blue);
}

.conjugation-list .form {
  font-weight: 600;
  color: var(--br-green-dark);
}

@media (min-width: 980px) {
  main {
    grid-template-columns: 1fr 1fr;
  }

  section:first-of-type {
    grid-column: 1 / -1;
  }
}

/****************beta*****************/
.beta-banner {
  color: #fff;
  background: #0077b6;
  padding: 12px 20px;
  border-radius: 6px;
  text-align: center;
  font-size: 1.4em;
  animation: fadeIn 2s ease-in-out, pulse 3s infinite;
}

.beta-note {
  text-align: center;
  font-size: 1em;
  color: #333;
  margin-top: 8px;
  animation: fadeIn 3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,119,182,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0,119,182,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,119,182,0); }
}
/************************bandera*************************/
.brazil-flag {
  position: fixed;
  width: 120px;
  animation: waveFlag 6s ease-in-out forwards;
  z-index: 1000;
}

@keyframes waveFlag {
  0%   { transform: translateX(0) rotate(0deg); }
  25%  { transform: translateX(25vw) rotate(5deg); }
  50%  { transform: translateX(50vw) rotate(-5deg); }
  75%  { transform: translateX(75vw) rotate(5deg); }
  100% { transform: translateX(100vw) rotate(0); opacity: 0; }
}

/*******************contractions*******************/
.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.contraction-option {
  min-width: 80px;
}

/*****************modal de instruccion****************************/
.welcome-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 39, 118, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.welcome-modal.hidden {
  display: none;
}

.welcome-content {
  background: white;
  border-radius: 20px;
  padding: 26px;
  max-width: 520px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.25);
  border-top: 8px solid var(--br-yellow);
}

.welcome-content h2 {
  margin-top: 0;
}

.welcome-content ul {
  list-style: disc;
  padding-left: 22px;
  margin: 14px 0;
}

.welcome-content li {
  margin-bottom: 8px;
}

/*********sombreo de franjas cor brasil*****************/

.mascot-success {
  position: fixed;
  bottom: 40%;
  left: -150px;
  width: 120px;
  z-index: 1000;
  opacity: 1;
  animation: moveMascot 6s ease-in-out forwards;
}

@keyframes moveMascot {
  0%   { transform: translateX(0) rotate(0deg); opacity: 1; }
  25%  { transform: translateX(25vw) rotate(5deg); }
  50%  { transform: translateX(50vw) rotate(-5deg); }
  75%  { transform: translateX(75vw) rotate(5deg); }
  100% { transform: translateX(100vw) rotate(0deg); opacity: 0; }
}



/*************************mobile********************************/
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    text-align: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }
}

/********progress container*********************/
@media (max-width: 600px) {
  .progress-header {
    align-items: flex-start;
  }

  .progress-stats {
    grid-template-columns: 1fr;
  }
}


.verb-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.verb-main-text {
  text-align: left;
}

.verb-progress-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.verb-new .verb-progress-badge {
  background: #eef2f7;
  color: var(--br-muted);
}

.verb-learning .verb-progress-badge {
  background: #e8f3ff;
  color: var(--br-blue);
}

.verb-mastered .verb-progress-badge {
  background: #e8f8ee;
  color: var(--br-green-dark);
}