better css and responsiveness

This commit is contained in:
2026-01-07 20:05:32 +01:00
parent 6387d4a373
commit f4eb96c4ec
13 changed files with 537 additions and 131 deletions

View File

@@ -9,9 +9,9 @@
justify-content: space-between;
padding: 0 3rem;
background: linear-gradient(
to bottom,
rgba(9, 9, 11, 0.9) 0%,
rgba(9, 9, 11, 0) 100%
to bottom,
rgba(9, 9, 11, 0.9) 0%,
rgba(9, 9, 11, 0) 100%
);
transition: background 0.3s;
}
@@ -216,8 +216,8 @@
display: none;
flex-direction: column;
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.6),
0 0 0 1px rgba(139, 92, 246, 0.1);
0 20px 40px rgba(0, 0, 0, 0.6),
0 0 0 1px rgba(139, 92, 246, 0.1);
z-index: 9999;
overflow: hidden;
animation: dropdownSlide 0.2s ease-out;
@@ -423,104 +423,176 @@
border-radius: 3px;
}
.mobile-menu-toggle {
display: none;
justify-content: center;
align-items: center;
width: 44px;
height: 44px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
color: white;
z-index: 2001;
cursor: pointer;
transition: all 0.2s;
}
@media (max-width: 768px) {
.navbar {
padding: 0 1rem;
height: 60px;
gap: 0.5rem;
z-index: 1002;
background: rgba(9, 9, 11, 0.95);
height: 70px;
padding: 0 1.5rem;
background: rgba(9, 9, 11, 0.8);
backdrop-filter: blur(15px);
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-brand {
min-width: auto;
font-size: 0;
}
.nav-brand span { display: none; }
.brand-icon { width: 40px; height: 40px; }
.brand-icon {
width: 32px;
height: 32px;
}
.search-wrapper {
flex: 1;
width: auto;
}
.search-input {
padding: 0.5rem 1rem 0.5rem 2.2rem;
font-size: 0.9rem;
}
.search-icon {
left: 10px;
}
#nav-avatar {
width: 32px;
height: 32px;
.mobile-menu-toggle {
display: flex;
}
.mobile-menu-toggle:active { transform: scale(0.95); }
.nav-center {
position: absolute;
top: 60px;
left: 0;
right: 0;
display: flex;
background: rgba(9, 9, 11, 0.98);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
padding: 0.5rem 1rem;
overflow-x: auto;
white-space: nowrap;
justify-content: flex-start;
gap: 0.5rem;
-ms-overflow-style: none;
scrollbar-width: none;
z-index: 1001;
position: fixed;
top: 0;
right: -100%;
width: 85%;
max-width: 320px;
height: 100vh;
border-radius: 0;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
background: linear-gradient(160deg, rgba(20, 20, 25, 0.98) 0%, rgba(10, 10, 12, 0.99) 100%);
box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
border-left: 1px solid rgba(255, 255, 255, 0.08);
display: flex;
flex-direction: column;
justify-content: center;
padding: 2rem;
gap: 1rem;
z-index: 2000;
transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-center::-webkit-scrollbar {
display: none;
.nav-center.open {
right: 0;
}
.nav-button {
flex-shrink: 0;
padding: 0.4rem 1rem;
font-size: 0.85rem;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 1.2rem 1.5rem;
font-size: 1.2rem;
font-weight: 700;
letter-spacing: 0.5px;
color: rgba(255, 255, 255, 0.6);
text-transform: uppercase;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.03);
border-radius: 16px;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
opacity: 0;
transform: translateX(20px);
}
.nav-button:hover {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.05);
color: white;
padding-left: 2rem;
}
.nav-button.active {
background: var(--color-primary);
border-color: var(--color-primary);
background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, transparent 100%);
border-color: rgba(139, 92, 246, 0.4);
color: white;
box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
opacity: 1;
transform: translateX(0);
}
.search-results {
position: fixed;
top: 110px;
.nav-center.open .nav-button {
opacity: 1;
transform: translateX(0);
}
.nav-button.active::before {
content: '';
position: absolute;
left: 0;
right: 0;
width: 100vw;
border-radius: 0;
max-height: calc(100vh - 120px);
height: 50%;
width: 3px;
background: #8b5cf6;
border-radius: 0 4px 4px 0;
box-shadow: 0 0 10px #8b5cf6;
}
.nav-dropdown {
position: fixed;
top: 70px;
right: 1rem;
left: 1rem;
width: auto;
min-width: auto;
z-index: 9999;
.search-wrapper {
margin-left: 10px;
margin-right: auto;
width: 40px;
height: 40px;
display: flex;
align-items: center;
position: relative;
cursor: pointer;
}
.search-input {
opacity: 0;
width: 0;
padding: 0;
pointer-events: none; /* No clickable cuando está oculto */
position: absolute;
left: 0;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 2005;
}
/* Estado expandido al tocar */
.search-wrapper:focus-within {
width: 220px; /* Ancho suficiente para escribir */
}
.search-wrapper:focus-within .search-input {
opacity: 1;
width: 220px;
padding: 0.6rem 1rem 0.6rem 2.5rem;
background: #18181b;
border: 1px solid var(--color-primary);
border-radius: 99px;
pointer-events: auto; /* Permitir escritura */
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.search-wrapper.active-mobile .search-input {
opacity: 1;
width: 220px;
padding: 0.6rem 1rem 0.6rem 2.5rem;
background: #18181b;
pointer-events: auto;
}
/* Aseguramos que el icono siempre esté arriba del input expandido */
.search-icon {
z-index: 2006;
}
/* Evitar que el menú lateral tape el buscador si ambos intentan estar abiertos */
.nav-center.open {
z-index: 1999;
}
}