@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #263289 0%, #090b15 55%, #040509 100%);
    color: #fff;
    font-family: 'Nunito', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 0.05em 0 0.1em;
    vertical-align: -0.1em;
}

.container-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0px;
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    box-sizing: border-box;
}

.profile-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 32px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

#profile-pic {
    border-radius: 20px;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

#profile-name {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 0.02em;
}

.profile-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    transition: transform 0.25s ease;
}

.profile-link img {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltiptext {
    visibility: hidden;
    opacity: 0;
    width: 130px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 6px 8px;
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.2s ease;
    font-size: 0.9rem;
}

.tooltip:hover .tooltiptext,
.tooltip:focus .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.profile-bio {
    margin-top: 24px;
    padding: 20px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    width: fit-content;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.gimmicks-section {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto 48px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
}

.gimmicks-intro {
    margin-bottom: 18px;
}

.gimmicks-intro h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.gimmicks-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.gimmicks-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gimmick-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.gimmick-card h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.gimmick-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gimmick-form textarea {
    min-height: 100px;
    resize: vertical;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(7, 10, 24, 0.45);
    color: #fff;
    font: inherit;
}

.gimmick-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.gimmick-form button,
.drawing-actions button {
    align-self: flex-start;
    padding: 9px 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c93ff, #4f64d8);
    color: white;
    cursor: pointer;
    font: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.gimmick-form button:hover,
.drawing-actions button:hover {
    transform: translateY(-1px);
}

.message-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

#drawingCanvas {
    width: 100%;
    max-width: 520px;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: white;
    display: block;
    margin-bottom: 10px;
    cursor: crosshair;
    align-self: center;
}

.drawing-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-self: center;
}

.drawing-actions .secondary {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.small-note {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 800px) {
    .gimmicks-grid {
        grid-template-columns: 1fr;
    }
}

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    box-sizing: border-box;
}

.login-card {
    width: min(480px, 100%);
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #c7d2fe;
    text-decoration: none;
    font-weight: 700;
}

.login-hero h1 {
    margin: 0 0 8px;
    font-size: 1.7rem;
}

.login-hero p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: rgba(255, 255, 255, 0.92);
}

.auth-field input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(7, 10, 24, 0.45);
    color: white;
    font: inherit;
}

.auth-button {
    padding: 11px 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c93ff, #4f64d8);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.auth-button:hover {
    transform: translateY(-1px);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.status-message {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.84);
}

.status-message.error {
    color: #ffd1d1;
}

.dashboard-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    align-items: center;
}

.dashboard-meta {
    font-size: 0.85rem;
    color: #c7d2fe;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
    line-height: 1.7;
    white-space: pre-wrap;
    font-size: 1rem;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);

}

.dashboard-image {
    width: 100%;
    max-width: 300px;
    border-radius: 14px;
    display: block;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.music-card {
    width: min(320px, 100%);
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.music-card-header {
    margin-bottom: 8px;
}

.likes {
    margin-top: 0;
    min-width: 220px;
}

.profile-bio p {
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.92);
}

.bio-label {
    font-weight: 700;
    color: #c7d2fe;
    margin-right: 6px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.profile-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#profile-pic {
    border-radius: 5%;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

#profile-name {
    margin-left: 20px;
    font-size: 2rem;
}

.profile-links {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.profile-link {
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.profile-link:hover {
    transform: scale(1.1);
}

.profile-link img {
    width: 50px;
    height: 50px;
    border-radius: 10%;
}

.drawing-colors {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    justify-content: center;
}

.color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
}

.color-btn.active {
    border: 3px solid #7c93ff;
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(124, 147, 255, 0.7);
}

.eraser-btn {
    background: none;
    color: #000;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.color-btn:hover {
    transform: scale(1.15);
}

.brush-size {
    display: flex;
    margin: 10px 0;
    justify-content:center;
}

.admin-header {
    width: 100%;
    padding: 12px;
    text-align: center;
    margin-top: 20px;
}

.admin-header a {
    align-self: flex-start;
    padding: 9px 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c93ff, #4f64d8);
    color: white;
    cursor: pointer;
    font: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.admin-header a:hover {
    transform: translateY(-2px);
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltiptext {
    visibility: hidden;
    opacity: 0;
    width: 130px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 8px;
    position: absolute;
    left: 50%;
    top: calc(100%);
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tooltip:hover .tooltiptext,
.tooltip:focus .tooltiptext {
    visibility: visible;
    opacity: 1;
}

#dni {
    margin-left: 30px;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 800px) {

    html,
    body {
        overflow-x: hidden;
    }

    html {
        background: radial-gradient(circle at top, #263289 0%, #090b15 55%, #040509 100%);
    }

    .container-main {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        min-height: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px 12px;
        box-sizing: border-box;
    }


    /* Profile container first */
    .container {
        order: 1;
        min-height: 0;
        height: auto;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .profile-bio {
        flex-direction: column;
    }

    .profile-container {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        box-sizing: border-box;
        padding: 20px;
        gap: 12px;
        margin: 0 auto;
    }

    #profile-name {
        margin-left: 0;
        margin-top: 10px;
        font-size: 1.8rem;
    }

    #profile-pic {
        width: 130px;
        height: 130px;
    }

    .profile-links {
        margin-top: 15px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .profile-link {
        margin: 0 5px;
    }

    .profile-link img {
        width: 45px;
        height: 45px;
    }


    /* Likes second */
    .likes {
        order: 2;
        margin: 20px auto 0;
        min-width: unset;
        width: calc(100% - 40px);
        box-sizing: border-box;
    }


    /* Music third */
    .music-card {
        order: 3;
        width: calc(100% - 40px);
        margin: 20px auto 0;
        box-sizing: border-box;
    }

    .music-card iframe {
        width: 100%;
        max-width: 100%;
    }


    /* Gimmicks last */
    .gimmicks-section {
        width: calc(100% - 24px);
        margin: 20px auto 40px;
        padding: 18px;
        box-sizing: border-box;
    }

    .gimmicks-grid {
        width: 100%;
    }

    .gimmick-card {
        width: 100%;
        box-sizing: border-box;
    }


    /* Drawing fixes */
    #drawingCanvas {
        max-width: 100%;
        height: auto;
    }


    /* Prevent DNI text from pushing layout */
    #dni {
        margin-left: 0;
        margin-top: 20px;
    }

}