
/* ============================================
   MY UNIVERSE 0.9.1
   WORLD CUSTOMIZATION PAGE
   ============================================ */

#world-customization {
    min-width: 0;
}

#world-customization *,
#world-customization *::before,
#world-customization *::after {
    box-sizing: border-box;
}

.mu-custom-page {
    --mu-accent: #00e5ff;

    display: grid;
    gap: 22px;
    width: 100%;
    min-width: 0;
    color: #f2faff;
    animation: mc-enter .45s ease both;
}

@keyframes mc-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   INTESTAZIONE
   ============================================ */

.mc-heading {
    padding: 16px 0 10px;
}

.mc-heading h1 {
    margin: 12px 0;
    font-size: clamp(36px, 5vw, 66px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
}

.mc-heading h1 span {
    color: var(--mu-accent);
    text-shadow: 0 0 28px rgba(0,229,255,.2);
}

.mc-heading p {
    color: #9fb4cb;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   ANTEPRIMA GRANDE
   ============================================ */

.mc-preview-card {
    padding: 24px;
}

.mc-cover-preview {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: 330px;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border: 1px solid rgba(0,229,255,.25);
    border-radius: 19px;
    padding: 34px;
    background-color: #070f1c;
    background-position: center;
    background-size: cover;
    box-shadow:
        0 15px 40px rgba(0,0,0,.25);
}

.mc-cover-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(2,7,16,.88) 0%,
        rgba(2,7,16,.52) 55%,
        rgba(2,7,16,.15) 100%
    );
}

.mc-cover-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .08;
    background-image:
        linear-gradient(
            var(--mu-accent) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            var(--mu-accent) 1px,
            transparent 1px
        );
    background-size: 44px 44px;
}

.mc-preview-content {
    position: relative;
    z-index: 1;
    max-width: 90%;
}

.mc-preview-content h2 {
    margin: 14px 0;
    font-size: clamp(32px, 4.5vw, 57px);
    font-weight: 900;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
    text-shadow: 0 3px 20px rgba(0,0,0,.65);
}

.mc-preview-content h2 span:first-child {
    margin-right: 10px;
}

.mc-preview-content p {
    margin: 0;
    color: #d0e3f2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ============================================
   SELEZIONE COPERTINE
   ============================================ */

#world-customization .mu-cover-options {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 13px;
}

#world-customization .mu-cover-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 9px;
    background: #0a1627;
    border: 1px solid rgba(0,229,255,.16);
    border-radius: 15px;
    color: #d5e8f6;
    text-align: left;
    cursor: pointer;
    min-width: 0;
    transition:
        transform .2s,
        border-color .2s,
        box-shadow .2s;
}

#world-customization .mu-cover-choice:hover {
    transform: translateY(-3px);
    border-color: var(--mu-accent);
}

#world-customization .mu-cover-choice.mu-cover-selected {
    border-color: var(--mu-accent);
    box-shadow: 0 0 20px rgba(0,229,255,.2);
}

#world-customization .mu-cover-choice-preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 9px;
    background-size: cover;
    background-position: center;
}

#world-customization .mu-cover-choice-label {
    padding: 0 4px 5px;
    font-size: 12px;
    font-weight: 800;
}

/* ============================================
   CARICAMENTO JPG
   ============================================ */

.mc-upload-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 24px;
    border: 1px dashed rgba(0,229,255,.35);
    border-radius: 17px;
    background:
        radial-gradient(
            circle at right,
            rgba(0,102,255,.09),
            transparent 58%
        ),
        #091526;
}

.mc-upload-zone > div {
    flex: 1;
    min-width: 0;
}

.mc-upload-zone strong {
    display: block;
    margin-bottom: 9px;
    font-size: 16px;
    color: #effaff;
}

.mc-upload-zone p {
    margin: 0;
    max-width: 560px;
    color: #9db4c9;
    font-size: 13px;
    line-height: 1.7;
}

#world-customization .mu-cover-file-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    padding: 13px 20px;
    border-radius: 11px;
    background: var(--mu-accent);
    color: #04131d;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: filter .2s;
}

#world-customization .mu-cover-file-button:hover {
    filter: brightness(1.15);
}

#mc-cover-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

#mc-cover-file:focus-visible +
.mu-cover-file-button {
    outline: 2px solid white;
    outline-offset: 3px;
}

.mc-message {
    min-height: 19px;
    margin: 15px 0 0;
    color: var(--mu-accent);
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================
   IDENTITÀ DEL MONDO
   ============================================ */

.mc-identity-form {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 13px 19px;
}

.mc-identity-form label {
    grid-column: 1 / -1;
    color: #b6cddd;
    font-size: 13px;
    font-weight: 800;
}

.mc-identity-form input,
.mc-identity-form select {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding: 14px;
    color: #fff;
    background: #050d19;
    border: 1px solid rgba(0,229,255,.2);
    border-radius: 11px;
    outline: none;
    font: inherit;
    font-size: 14px;
}

.mc-identity-form input:focus,
.mc-identity-form select:focus {
    border-color: var(--mu-accent);
    box-shadow: 0 0 12px rgba(0,229,255,.08);
}

.mc-identity-form .mu-primary-button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 12px;
    min-height: 45px;
}

/* ============================================
   ZONA ELIMINAZIONE
   ============================================ */

.mc-danger-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border-color: rgba(255,100,130,.18);
}

.mc-danger-card h2 {
    margin: 0 0 9px;
    font-size: 18px;
}

.mc-danger-card p {
    margin: 0;
    color: #9bb0c5;
    font-size: 13px;
    line-height: 1.6;
}

.mc-danger-card .mu-danger-button {
    flex-shrink: 0;
    margin: 0;
    padding: 13px 17px;
}

/* ============================================
   RESPONSIVE TABLET
   ============================================ */

@media (max-width: 1000px) {
    #world-customization .mu-cover-options {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .mc-cover-preview {
        min-height: 270px;
    }
}

/* ============================================
   RESPONSIVE SMARTPHONE
   ============================================ */

@media (max-width: 700px) {
    .mu-custom-page {
        gap: 15px;
    }

    .mc-heading {
        padding: 7px 0;
    }

    .mc-heading h1 {
        font-size: clamp(32px, 8vw, 46px);
    }

    .mc-heading p {
        font-size: 13px;
    }

    .mc-preview-card {
        padding: 15px;
    }

    .mc-cover-preview {
        min-height: 250px;
        aspect-ratio: auto;
        padding: 19px;
    }

    .mc-preview-content h2 {
        font-size: 32px;
    }

    #world-customization .mu-cover-options {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .mc-upload-zone {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 18px;
    }

    #world-customization .mu-cover-file-button {
        width: 100%;
    }

    .mc-identity-form {
        grid-template-columns: 1fr;
    }

    .mc-identity-form input,
    .mc-identity-form select {
        font-size: 16px;
    }

    .mc-identity-form .mu-primary-button {
        width: 100%;
    }

    .mc-danger-card {
        flex-direction: column;
        align-items: stretch;
    }

    .mc-danger-card .mu-danger-button {
        width: 100%;
    }
}

/* ============================================
   ACCESSIBILITÀ
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .mu-custom-page {
        animation: none !important;
    }

    #world-customization
    .mu-cover-choice {
        transition: none;
    }
}
