@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('utilities.css');

* {
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

html {
  height: 100vh;
  width: 100vw;
  overflow-x: hidden;
}

/* custom scroll bar */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: hsl(96, 40%, 17%);
}

::-webkit-scrollbar-thumb {
  background: hsl(77, 33%, 53%);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: #675;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: sans-serif;
  font-size: 1.5rem;
  text-align: center;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  width: 100%;
  padding-bottom: 150px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 200 200%22><text y=%22.9em%22 font-size=%22100%22 opacity=%220.1%22>💸</text></svg>');
  background-size: 200px 200px;
  background-position: 0 0;
  z-index: -1;
  will-change: transform;
  transform: translateZ(0);
  animation: bgPan 10s linear infinite;
}

@keyframes bgPan {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200px -200px;
  }
}

.index-container {
  height: 100vh;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  grid-gap: 1rem;
  width: 100%;
  padding: 1rem;
  max-width: 100%;
}

.title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--primary-color);
}

.title h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.cv {
  color: var(--secondary-color);
}

.cv h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  cursor: copy;
}

.hoy {
  background: var(--primary-color-light);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid var(--primary-color-dark);
  border-radius: 15px;
  padding: 2rem;
  margin: 1rem 0;
}

.hoy h2 {
  text-shadow: 0 6px 3px #00000050;
  font-size: clamp(3.5rem, 10vw, 7rem);
  cursor: copy;
}

.hoy h3 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.arrow {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  animation: bob 2s infinite ease-in-out;
  user-select: none;
  padding: 0.5rem;
  cursor: pointer;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  aspect-ratio: 1/1;
  opacity: 0.5;
}

@keyframes bob {
  0% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(-5px);
  }
}

.mas-cotizaciones {
  display: flex;
  flex-direction: column;
  height: 90vh;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 1rem;
  max-width: 100%;
}

.btn {
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--primary-color-light);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: white;
  font-weight: bold;
  border: 1px solid var(--primary-color-dark);
  padding: 1rem;
  border-radius: 10px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
}

.btn:hover {
  background: var(--primary-color-hover);
  transform: translateY(-1px);
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--secondary-color);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: bold;
}

.footer a {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.buttons {
  display: grid;
  grid-template-rows: repeat(auto-fit, minmax(50px, 1fr));
  gap: 1rem;
  width: 100%;
  padding: 0 1rem;
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.clickable {
  cursor: pointer;
}

.date {
  font-size: 1rem;
  color: var(--secondary-color);
}

#reload {
  transform: rotate(90deg);
}

input {
  border: none;
  border-radius: 10px;
  padding: 1rem;
  font-size: 1.5rem;
  text-align: center;
  background-color: var(--primary-color);
  color: var(--bg-color);
  font-weight: bold;
  transition: all 0.2s ease;
}

@media screen and (min-width: 850px) {
  body::before {
    background-image: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 300 300%22><text y=%22.9em%22 font-size=%22100%22 opacity=%220.1%22>💸</text></svg>');
    background-size: 200px 200px;
    background-position: 0 0;
    animation: bgPan 10s linear infinite;
  }

  .index-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
  }

  .title h1 {
    font-size: 3rem;
  }

  .cv h2 {
    font-size: 2.5rem;
  }

  .hoy h2 {
    font-size: 5rem;
  }

  .hoy h3 {
    font-size: 2.5rem;
  }

  .mas-cotizaciones {
    height: 95vh;
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
  }

  .buttons {
    max-width: 500px;
    padding: 0;
  }
}

/* Common Layout Components */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  padding-bottom: 150px;
  width: 100%;
  min-height: 100vh;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.grid-container {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

/* Common Card Styles */
.card {
  background: hsla(97, 50%, 87%, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid hsla(97, 50%, 87%, 0.3);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.2s ease;
}

.card:hover {
  background: hsla(97, 50%, 87%, 0.15);
  transform: translateY(-2px);
}

/* Common Typography */
.page-title {
  color: hsl(97, 50%, 87%);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  color: hsl(97, 50%, 87%);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Common Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-control {
  padding: 1rem;
  background: hsla(97, 50%, 87%, 0.1);
  border: 1px solid hsla(97, 50%, 87%, 0.3);
  color: white;
  border-radius: 10px;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn {
  background: hsla(97, 50%, 87%, 0.2);
  color: white;
  border: 1px solid hsla(97, 50%, 87%, 0.3);
  padding: 1rem;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: bold;
}

.btn:hover:not(:disabled) {
  background: hsla(97, 50%, 87%, 0.25);
  transform: translateY(-1px);
}

/* Common Navigation */
.back-button {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 2rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.back-button.visible {
  transform: translateY(0);
}

.back-button button {
  background-color: hsl(97, 50%, 87%);
  color: #40612a;
  font-weight: bold;
  border: none;
  padding: 1rem;
  border-radius: 10px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.3);
}

/* Deprecated: .volver styles are replaced by .back-button */

/* Responsive Utilities */
@media (max-width: 768px) {
  .page-container {
    padding: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 2rem;
  }
}
