/* =========================================================
   AJUSTES PBO
   ESTILO GENERAL
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}


body {
    width: 100%;
    min-height: 100vh;

    overflow-x: hidden;

    font-family: Arial, Helvetica, sans-serif;

    color: #f1f5f2;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(32, 224, 192, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(117, 255, 232, 0.08),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #07130f,
            #0d2119
        );

    background-attachment: fixed;
}


button,
input {
    font: inherit;
}


button {
    border: none;
}


a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {

    --background: #07130f;
    --background-secondary: #0d2119;

    --panel: rgba(25, 52, 41, 0.78);
    --panel-light: rgba(53, 91, 72, 0.48);
    --panel-hover: rgba(65, 113, 91, 0.62);

    --text: #f1f5f2;
    --muted: #aebdb5;

    --line: #d9d9d9;

    --cyan: #20e0c0;
    --cyan-light: #75ffe8;

    --border: rgba(255, 255, 255, 0.08);
}


/* =========================================================
   APLICACIÓN
========================================================= */

.settings-app {
    width: 100%;
    min-height: 100vh;
    padding: 35px;
}


/* =========================================================
   HEADER
========================================================= */

.settings-header {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto 35px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}


.settings-brand {
    margin-bottom: 12px;

    color: var(--cyan-light);

    font-size: 15px;
    font-weight: 700;

    letter-spacing: 2px;
    text-transform: uppercase;
}


.settings-header h1 {
    margin-bottom: 16px;

    font-size: clamp(28px, 4vw, 48px);

    font-weight: 700;
}


.back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.05);

    color: var(--text);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}


.back-home:hover {
    transform: translateY(-2px);

    background: rgba(255, 255, 255, 0.10);

    border-color: rgba(117, 255, 232, 0.35);
}


/* =========================================================
   LAYOUT
========================================================= */

.settings-layout {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: 330px minmax(0, 1fr);

    gap: 28px;

    align-items: start;
}


/* =========================================================
   MENÚ
========================================================= */

.settings-menu {
    position: sticky;
    top: 25px;

    display: flex;
    flex-direction: column;

    gap: 10px;

    padding: 14px;

    border: 1px solid var(--border);
    border-radius: 28px;

    background: rgba(13, 33, 25, 0.78);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.20);
}


.settings-option {
    position: relative;

    width: 100%;
    min-height: 62px;

    display: grid;

    grid-template-columns: 5px 1fr auto;

    align-items: center;

    gap: 14px;

    padding: 0 18px 0 0;

    overflow: hidden;

    cursor: pointer;

    border-radius: 20px;

    background: transparent;

    color: var(--muted);

    text-align: left;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.settings-option:hover {
    background: rgba(255, 255, 255, 0.05);

    color: var(--text);
}


.settings-option.active {
    background: rgba(32, 224, 192, 0.10);

    color: var(--text);
}


.option-bar {
    width: 5px;
    height: 100%;

    background: transparent;

    border-radius: 999px;

    transition: background 0.25s ease;
}


.settings-option.active .option-bar {
    background: var(--cyan);
}


.option-text {
    font-size: 16px;
    font-weight: 600;
}


.option-arrow {
    font-size: 22px;

    opacity: 0.55;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


.settings-option:hover .option-arrow,
.settings-option.active .option-arrow {
    opacity: 1;
}


.settings-option.active .option-arrow {
    transform: translateX(4px);
}


/* =========================================================
   RIPPLE
========================================================= */

.ripple {
    position: absolute;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: rgba(117, 255, 232, 0.25);

    transform: translate(-50%, -50%) scale(0);

    pointer-events: none;

    opacity: 0;
}


.ripple.animate {
    animation: rippleAnimation 0.6s ease-out;
}


@keyframes rippleAnimation {

    0% {
        opacity: 0.65;
        transform: translate(-50%, -50%) scale(0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(25);
    }

}


/* =========================================================
   CONTENIDO
========================================================= */

.settings-content {
    min-width: 0;
}


.settings-section {
    display: none;

    animation: sectionAppear 0.35s ease;
}


.settings-section.active {
    display: block;
}


@keyframes sectionAppear {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   TÍTULOS DE SECCIÓN
========================================================= */

.section-header {
    margin-bottom: 20px;

    text-align: left;
}


.section-header h2 {
    margin-bottom: 8px;

    font-size: clamp(26px, 3vw, 38px);
}


.section-header p {
    color: var(--muted);

    line-height: 1.6;
}


/* =========================================================
   TARJETAS
========================================================= */

.settings-card,
.novedades-card,
.information-card {
    width: 100%;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 28px;

    background: var(--panel);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.18);
}


/* =========================================================
   FILAS
========================================================= */

.setting-row {
    min-height: 95px;

    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;

    gap: 25px;

    align-items: center;

    padding: 22px 25px;

    border-bottom: 1px solid var(--border);
}


.setting-row:last-child {
    border-bottom: none;
}


.setting-info {
    min-width: 0;
}


.setting-info h3 {
    margin-bottom: 7px;

    font-size: 17px;
}


.setting-info p {
    color: var(--muted);

    line-height: 1.55;
}


.locked-value {
    min-width: 130px;

    text-align: right;

    color: var(--cyan-light);

    font-size: 14px;
    font-weight: 700;
}


.setting-row.disabled {
    opacity: 0.75;
}


/* =========================================================
   CUENTA
========================================================= */

.name-control {
    display: flex;

    gap: 10px;
}


.name-control input {
    width: 220px;

    padding: 12px 15px;

    outline: none;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.18);

    color: var(--text);

    transition:
        border-color 0.25s ease,
        background 0.25s ease;
}


.name-control input:focus {
    border-color: rgba(32, 224, 192, 0.55);

    background: rgba(0, 0, 0, 0.28);
}


.name-control button {
    padding: 12px 18px;

    cursor: pointer;

    border-radius: 14px;

    background: var(--cyan);

    color: #06221a;

    font-weight: 800;

    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}


.name-control button:hover {
    transform: translateY(-2px);

    filter: brightness(1.08);
}


/* =========================================================
   BOTONES DE DETALLE
========================================================= */

.detail-button {
    width: 100%;
    min-height: 68px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    cursor: pointer;

    border-bottom: 1px solid var(--border);

    background: transparent;

    color: var(--text);

    font-size: 16px;
    font-weight: 700;

    text-align: left;

    transition:
        background 0.25s ease,
        padding 0.25s ease;
}


.detail-button:last-child {
    border-bottom: none;
}


.detail-button:hover {
    padding-left: 30px;

    background: rgba(255, 255, 255, 0.05);
}


.detail-button span:last-child {
    color: var(--cyan-light);

    font-size: 23px;
}


/* =========================================================
   HISTORIAL
========================================================= */

.novedades-card {
    overflow: hidden;
}


.updates-history {
    position: relative;

    padding: 25px;

    overflow: hidden;

    background:
        linear-gradient(
            rgba(7, 19, 15, 0.66),
            rgba(7, 19, 15, 0.66)
        ),
        url("nube.png")
        center center /
        cover
        no-repeat;
}


.updates-history::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at center,
            rgba(117, 255, 232, 0.06),
            transparent 60%
        );
}


.update-item {
    position: relative;

    width: 100%;

    min-height: 110px;

    display: grid;

    grid-template-columns: 110px minmax(0, 1fr);

    align-items: center;

    gap: 22px;

    margin-bottom: 14px;

    padding: 20px;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;

    background: rgba(25, 52, 41, 0.70);

    color: var(--text);

    text-align: left;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.update-item:last-child {
    margin-bottom: 0;
}


.update-item:hover {
    transform: translateY(-3px);

    background: rgba(65, 113, 91, 0.72);

    border-color: rgba(117, 255, 232, 0.22);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.20);
}


.version-badge {
    min-height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 10px 14px;

    border: 1px solid rgba(117, 255, 232, 0.20);
    border-radius: 16px;

    background: rgba(32, 224, 192, 0.10);

    color: var(--cyan-light);

    font-size: 17px;
    font-weight: 900;

    text-align: center;
}


.update-content {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 7px;
}


.update-content strong {
    font-size: 19px;
}


.update-content > span:last-child {
    color: var(--muted);

    font-size: 14px;
}


.latest-update {
    border-color: rgba(117, 255, 232, 0.32);

    background:
        linear-gradient(
            135deg,
            rgba(32, 224, 192, 0.13),
            rgba(25, 52, 41, 0.72)
        );
}


.update-badge {
    align-self: flex-start;

    padding: 5px 10px;

    border-radius: 999px;

    background: var(--cyan);

    color: #06221a;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}


.updates-toggle {
    background: rgba(255, 255, 255, 0.025);
}


.updates-toggle[aria-expanded="true"] .updates-arrow {
    transform: rotate(90deg);
}


.updates-arrow {
    transition: transform 0.25s ease;
}


/* =========================================================
   INFORMACIÓN
========================================================= */

.information-card {
    padding: 30px;
}


.information-intro {
    margin-bottom: 30px;

    text-align: left;
}


.information-intro h3 {
    margin-bottom: 10px;

    font-size: 24px;
}


.information-intro p {
    color: var(--muted);

    line-height: 1.65;
}


.information-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;
}


.information-grid > div {
    display: flex;

    flex-direction: column;

    gap: 7px;

    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.035);
}


.information-grid span {
    color: var(--muted);

    font-size: 13px;
}


.information-grid strong {
    font-size: 15px;
}


.information-copyright {
    margin-top: 25px;

    padding-top: 20px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;

    text-align: center;
}


/* =========================================================
   PANTALLA DE DETALLE / POPUP
========================================================= */

.detail-screen {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        rgba(3, 10, 7, 0.76);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


.detail-screen.open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


.detail-panel {
    position: relative;

    width: min(100%, 950px);

    max-height: 90vh;

    overflow-y: auto;

    padding: 35px;

    border: 1px solid rgba(117, 255, 232, 0.18);
    border-radius: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(25, 52, 41, 0.96),
            rgba(7, 19, 15, 0.96)
        );

    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.50);

    transform: translateY(25px) scale(0.97);

    transition:
        transform 0.35s ease;
}


.detail-screen.open .detail-panel {
    transform: translateY(0) scale(1);
}


.detail-back {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 25px;

    padding: 11px 18px;

    cursor: pointer;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.05);

    color: var(--text);

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}


.detail-back:hover {
    transform: translateX(-3px);

    background: rgba(255, 255, 255, 0.10);
}


.detail-version {
    margin-bottom: 8px;

    color: var(--cyan-light);

    font-size: 15px;
    font-weight: 900;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.detail-panel h2 {
    margin-bottom: 25px;

    font-size: clamp(27px, 4vw, 42px);

    line-height: 1.15;
}


.detail-text {
    color: #e4ebe7;

    font-size: 16px;

    line-height: 1.75;
}


.detail-text p {
    margin-bottom: 20px;
}


.detail-text h3 {
    margin: 30px 0 12px;

    color: var(--cyan-light);

    font-size: 20px;
}


.detail-text ul {
    margin: 0 0 22px 22px;
}


.detail-text li {
    margin-bottom: 9px;
}


.detail-note {
    margin-top: 25px;

    padding: 18px 20px;

    border-left: 3px solid var(--cyan);

    border-radius: 0 15px 15px 0;

    background: rgba(32, 224, 192, 0.07);

    color: var(--muted);
}


/* =========================================================
   SCROLLBAR POPUP
========================================================= */

.detail-panel::-webkit-scrollbar {
    width: 8px;
}


.detail-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);

    border-radius: 10px;
}


.detail-panel::-webkit-scrollbar-thumb {
    background: rgba(117, 255, 232, 0.25);

    border-radius: 10px;
}


/* =========================================================
   MENSAJE DE GUARDADO
========================================================= */

.save-message {
    position: fixed;

    right: 25px;
    bottom: 25px;

    z-index: 10000;

    padding: 14px 20px;

    border: 1px solid rgba(117, 255, 232, 0.20);
    border-radius: 16px;

    background: rgba(13, 33, 25, 0.94);

    color: var(--text);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.30);

    opacity: 0;

    transform: translateY(15px);

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


.save-message.show {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .settings-app {
        padding: 25px;
    }


    .settings-layout {
        grid-template-columns: 1fr;
    }


    .settings-menu {
        position: relative;
        top: auto;

        flex-direction: row;

        overflow-x: auto;

        padding: 10px;

        border-radius: 22px;
    }


    .settings-option {
        flex: 0 0 auto;

        width: auto;

        min-width: 180px;

        grid-template-columns: 5px 1fr auto;
    }


    .settings-content {
        width: 100%;
    }

}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 600px) {

    .settings-app {
        padding: 17px;
    }


    .settings-header {
        margin-bottom: 25px;
    }


    .settings-brand {
        font-size: 12px;
    }


    .settings-header h1 {
        font-size: 27px;
    }


    .back-home {
        padding: 10px 16px;

        font-size: 14px;
    }


    .settings-menu {
        gap: 8px;

        border-radius: 20px;
    }


    .settings-option {
        min-width: 155px;

        min-height: 56px;

        border-radius: 17px;
    }


    .option-text {
        font-size: 14px;
    }


    .option-arrow {
        font-size: 19px;
    }


    .section-header h2 {
        font-size: 27px;
    }


    .section-header p {
        font-size: 14px;
    }


    .settings-card,
    .novedades-card,
    .information-card {
        border-radius: 22px;
    }


    .setting-row {
        grid-template-columns: 1fr;

        gap: 14px;

        padding: 20px;
    }


    .locked-value {
        min-width: 0;

        text-align: left;
    }


    .name-control {
        width: 100%;

        flex-direction: column;
    }


    .name-control input,
    .name-control button {
        width: 100%;
    }


    .updates-history {
        padding: 15px;
    }


    .update-item {
        grid-template-columns: 1fr;

        gap: 14px;

        padding: 17px;

        border-radius: 18px;
    }


    .version-badge {
        width: 100%;

        min-height: 45px;
    }


    .update-content strong {
        font-size: 17px;
    }


    .information-card {
        padding: 20px;
    }


    .information-grid {
        grid-template-columns: 1fr;
    }


    .detail-screen {
        padding: 12px;
    }


    .detail-panel {
        max-height: 94vh;

        padding: 24px 20px;

        border-radius: 24px;
    }


    .detail-panel h2 {
        font-size: 28px;
    }


    .detail-text {
        font-size: 15px;

        line-height: 1.7;
    }


    .save-message {
        right: 15px;
        bottom: 15px;
        left: 15px;

        text-align: center;
    }

}


/* =========================================================
   REDUCIR MOVIMIENTO
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}