:root {
  --color-bg: #fefefe;
  --color-primary: #a3c9f9; 
  --color-secondary: #f9c6d0;
  --color-accent: #b5e6b5;   
  --color-muted: #f0e5f5;    
  --color-text: #333;        
  --color-danger: #efbfbf;
  --color-a: #f45b91;   
  --radius: 1rem;
  --shadow: 0 2px 6px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  font-family: "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

btn-admin
{
 font-size: small;
 text-align: center;
}

btn-tts
{
  font-size: small;
  text-align: center;
}

btn-login
{
  font-size: small;
  text-align: center;
}

btn-register
{
  font-size: small;
  text-align: center;
}

main.app {
  max-width: 900px;
  margin: auto;
  padding: 1rem;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo {
  height: 100px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

h4.chip {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

a {
  text-decoration: none;
}

a.admin-link {
  display: inline-block;
  margin-top: 1rem;
  text-align: center;
  color: var(--color-a);
  text-decoration: none;
  font-weight: bold;
}

button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

button:hover {
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
}

.btn-muted {
  background: var(--color-muted);
}

.btn-danger {
  background: var(--color-danger);
}


.bar {
  background: var(--color-secondary);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.sentence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: white;
  border-radius: var(--radius);
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}


.categories .row,
.addPicto .row,
.tts .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
  align-items: center;
}

select,
input[type="text"],
textarea {
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  flex: 1;
}

.categorySelect{
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 125px;
}


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.tile {
  background: var(--color-primary);
  border-radius: var(--radius);
  padding: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  min-width: 120px;
  min-height: 120px;
  font-size: 1rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tile:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
}

.tile .emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.tile .label {
  font-size: 1rem;
  font-weight: 500;
}


textarea {
  width: 100%;
  min-height: 100px;
  resize: both;
}


footer {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid #eee;
}


@media (max-width: 600px) {
  h1 {
    font-size: 1.4rem;
  }

  button {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .chip { display: none; }
}


.menufloat {
  position: fixed;
  width: 64px;
  height: 64px;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  font-size: 24px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 0;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.menufloat:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.menufloat.rotar45 {
  transform: rotate(45deg) scale(1.1);
  background: linear-gradient(135deg, #ff6b6b, #e74c3c);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.subButton-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.subButton-container.show {
  display: flex;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-admin, .btn-tts, .btn-login, .btn-register, .btn-logout {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.btn-admin {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  animation-delay: 0.1s;
}

.btn-tts {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  animation-delay: 0.2s;
}

.btn-login {
  background: linear-gradient(135deg, #4e61cc, #5c44a0);
  animation-delay: 0.1s;
}

.btn-register{
  background: linear-gradient(135deg, #ead3eb, #d88ce2);
  animation-delay: 0.2s;
}

.btn-logout{
  background: linear-gradient(135deg, #f7a2b7, #e62263);
  animation-delay: 0.2s;
}


.btn-admin:hover, .btn-tts:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.btn-admin:hover {
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.4);
}

.btn-tts:hover {
  box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.btn-login:hover{
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.btn-register:hover
{
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.btn-logout:hover
{
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}


@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Estilos para filtros de categorías */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--color-muted);
  border: 2px solid transparent;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-primary);
  font-weight: bold;
}

/* Estilos para pictogramas con imágenes */
.tile img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.tile span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.2;
}

/* Mensaje cuando no hay pictogramas */
.no-pictogramas {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: #7f8c8d;
  background: #f8f9fa;
  border-radius: var(--radius);
  border: 2px dashed #ddd;
}

.no-pictogramas h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.no-pictogramas p {
  margin: 0;
  font-size: 1rem;
}