/* Retro Toy Store Theme - Tío Manolo Pensando */

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

:root {
  /* Vintage Color Palette */
  --cream: #FDF6E3;
  --paper: #F5ECD7;
  --aged-paper: #EDE0C8;
  --rust-red: #C75B39;
  --rust-orange: #D4763A;
  --vintage-blue: #4A7C8C;
  --vintage-green: #6B8E5A;
  --vintage-yellow: #E8B84A;
  --vintage-brown: #8B6F47;
  --dark-brown: #5D4E37;
  --shadow: rgba(93, 78, 55, 0.2);
  --gold: #C9A227;
}

body {
  font-family: 'Fredoka', sans-serif;
  background: var(--cream);
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 111, 71, 0.02) 2px,
      rgba(139, 111, 71, 0.02) 4px
    );
  min-height: 100vh;
  color: var(--dark-brown);
}

/* Top Banner */
.top-banner {
  background: repeating-linear-gradient(
    45deg,
    var(--rust-red),
    var(--rust-red) 10px,
    var(--rust-orange) 10px,
    var(--rust-orange) 20px
  );
  padding: 8px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Header */
.header {
  background: linear-gradient(180deg, var(--aged-paper) 0%, var(--paper) 100%);
  border-bottom: 4px solid var(--vintage-brown);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  box-shadow: 0 4px 0 var(--shadow);
}

.header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--vintage-brown),
    var(--vintage-brown) 20px,
    transparent 20px,
    transparent 40px
  );
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-badge {
  background: var(--rust-red);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--gold);
  box-shadow: 
    inset 0 -4px 0 rgba(0,0,0,0.2),
    0 4px 8px var(--shadow);
  animation: wobble 3s ease-in-out infinite;
}

.logo-icon {
  font-size: 2.5rem;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.logo-text-container {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: 'Lilita One', cursive;
  font-size: 2.2rem;
  color: var(--rust-red);
  text-shadow: 
    2px 2px 0 var(--vintage-yellow),
    4px 4px 0 rgba(0,0,0,0.1);
  letter-spacing: 1px;
}

.logo-subtitle {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--vintage-blue);
  font-weight: 700;
}

.header-decor {
  display: flex;
  gap: 0.5rem;
}

.decor-star {
  font-size: 1.8rem;
  animation: sparkle 1.5s ease-in-out infinite alternate;
}

.decor-star:nth-child(2) {
  animation-delay: 0.5s;
  font-size: 2rem;
}

.decor-star:nth-child(3) {
  animation-delay: 1s;
}

@keyframes sparkle {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Welcome Banner */
.welcome-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
}

.banner-tape {
  width: 60px;
  height: 25px;
  background: linear-gradient(180deg, rgba(200, 180, 150, 0.9) 0%, rgba(180, 160, 130, 0.9) 100%);
  border-radius: 2px;
}

.banner-tape.left {
  transform: rotate(-3deg);
  margin-right: -15px;
}

.banner-tape.right {
  transform: rotate(3deg);
  margin-left: -15px;
}

.banner-content {
  background: var(--paper);
  border: 3px dashed var(--vintage-brown);
  padding: 1.2rem 2.5rem;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 4px 0 var(--shadow);
}

.banner-content h2 {
  font-family: 'Lilita One', cursive;
  font-size: 1.8rem;
  color: var(--vintage-blue);
  margin-bottom: 0.3rem;
}

.banner-content p {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: var(--vintage-brown);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  font-size: 1.3rem;
  color: var(--vintage-brown);
  background: var(--paper);
  border: 3px dashed var(--vintage-brown);
  border-radius: 8px;
}

.loading-icon {
  display: inline-block;
  animation: bounce 1s ease-in-out infinite;
  margin-left: 0.5rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Video Card */
.video-card {
  background: var(--paper);
  border: 3px solid var(--vintage-brown);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 
    0 6px 0 var(--vintage-brown),
    0 8px 12px var(--shadow);
  position: relative;
}

.video-card::before {
  content: '★';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.9;
  z-index: 5;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 10px 0 var(--vintage-brown),
    0 14px 20px var(--shadow);
}

.video-card:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 var(--vintage-brown),
    0 4px 8px var(--shadow);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--aged-paper);
  border-bottom: 3px solid var(--vintage-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail .play-icon {
  position: absolute;
  font-size: 3rem;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
  transition: transform 0.2s ease;
}

.video-card:hover .play-icon {
  transform: scale(1.2);
}

.video-info {
  padding: 1rem;
  background: linear-gradient(180deg, var(--paper) 0%, var(--aged-paper) 100%);
}

.video-info h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-brown);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.video-info p {
  font-size: 0.85rem;
  color: var(--vintage-brown);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.footer {
  margin-top: 3rem;
  background: var(--aged-paper);
}

.footer-content {
  padding: 1.5rem;
  text-align: center;
  color: var(--vintage-brown);
}

.footer-stamps {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
  font-size: 1.5rem;
}

.footer-border {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust-red),
    var(--rust-red) 20px,
    var(--vintage-yellow) 20px,
    var(--vintage-yellow) 40px,
    var(--vintage-green) 40px,
    var(--vintage-green) 60px,
    var(--vintage-blue) 60px,
    var(--vintage-blue) 80px
  );
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(93, 78, 55, 0.85);
  cursor: pointer;
}

.modal-content {
  background: var(--paper);
  border: 5px solid var(--vintage-brown);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  box-shadow: 
    0 10px 0 var(--vintage-brown),
    0 15px 30px rgba(0,0,0,0.4);
}

.close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: var(--rust-red);
  color: white;
  border: 3px solid var(--dark-brown);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 3px 0 var(--dark-brown);
  font-family: 'Fredoka', sans-serif;
}

.close-btn:hover {
  background: #B54A2E;
  transform: scale(1.1);
}

.close-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--dark-brown);
}

.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 3px dashed var(--vintage-brown);
  background: linear-gradient(180deg, var(--aged-paper) 0%, var(--paper) 100%);
  padding-right: 3.5rem;
}

.video-title {
  font-family: 'Lilita One', cursive;
  font-size: 1.5rem;
  color: var(--rust-red);
  text-shadow: 1px 1px 0 var(--vintage-yellow);
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-container video,
.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Video Controls - Next/Prev Buttons */
.video-controls {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--aged-paper);
  border-bottom: 3px dashed var(--vintage-brown);
  gap: 1rem;
}

.nav-btn {
  flex: 1;
  max-width: 200px;
  background: var(--paper);
  border: 3px solid var(--vintage-brown);
  padding: 0.8rem 1.2rem;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 0 var(--vintage-brown);
  color: var(--dark-brown);
}

.nav-btn:hover:not(:disabled) {
  background: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--vintage-brown);
}

.nav-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--vintage-brown);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.nav-btn span {
  font-size: 0.75rem;
}

.next-btn {
  background: var(--rust-red);
  color: white;
  border-color: #9A4530;
  box-shadow: 0 4px 0 #9A4530;
}

.next-btn:hover:not(:disabled) {
  background: var(--rust-orange);
  box-shadow: 0 6px 0 #9A4530;
}

.video-description {
  padding: 1.2rem 1.5rem;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  text-align: center;
  color: var(--vintage-brown);
  background: var(--paper);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
  background: var(--paper);
  border: 3px dashed var(--vintage-brown);
  border-radius: 8px;
}

.empty-state .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-family: 'Lilita One', cursive;
  font-size: 1.8rem;
  color: var(--vintage-blue);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--vintage-brown);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .logo-badge {
    width: 55px;
    height: 55px;
  }

  .logo-icon {
    font-size: 2rem;
  }

  .banner-tape {
    display: none;
  }

  .banner-content h2 {
    font-size: 1.3rem;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .video-controls {
    flex-direction: column;
  }

  .nav-btn {
    max-width: none;
  }

  .modal-content {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-height: 100vh;
  }

  .video-title {
    font-size: 1.2rem;
    padding-right: 2.5rem;
  }

  .close-btn {
    top: 0.5rem;
    right: 0.5rem;
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }
}
