:root {
  --background-color: linear-gradient(135deg, #0f0f29, #231f59, #1a1a2f);
  --color-text: #f1f1f1;
  --color-enlaces: #007bff;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --color-secondary-bg: rgba(255, 255, 255, 0.08);
  --color-card-bg: rgba(255, 255, 255, 0.02);
}

body[data-theme-type="light-theme"] {
  --color-text: #333333;
  --color-enlaces: #007bff;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

body[data-theme-type="image-theme"] {
  background-color: #000;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  --color-text: #f1f1f1;
  --color-enlaces: #79f7ff;
  --shadow-color: rgba(0, 0, 0, 0.7);
}

body[data-theme-type="image-theme"]::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

body {
  background-image: var(--background-color);
  background-size: 400% 400%;
  color: var(--color-text);
  max-height: 100vh;
  animation: backgroundAnimation 20s ease infinite;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-image 0.8s ease-in-out, color 0.5s;
}

@keyframes backgroundAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.general {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 1400px;
  padding: 2rem;
  margin-top: 5%;
}

a { color: var(--color-text); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--color-enlaces); }

h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

#reloj {
  font-size: 8rem;
  font-weight: 600;
  text-align: center;
  margin-top: 3rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#fecha {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0.8;
}

.search-bar {
  display: flex;
  align-items: center;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px var(--shadow-color);
  background: var(--color-secondary-bg);
}

.search-emoji { 
  padding: 0 10px 0 15px; 
  filter: grayscale(100%) opacity(0.6); 
}

input[type="text"] {
  background: none; border: none; width: 38rem; max-width: 90%;
  color: var(--color-text); font-size: 1.1rem; outline: none;
  padding: 0.6rem 1.2rem 0.6rem 0;
}

.all-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  width: 100%;
  gap: 1.5rem;
  margin-top: 3rem;
}

.links {
  background: var(--color-card-bg);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s;
}

.links:hover { transform: translateY(-5px); }

#menuDegradado {
  position: fixed; top: 20px; right: 20px;
  display: flex; gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#menuDegradado button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  filter: grayscale(100%) brightness(1.5);
  opacity: 0.5;
}

#menuDegradado button:hover {
  filter: grayscale(100%) brightness(2);
  opacity: 1;
  transform: scale(1.1);
}

@media (max-width: 500px) {
  #reloj { font-size: 4rem; }
}