:root {
    --bg: radial-gradient(circle at top, #26304a 0%, #090c16 55%, #030408 100%);
    --surface: rgba(13, 19, 33, 0.8);
    --surface-border: rgba(255, 255, 255, 0.15);
    --text: #f2f5ff;
    --muted: #acb5cd;
    --card-color: #74d4ff;
    --card-bkg-color: rgba(116, 212, 255, 0.1);
}

* {
    box-sizing: border-box;
    font-family: "Zalando Sans Expanded", sans-serif;
}

html,
body {
    min-height: 100%;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-links .btn {
    text-align: center;
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 0.6rem;
    text-decoration: none;
    margin-left: 0.8rem;
    font-size: 0.95rem;
    min-width: 110px;
    color: var(--text);
    border: 1px solid transparent;
}

.nav-links .btn:hover {
    opacity: 0.8;
    outline: #f3f4f6 2px solid;
    animation: bold 0.3s forwards;
}

@keyframes bold {
    0% {
        font-weight: 400;
    }

    100% {
        font-weight: 600;
    }
}

.nav-links .btn:active {
    animation: click 0.5s ease;
}

@keyframes click {
    20% {
        transform: translateY(5px) translateX(5px);
    }
}

.creator-layout {
    width: min(1160px, 100%);
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.6rem;
    align-items: start;
}

.builder-card,
.preview-card-wrap {
    background: var(--card-bkg-color);
    border: 1px solid var(--surface-border);
    border-radius: 1.1rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.builder-card {
    padding: 1.35rem;
}

.builder-card h1 {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.subhead {
    margin: 0.35rem 0 1.25rem;
    color: var(--muted);
    font-size: 0.92rem;
}

#creator-form {
    display: grid;
    gap: 0.8rem;
}

label {
    font-size: 0.9rem;
    color: var(--muted);
}

input,
textarea,
button {
    font: inherit;
}

input[type="text"],
input[type="url"],
textarea,
input[type="file"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(6, 10, 20, 0.8);
    color: var(--text);
    border-radius: 0.65rem;
    padding: 0.72rem 0.82rem;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus,
input[type="file"]:focus {
    outline: 2px solid var(--card-color);
    outline-offset: 2px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input[type="color"] {
    width: 56px;
    height: 36px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--card-color);
    cursor: pointer;
}

.save-btn {
    border: none;
    border-radius: 0.7rem;
    background: var(--card-color);
    color: #04121c;
    font-weight: 700;
    padding: 0.84rem 1rem;
    cursor: pointer;
}

.save-btn:hover {
    filter: brightness(1.05);
}

.form-message {
    min-height: 1.2rem;
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.custom-links-title {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.custom-link-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 0.6rem;
}

.preview-card-wrap {
    padding: 1.35rem;
}

.preview-card-wrap h2 {
    margin: 0 0 0.9rem;
    font-size: 1.1rem;
}

.user-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    min-height: 610px;
    border-radius: 1.2rem;
    border: 2px solid color-mix(in srgb, var(--card-color), white 30%);
    --card-opacity: 1;
    background: rgba(7, 17, 29, var(--card-opacity));
    overflow: hidden;
    position: relative;
    padding: 1.6rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    isolation: isolate;
}

.card-background-image,
.card-background-video,
.card-overlay {
    position: absolute;
    inset: 0;
}

.card-background-image,
.card-background-video,
.card-overlay {
    opacity: var(--card-opacity);
}

.card-background-image,
.card-background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 1.1rem;
}

.card-overlay {
    background: linear-gradient(180deg, rgba(3, 8, 15, 0.2) 0%, rgba(3, 8, 15, 0.72) 75%, rgba(3, 8, 15, 0.9) 100%);
}

.profile-photo-wrap,
.username,
.bio,
.url-preview,
.platform-links {
    position: relative;
    z-index: 1;
}

.profile-photo-wrap {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    padding: 4px;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--card-color), rgba(255, 255, 255, 0.88));
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #141f2f;
}

.username {
    margin: 0.95rem 0 0;
    font-size: 1.25rem;
    text-align: center;
}

.bio {
    margin: 0.45rem 0 0;
    color: #d4d9e8;
    text-align: center;
    max-width: 290px;
}

.url-preview {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: #b7c6ea;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
}

.platform-links {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-inline: 0.1rem;
    align-items: center;
}

.platform-links-row {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
}

.platform-link {
    width: 78px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease;
    justify-self: center;
}

.platform-link img {
    width: 28px;
    height: 28px;
}

.platform-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.22);
}

.platform-link:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 1.3rem;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 980px) {
    .creator-layout {
        grid-template-columns: 1fr;
    }

    .user-card {
        min-height: 580px;
    }
}

@media (max-width: 640px) {
    .nav {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1.2rem 1rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.55rem;
    }

    .nav-links .btn {
        margin-left: 0;
    }

    .creator-layout {
        padding: 0 0.8rem 1.8rem;
    }

    .builder-card,
    .preview-card-wrap {
        padding: 1rem;
    }

    .custom-link-row {
        grid-template-columns: 1fr;
    }

    .user-card {
        min-height: 520px;
        padding: 1.2rem 1rem;
    }

    .platform-link {
        width: 64px;
    }

    .platform-link img {
        width: 24px;
        height: 24px;
    }

    .platform-links {
        flex-wrap: wrap;
    }
}
