
/* -------------------------------------------------------------------------- */
/* Variables globales (para color) */
/* -------------------------------------------------------------------------- */

:root {
    --col1a: #fff59c;
    --col2a: #FFE88E;
    --col3a: #FFDB80;
    --col4a: #ffce72;
    --col5a: #554129;
    --test: #FF00FF;
}


/* -------------------------------------------------------------------------- */
/* Configuración global de elementos individuales */
/* -------------------------------------------------------------------------- */

/* Desactivar formato por defecto de los enlaces (quitar subrayado y color azul) */

a {
    color: inherit;
    text-decoration: none;
}

/* Estilo por defecto de párrafos */

p {
    line-height: 1.5;
    margin-bottom: 1.5em;
}

/* Headers (cabeceras) */

h1 {
    font-family: "Special Gothic Expanded One", sans-serif;
    text-align: center;
    font-size: 32px;
    font-weight: 900;
}

/* Elementos de formulario */

.formflex {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.separate {
    display: flex;
    flex-direction: column;
    gap: 0;
}

a.btn, label.btn, button:not(.interactbtn):not(.followbtn):not(.dropdown-item):not(.modal-close-btn):not(.menubtn) {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 18px;
    background-image:linear-gradient(to bottom, var(--col2a), var(--col4a));
    color: #000000;
    width: 100%;
    max-width: 540px;
    padding: 0.5em 0;
    margin: 0 auto;
    margin-bottom: 1em;
    border: 3px solid var(--col5a);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

label {
    font-family: "Special Gothic Expanded One", sans-serif;
    text-align: center;
    font-size: 24px;
    margin-bottom: 0.6em;
}

label:has(input[type="radio"]) {
    font-size: 18px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    max-width: 540px;
    height: 35px;
    margin-bottom: 1.5em;
    box-sizing: border-box;
    text-align: center;
    border: 3px solid var(--col5a);
    border-radius: 20px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 24px;
    height: 24px;
    margin-bottom: 1em;
    accent-color: var(--col4a);
}

select {
    /* ya te vale, safari */
    -webkit-appearance: none;
    -webkit-text-fill-color: black;

    padding: 10px;
    background-image: linear-gradient(to bottom, var(--col2a), var(--col4a));
    border: 3px solid var(--col5a);
    border-radius: 10px;
}

textarea {
    resize: none;
    margin-bottom: 1em;
    padding: 1em;
    width: 100%;
    max-width: 540px;
    border: 3px solid var(--col5a);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.smalltxt {
    color: #606060;
    margin-top: -1em;
    margin-bottom: 1.5em;
}


/* -------------------------------------------------------------------------- */
/* Secciones HTML - html/body (todo el documento) */
/* -------------------------------------------------------------------------- */

/* Fuente por defecto: Ubuntu o sans-serif */

* {
    box-sizing: border-box;
    font-family: Ubuntu, sans-serif;
    text-decoration: none;
}

body {
    background-color: var(--col4a);
    background-size: 192px;
    margin: 0;
}

div.content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1080px;
    margin: 0 auto;
}


/* -------------------------------------------------------------------------- */
/* Secciones HTML - header (cabecera, parte superior) */
/* -------------------------------------------------------------------------- */

header {
    display: flex;
    justify-content: flex-end;
    position: fixed;
    align-items: center;
    max-width: 1080px;
    height: 90px;
    margin: 0 auto;
    padding: 0;
    padding-right: 10px;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--col1a);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    gap: 10px;
    z-index: 999;
}

.leftalign {
    margin-right: auto;
}

img.main {
    display: block;
    height: 90px;
    margin-right: auto;
}

img.compact {
    display: none;
    height: 70px;
    margin-right: -140px;
}

a.menubtn, button.menubtn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 0 12px;
    font-size: 16px;
    background-color: var(--col1a);
    border: 3px solid var(--col5a);
    border-radius: 15px;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    gap: 8px;
    cursor: pointer;
}

a.menubtn:hover, button.menubtn:hover {
    background-color: var(--col3a);
}

img.icon {
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Secciones HTML - main (sección principal) */
/* -------------------------------------------------------------------------- */

main {
    flex-grow: 1;
    background-image: url(/media/bgtile.png);
    padding: 1.5em;
    padding-top: 120px;
}

main.center {
    text-align: center;
}

.banner {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

/* Feed de publicaciones */

div.sortmenu {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #000000;
    text-decoration: none;
    gap: 12px;
}

div.sortmenu > label {
    margin-top: 12px;
}

img.avatar, a.avatar > img {
    width: 70px;
    height: 70px;
    border-radius: 15%;
    object-fit: cover;
}

div.postfeed {
    display: flex;
    padding: 15px;
    margin-bottom: 20px;
    gap: 20px;
    background-color: var(--col2a);
    border: 3px solid var(--col5a);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

div.postbody {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-right: auto;
}

.userinfo {
    display: flex;
    align-items: center;
}

div.interact {
    display: flex;
    margin-top: auto;
    gap: 15px;
}

.interactbtn {
    display: flex;
    align-items: center;
    padding: 3px 12px;
    background-color: var(--col1a);
    border: 2px solid var(--col5a);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    gap: 8px;
    cursor: pointer;
}

.interactbtn > img {
    width: 30px;
}

.interactbtn > span {
    font-size: 20px;
    color: #000000;
}

.musicinfo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 170px;
}

.musicinfo img {
    width: 120px;
    margin: 15px;
}

.musicinfo span {
    display: flex;
    flex-direction: column;
    text-align: center;
}

div.pages {
    display: flex;
    font-size: 16px;
    width: 100%;
    padding: 1em;
    align-items: center;
    justify-content: center;
    background-color: var(--col3a);
    border: 3px solid var(--col5a);
    border-radius: 99px;
}

/* -------------------------------------------------------------------------- */
/* Página de nueva publicación */
/* -------------------------------------------------------------------------- */

form.search {
    display: flex;
    flex-direction: column;
    max-width: 850px;
    padding: 20px;
    margin: 0 auto;
    margin-bottom: 20px;
    border: 6px solid var(--col5a);
    border-radius: 20px;
    align-items: center;
    gap: 20px;
    background-color: var(--col2a);
}

form.search > button {
    width: 250px;
    height: 30px;
    align-self: center;
}

div.albumquery {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1em;
    justify-content: center;
    gap: 10px;
}

div.musicitem {
    width: 250px;
    padding: 10px;
    background-color: var(--col3a);
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
}

/* Línea horizontal ondulada (wavy) */

.wavy {
    height: 15px;
    background: url(/media/wavy.svg);
    background-size: 150px 15px;
    animation: wavemov 8s linear infinite;
    color: var(--col4a);
}

main > .wavy {
    width: calc(100% + 3em);
    margin: 0 -1.5em;
    margin-top: 1em;
    margin-bottom: 1em;
}

@keyframes wavemov {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: 150px;
  }
}


/* -------------------------------------------------------------------------- */
/* Página de usuario
/* -------------------------------------------------------------------------- */

.profile {
    display: flex;
    padding: 20px;
    background-color: rgba(220, 167, 69, 0.3);
    border: 3px solid var(--col5a);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.profileinfo {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-left: 20px;
}

.followflex {
    display: flex;
    gap: 8px;
    margin: 5px 0;
}

.followbtn {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 14px;
    color: black;
    background-image: linear-gradient(to bottom, var(--col2a), var(--col4a));
    padding: 8px 12px;
    border: 2px solid var(--col5a);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    gap: 6px;
}

.reposttag {
    display: flex;
    align-items: center;
    gap: 5px;
    color: gray;
    font-size: 0.85em;
    margin-bottom: 10px;
}

img.avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 15%;
    object-fit: cover;
}


/* -------------------------------------------------------------------------- */
/* Página de seguidores/siguiendo
/* -------------------------------------------------------------------------- */

div.userlist {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

a.userelem {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background-image:linear-gradient(to bottom, var(--col2a), var(--col4a));
    border: 3px solid var(--col5a);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}


/* -------------------------------------------------------------------------- */
/* Menú DESPLEGABLE
/* -------------------------------------------------------------------------- */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    margin-top: 10px;
    right: 0;
    padding: 0;
    background-color: rgba(255, 245, 156, 0.3);
    border: 2px solid var(--col5a);
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    min-width: 150px;
    z-index: 10;
    object-fit: cover;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    text-align: left;
    padding: 0.5em;
    background: none;
    border: none;
    border-bottom: 1px solid #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-decoration: none;
}

.dropdown-item img {
    width: 30px;
}

.dropdown-item:hover {
    background-color: rgba(0,0,0,0.2);
    object-fit: cover;
}

.dropdown-item:last-child {
    border-bottom: none;
}


/* -------------------------------------------------------------------------- */
/* Ventana MODAL (primer inicio de sesión)
/* -------------------------------------------------------------------------- */

/* Overlay de atenuación del fondo */
.modal-overlay {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 150px 0 50px 0;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Activar la animación fade-in/fade-out */
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* El contenedor pop-up en sí */
.modal-content {
    background: var(--col1a);
    width: 90%;
    max-width: 900px;
    height: fit-content;
    padding: 20px;
    border: 3px solid var(--col5a);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
}

/* Botón de cerrar */
.modal-close-btn {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #a62d2d;
    color: #FFFFFF;
    border: 3px solid #404040;
    border-radius: 8px;
    padding: 5px 15px;
    font-weight: 600;
    cursor: pointer;
}


/* -------------------------------------------------------------------------- */
/* Sistema RESPONSIVO
/* -------------------------------------------------------------------------- */

.searchbar {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 540px;
    margin-bottom: 15px;
    gap: 10px;
}

.searchbar input {
    margin-top: 18px;
}


/* -------------------------------------------------------------------------- */
/* Sistema RESPONSIVO
/* -------------------------------------------------------------------------- */

@media only screen and (max-width: 1000px) {

    header, img.main, img.compact {
        height: 70px;
    }

    main {
        padding-top: 100px;
    }

    a.menubtn, button.menubtn {
        height: 50px;
        padding: 0 10px;
        font-size: 14px;
        border-radius: 15px;
    }

    img.icon {
        width: 38px;
        height: 38px;
    }
    
}

@media only screen and (max-width: 850px) {

    .label {
        display: none;
    }

    div.interact {
        gap: 7px;
    }

    .interactbtn {
        padding: 3px 8px;
        gap: 5px;
    }

    .interactbtn > img {
        width: 24px;
    }

    .interactbtn > span {
        font-size: 18px;
    }

}

@media only screen and (max-width: 640px) {

    div.postfeed {
        flex-direction: column;
        align-items: left;
    }

    .musicinfo {
        flex-direction: row;
        width: 100%;
    }

    .musicinfo img {
        width: 100px;
        margin: 10px;
        margin-left: 0;
    }

    .musicinfo span {
        text-align: left;
    }

    .profile {
        flex-direction: column;
    }

    .profileinfo {
        padding-left: 0;
    }
}

@media only screen and (max-width: 540px) {

    img.main { display: none; }
    img.compact { display: block; }

    a.menubtn, button.menubtn {
        height: 50px;
        padding: 0 10px;
    }

    img.icon {
        width: 32px;
        height: 32px;
    }

    h1 {
        font-size: 26px;
    }

    label {
        font-size: 20px;
    }

}

/* Reglas específicas para el iPhone SE (1ª generación) */
/* "Pero alex, ya nadie usa teléfonos tan pequeños!" */
/* ... */

@media only screen and (max-width: 358px) {

    header {
        height: 70px;
        padding: 18px; /* No es ideal, pero no sé por qué no centra */
    }

    img.main { display: none; }
    img.compact { display: none; }

    div.sortmenu {
        flex-direction: column;
    }
    
}