/* =========================
   RESET + BASE
   ========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body{
  font-family: Arial, sans-serif;
  background:#f5f5f5;
  color:#222;

  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:center;

  padding:2rem 1rem;
  min-height:100vh;
}

/* =========================
   CONTAINERS
   ========================= */
.container{
  max-width:600px;
  width:100%;
  text-align:center;
  margin-top:2rem;
}

.tv-container{
  width:100%;
  max-width:900px;
  margin:0 auto 1rem auto;
  align-self:stretch;
}

h1{
  font-size:2rem;
  margin-bottom:1.5rem;
  color:#222;
  border-bottom:2px solid #ffcc99;
  display:inline-block;
  padding-bottom:.3rem;
}

/* =========================
   MENU
   ========================= */
.menu{
  display:flex;
  flex-direction:column;
  gap:1rem;
  align-items:center;
  width:100%;
}

.dropdown{
  width:100%;
}

/* Botones */
.dropbtn{
  background:#fff;
  color:#222;
  padding:.75rem 1.5rem;
  font-size:1rem;
  border:1px solid #ffcc99;
  border-radius:5px;
  cursor:pointer;

  width:100%;
  text-align:left;
  display:flex;
  align-items:center;
  gap:.5rem;

  transition:background-color .2s ease, color .2s ease;
}

.dropbtn:hover{
  background:#ffe6cc;
  color:#000;
}

/* =========================
   DROPDOWN CONTENT (EN FLUJO NORMAL)
   -> esto hace que empuje el resto hacia abajo
   ========================= */
.dropdown-content{
  display:none;

  background:#fff8f0;
  border:1px solid #ffcc99;
  border-radius:5px;
  box-shadow:0 4px 8px rgba(0,0,0,.08);

  /* CLAVE: NO ABSOLUTE */
  position: static;

  /* separación bajo el botón */
  margin-top:.5rem;

  /* que no recorte nada */
  overflow: visible;
}

.dropdown-content.show{ display:block; }

.dropdown-content a{
  color:#222;
  padding:.75rem 1rem;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:.5rem;
  border-bottom:1px solid #ffd9b3;
}
.dropdown-content a:last-child{ border-bottom:none; }
.dropdown-content a:hover{ background:#ffe6cc; }

/* =========================
   SUBMENÚ (NIVEL 2) TAMBIÉN EN FLUJO
   -> abre debajo y empuja hacia abajo
   ========================= */
.dropdown-content .dropdown{
  margin-top:.5rem;            /* espacio entre items */
}

.dropdown-content .dropdown > .dropdown-content{
  margin-top:.35rem;           /* espacio entre botón de submenú y su lista */
  margin-left:1rem;            /* indentación del subnivel */
  width: calc(100% - 1rem);
}

/* Indentación visual del botón del submenú */
.dropdown .dropdown .dropbtn{
  padding-left:2rem;
  font-size:.95rem;
}

/* Icono */
.dropbtn .icon{
  margin-left:auto;
  font-weight:bold;
  transition:transform .2s;
}

/* =========================
   FOOTER
   ========================= */
.footer{
  text-align:center;
  padding:2rem 1rem;
  font-size:.95rem;
  color:#333;
  border-top:1px solid #ffcc99;
  margin-top:2rem;
}

.footer .article-link{
  display:inline-block;
  margin-top:1rem;
  padding:.5rem 1rem;
  border:1px solid #ffa94d;
  border-radius:6px;
  color:#d35400;
  background:#fff5e6;
  text-decoration:none;
  transition:background-color .2s ease, color .2s ease, border-color .2s;
}

.footer .article-link:hover{
  background:#ffe0b3;
  color:#000;
  border-color:#ff9900;
}

/* =========================
   CONVERTER
   ========================= */
.converter{
  margin-top:80px;
  margin-bottom:40px;
  max-width:400px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
  padding:20px;
  background:#222;
  border-radius:12px;
  box-shadow:0 0 15px rgba(255,165,0,.5), 0 0 5px rgba(255,165,0,.5);
  animation:glowing 2s infinite alternate;
  color:#fff;
}

@keyframes glowing{
  0%{ box-shadow:0 0 10px rgba(255,165,0,.5), 0 0 5px rgba(255,165,0,.5); }
  100%{ box-shadow:0 0 20px rgba(255,165,0,1), 0 0 10px rgba(255,165,0,1); }
}

.converter h2{ text-align:center; color:#ffa500; margin-bottom:20px; }
.converter-field{ margin-bottom:20px; }
.converter-field label{ display:block; margin-bottom:8px; font-size:16px; color:#fff; font-weight:bold; }
.converter-field input{
  width:100%;
  padding:12px;
  font-size:16px;
  border-radius:8px;
  border:none;
  background:#fff;
  color:#111;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.2);
}

.btc-box{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px;
  background:#ffa500;
  color:#111;
  font-weight:bold;
  font-size:18px;
  text-align:center;
  border-radius:8px;
  box-shadow:0 2px 5px rgba(0,0,0,.2);
  transition:background-color .5s ease;
}

.btc-box .btc-icon{ font-size:20px; }
.btc-box.up{ background:#22ab94; }
.btc-box.down{ background:#f7525f; }

.price-info{
  font-size:.9em;
  color:#aaa;
  text-align:center;
  margin-top:10px;
}

/* Responsive */
@media (max-width: 600px){
  .menu, .dropdown, .dropbtn{ width:100%; }
  .converter{ margin-top:40px; padding:16px; }

  /* en móvil, mismo comportamiento (todo en flujo) */
  .dropdown-content .dropdown > .dropdown-content{
    margin-left: .75rem;
    width: calc(100% - .75rem);
  }
}
