* {
    margin: auto;
    box-sizing: border-box;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #e8eef3 0%, #f5f7fa 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(20px);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgb(46, 46, 46);
    transition: all 0.3s ease-in-out;
    max-width: 800px;
    margin: 0 auto;
}

.navbar .nav-wrapper {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.navbar a.nav-link {
    color: rgb(53, 53, 53);
    padding: 12px 18px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.navbar i {
    font-size: 20px;
}

.navbar a.nav-link.logout {
    background: #3a3a3a;
    color: white;
    padding: 12px;
}

.navbar a.nav-link.logout:hover {
    background: #3a3a3a00;
    color: black;
}

.navbar a.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 0;
}

.navbar a.nav-link:hover::before {
    transform: scaleX(1);
}

.navbar a.nav-link:hover {
    color: #4d4d4d;
    background: rgba(0, 123, 255, 0.2);
}

.navbar a.nav-link.active {
    background: rgba(0, 123, 255, 0.6);
    color: rgb(53, 53, 53);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

h1 {
    color: rgba(45, 55, 72, 0.9);
    margin-top: 2rem;
    font-weight: 700;
    font-size: 2.8rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
    padding: 10px;
    animation: fadeInUp 0.6s ease-out;
}

h2 {
    padding-bottom: 1rem;
}

h3 {
    padding-bottom: 1rem;
}

#uploadForm,
#loginSection {
    /* background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border-radius: 26px; */
    padding: 2.5rem;
    /* border-top: 2px solid black; */
    max-width: 800px;
    width: 100%;
    margin: 2rem 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    animation: slideIn 0.5s ease-out;
}

#uploadForm input {
    font-size: 24px;
    margin-bottom: 40px;
}

#imageFile {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1.8rem;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08),
        inset 2px 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #2d3748;
    font-size: 1.1rem;
    outline: none;
}

#imageFile:focus {
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
        inset 3px 3px 6px rgba(255, 255, 255, 0.4);
    transform: scale(1.02);
}

/* .formBtn {
    background:rgba(84, 158, 242, 0.95);
    backdrop-filter: blur(6px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.formBtn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15),
        inset 2px 2px 4px rgba(255, 255, 255, 0.3);
}

.formBtn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0),
        inset 2px 2px 4px rgba(255, 255, 255, 0);
} */

#previewContainer {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    margin: 2rem 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
    /* box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.08); */
    animation: fadeIn 0.6s ease-out;
}

#previewContainer img {
    max-height: 220px;
    width: auto;
    border-radius: 12px;
    margin: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#previewContainer img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkbox-wrapper {
    position: relative;
    padding-left: 2.5rem;
    font-size: 1.05rem;
    color: #2d3748;
    user-select: none;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox {
    position: absolute;
    left: 0;
    height: 1.4rem;
    width: 1.4rem;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: 0.2s ease;
}

.checkbox-wrapper input:checked~.custom-checkbox {
    background: linear-gradient(135deg, #4a90e2, #549ef2);
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 0 0 4px white;
}

.small-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 20, 82, 0.9);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.loader-overlay svg {
    max-width: 200px;
    height: auto;
}

.svg-stroke {
    /* first number = dash length, second = gap length */
    stroke-dasharray: 2500 2500;
    stroke-dashoffset: 2500;
    animation: stroke-draw-erase 6s ease-in-out infinite;
    fill: none;
}

@keyframes stroke-draw-erase {
    0% {
        stroke-dashoffset: 2500;
    }

    /* fully hidden */
    50% {
        stroke-dashoffset: 0;
    }

    /* fully drawn */
    100% {
        stroke-dashoffset: -2500;
    }

    /* dash has moved off the path, so gap shows */
}


.stop-scrolling {
    height: 100%;
    overflow: hidden;
}

.loader {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(62, 116, 252, 0.9);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15),
        inset 4px 4px 12px rgba(0, 0, 0, 0.1),
        inset -4px -4px 12px rgba(255, 255, 255, 0.2);
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-text {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 1px;
}

.loader-text span {
    color: #3E74FC;
    font-weight: bold;
    background-color: white;
    padding: 2px 6px;
    border-radius: 8px;
    margin: 0 2px;
}

hr {
    height: 2px;
    border: none;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.6) 50%,
            transparent 100%);
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#profileContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 1000;
}

#profilePic {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc;
}

.bento-row {
    display: flex;
    gap: 8px;
    width: 70%;
    margin-top: 30px;
}

.bento-box {
    flex: 1;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;
    padding: 4px;
}

.profile-config {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-config .preferences input {
    background: none;
    border: none;
    text-align: left;
    width: 90%;
    height: 40%;
    padding: 4px;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    transition: all 0.5s ease-in-out;
}

.profile-config .preferences input:focus,
.profile-config .preferences input:hover {
    border-bottom: black 4px solid;
    outline: none;
    box-shadow: none;
}

.profile-config .preferences input::placeholder {
    color: #888;
    opacity: 0.5;
}

.color-select {
    background: none;
    border: none;
    text-align: left;
    width: 90%;
    height: 40%;
    padding: 8px;
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 20px;
    transition: all 0.5s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-color: transparent;
    color: var(--selected-colour, black);
}

.color-select:focus {
    outline: none;
}

.color-select:hover {
    border-bottom: black 4px solid;
}

.profile-box {
    flex: 0 0 auto;
    margin-right: 16px;
}

.form-box {
    flex: 1;
}

.profile-box #profilePic {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ccc;
    margin-left: 0;
    margin-right: auto;
}

/* New sections layout */
.top-section,
.bottom-section {
    width: 80%;
    /* margin: 0 auto; */
    box-sizing: border-box;
}

.top-section {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 10px;
    margin-bottom: 20px;
}

input:focus {
    outline: none;
    box-shadow: none;
}

.bottom-section {
    padding: 0 10px;
    width: 80%;
    display: flex;
    justify-content: center;
    margin-top: -30px;
}

#profileSection {
    width: 100%;
    border-radius: 12px;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.dataForm {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dataForm h3 {
    font-size: 48px;
    font-weight: 700;
    margin: 10px 0 0;
}

.dataForm input {
    background: none;
    border: none;
    padding: 12px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.dataForm input:focus,
.dataForm input:hover {
    border: none;
}

.dataForm input::placeholder {
    color: #888;
    opacity: 0.6;
}

.inputWithIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    border-bottom: rgba(0, 0, 0, 0.250) 2px solid;
    padding: 10px;
    transition: all 0.3s ease-in-out;
}

.inputWithIcon:has(input:focus),
.inputWithIcon:has(input:hover) {
    border-bottom: black 4px solid;
}

.inputWithIcon i {
    font-size: 26px;
    min-width: 24px;
    color: #333;
    margin-top: 14px;
}

/* .formBtn {
    background-color: black;
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 14px;
    border: none;
    border-radius: 16px;
    margin-top: 25px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.formBtn:hover {
    color: black;
    background-color: #f5f7fa;
    border: 2px solid black;
} */

input {
    background: none;
    border: none;
    border-bottom: 2px solid rgba(0, 0, 0, 0.100);
    padding: 12px;
    font-size: 22px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

input:focus,
input:hover {
    border-bottom: 4px solid black;
    outline: none;
}

button {
    background-color: black;
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 14px;
    border: none;
    border-radius: 16px;
    margin-top: 25px;
    cursor: pointer;
    width: 100%;
    border: 2px solid rgba(0, 0, 0, 0);
    transition: all 0.3s ease-in-out;
}

button:hover {
    color: black;
    background-color: #f5f7fa;
    border: 2px solid black;
}

/* Artist input fields */
.artists-box {
    margin-bottom: 40px;
}

.artists-box.multiple-artists {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 15px;
}

.artist-input-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.artist-input-wrapper:last-of-type {
    margin-bottom: 0;
}

.artists-box:not(.multiple-artists) .artist-input-wrapper {
    margin-bottom: 0;
}

.artist-input {
    flex: 1;
    margin-bottom: 0;
}

.remove-artist-btn {
    background-color: #ff3b30;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: auto;
    margin-top: 12px;
    margin-bottom: 0;
    min-width: 44px;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

.remove-artist-btn:hover {
    background-color: #ff2d20;
    color: white;
    border: 2px solid #ff2d20;
}

.add-artist-btn {
    background-color: #34c759;
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: auto;
    margin-top: 0;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease-in-out;
}

/* In single artist mode, show plus button inline with input */
.artists-box:not(.multiple-artists) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.artists-box:not(.multiple-artists) #artistsContainer {
    flex: 1;
}

.artists-box:not(.multiple-artists) .add-artist-btn {
    margin-top: 12px;
    flex-shrink: 0;
}

.add-artist-btn:hover {
    background-color: #30d158;
    color: white;
    border: 2px solid #30d158;
}

.chips-wrapper {
    position: relative;
    max-width: 700px;
    margin-bottom: 40px;
}

.chips-container {
    width: 100%;
    /* max-width: 700px; */
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 12px 14px;
    gap: 8px;
    border-radius: 46px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.chips-container::-webkit-scrollbar {
    display: none;
}

.chip {
    font-size: 1rem;
    font-weight: 400;
    padding: 10px 14px;
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid rgba(0, 123, 255, 0.2);
    transition: all 0.4s;
    flex-shrink: 0;
    white-space: nowrap;
}

.chip.selected {
    background: rgba(0, 123, 255, 0.6);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: black;
    z-index: 10;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.left-btn {
    left: -15px;
}

.right-btn {
    right: -15px;
}

.scroll-btn i {
    pointer-events: none;
}

/* Easter eggs */
.flying-svg {
    position: fixed;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.2));
}

.flying-svg svg {
    width: 60px;
    height: 64px;
}

.flying-svg .svg-stroke {
    stroke-dasharray: none;
    animation: none;
    stroke: white;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Profile Page */
@media (max-width: 768px) {
    .bento-row {
        flex-direction: column;
        width: 100%;
    }

    .bento-box {
        width: 100%;
    }

    .bottom-section,
    .top-section {
        width: 95%;
        padding: 0 8px;
    }

    .profile-box {
        margin: 0 auto 20px;
        text-align: center;
    }

    .profile-box #profilePic {
        margin: 0 auto;
    }

    .dataForm h3 {
        font-size: 36px;
    }

    .color-select,
    .profile-config .preferences input {
        font-size: 32px;
    }

    .chips-container {
        flex-wrap: wrap;
        overflow-x: hidden;
        padding: 12px;
        gap: 10px;
        border-radius: 26px;
    }

    .chip {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

/* Upload Page */
@media (max-width: 768px) {
    body {
        padding: 1.5rem;
        backdrop-filter: blur(15px);
    }

    h1 {
        font-size: 2.2rem;
    }

    #uploadForm,
    #loginSection,
    #logoutSection {
        padding: 2rem;
        border-radius: 20px;
    }

    #profilePic {
        width: 4.4rem;
        height: 4.4rem;
    }

    input,
    button {
        padding: 1rem;
        border-radius: 14px;
    }

    .scroll-btn {
        display: none;
    }
}

/* Misc */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    #uploadForm,
    #loginSection,
    #logoutSection {
        padding: 1.8rem;
        border-radius: 18px;
    }

    button {
        font-size: 1rem;
    }

    .chips-container {
        padding: 10px;
        gap: 8px;
        border-radius: 26px;
    }

    .chip {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .scroll-btn {
        display: none;
    }
}