
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

/* PUBLIC PROFILE */

.profile-page {
    min-height: 100vh;
    padding: 45px 18px;
    background-color: var(--page-bg, #f5e9f5);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color, #29202d);
}

.profile-container {
    width: 100%;
    max-width: 480px;
    margin: auto;
    text-align: center;
}

.profile-picture,
.profile-placeholder {
    width: 115px;
    height: 115px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 18px;
    border: 4px solid white;
    box-shadow: 0 5px 20px #0002;
}

.profile-placeholder {
    background: linear-gradient(135deg, #e8b9df, #aa80bd);
    display: grid;
    place-items: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
}

.profile-container h1 {
    font-size: 29px;
    margin: 10px 0;
}

.profile-bio {
    font-size: 15px;
    line-height: 1.7;
    margin: 12px 0 23px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin: 25px 0 30px;
}

.social-icons a {
    color: var(--text-color);
    font-size: 25px;
    transition: transform .2s;
}

.social-icons a:hover {
    transform: translateY(-4px);
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-button {
    position: relative;
    display: block;
    padding: 19px 45px;
    background: var(--button-bg, white);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 4px 13px #00000012;
    transition: transform .2s, box-shadow .2s;
}

.profile-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px #0002;
}

.profile-button i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: .55;
}

.profile-container footer {
    margin-top: 45px;
    font-size: 12px;
    opacity: .7;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8e5f3, #d9c2e8);
}

.login-card {
    background: white;
    padding: 35px;
    border-radius: 22px;
    width: 100%;
    max-width: 390px;
    box-shadow: 0 10px 35px #0001;
    text-align: center;
}

/* ADMIN */

.admin-page {
    min-height: 100vh;
    background: #f7f5f8;
    color: #302b35;
}

.admin-header {
    background: white;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px #0000000a;
}

.admin-header nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.admin-header a,
.admin-container > a {
    text-decoration: none;
    color: #9863a7;
    font-weight: bold;
}

.admin-container {
    width: min(900px, 94%);
    margin: 35px auto;
}

.admin-card {
    background: white;
    padding: 25px;
    margin: 22px 0;
    border-radius: 17px;
    box-shadow: 0 3px 15px #00000008;
}

.admin-card h2 {
    margin-top: 0;
}

input,
textarea,
button {
    font: inherit;
}

.admin-card input:not([type="hidden"]),
.admin-card textarea,
.login-card input {
    display: block;
    width: 100%;
    padding: 13px;
    margin: 8px 0 18px;
    border: 1px solid #ded8e2;
    border-radius: 9px;
    background: white;
}

.admin-card input[type="color"] {
    height: 48px;
}

.admin-card label {
    display: block;
    font-size: 14px;
    font-weight: bold;
}

.admin-card button,
.login-card button,
.qr-card button {
    background: #a36bb2;
    color: white;
    padding: 12px 19px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-weight: bold;
}

.admin-card button:hover,
.login-card button:hover {
    background: #865296;
}

.login-card button {
    width: 100%;
}

.link-editor {
    border: 1px solid #eee7f0;
    padding: 15px;
    margin: 15px 0;
    border-radius: 12px;
}

.link-actions,
.link-editor form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link-actions {
    margin-top: 10px;
}

.link-actions button {
    font-size: 13px;
}

button.danger {
    background: #c65d72;
}

.notice {
    padding: 15px;
    background: #eee0f3;
    color: #663c74;
    border-radius: 10px;
    margin-bottom: 20px;
}

.error {
    color: #c03950;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 14px;
}

.stat-card span {
    display: block;
    color: #777;
    font-size: 14px;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-top: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.qr-card {
    text-align: center;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin: 25px auto;
}

#qrcode img,
#qrcode canvas {
    max-width: 100%;
}

@media(max-width:600px) {
    .profile-page {
        padding-top: 35px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        align-items: flex-start;
    }

    .link-editor form {
        display: block;
    }
}
