/* =========================================================
   PROFESSIONAL PINK WEBSITE THEME
   Home • Guestbook • Account • Dashboard • Space
   ========================================================= */


/* 1. DESIGN SYSTEM
   ========================================================= */

:root {
    color-scheme: light;

    --pink-50: #fff6fa;
    --pink-100: #ffeaf2;
    --pink-200: #f9d1e0;
    --pink-300: #f0a7c3;
    --pink-400: #df7da3;
    --pink-500: #cf5285;
    --pink-600: #b83c70;
    --pink-700: #96305b;
    --pink-800: #792447;

    --text: #302630;
    --text-secondary: #655965;
    --muted: #817581;

    --white: #ffffff;
    --surface: #ffffff;
    --surface-soft: #fffafd;

    --border: #eee2e9;
    --border-strong: #e5d4de;

    --success: #237a57;
    --success-bg: #edf9f2;
    --danger: #b93848;
    --danger-bg: #fff0f1;

    --content-width: 1040px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;

    --shadow-sm:
        0 3px 12px rgba(58, 31, 46, 0.04);

    --shadow-md:
        0 10px 30px rgba(58, 31, 46, 0.07);

    --shadow-lg:
        0 20px 55px rgba(58, 31, 46, 0.09);

    --shadow-pink:
        0 5px 15px rgba(184, 60, 112, 0.18);

    --transition: 180ms ease;
}


/* 2. RESET AND BASE
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 30px 24px 72px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 15px;
    line-height: 1.75;
    letter-spacing: -0.01em;

    color: var(--text);

    background:
        radial-gradient(ellipse at 0% 0%,
            rgba(255, 221, 235, 0.65),
            transparent 36%),
        radial-gradient(ellipse at 100% 45%,
            rgba(255, 239, 246, 0.75),
            transparent 38%),
        linear-gradient(180deg,
            #fff8fb 0%,
            #fffafd 48%,
            #ffffff 100%);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



::selection {
    color: var(--pink-800);
    background: var(--pink-200);
}

[hidden] {
    display: none !important;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--pink-600);
    transition: color var(--transition);
}

a:hover {
    color: var(--pink-800);
}


/* 3. ACCESSIBILITY
   ========================================================= */

:focus-visible {
    outline: 3px solid rgba(207, 82, 133, 0.45);
    outline-offset: 3px;
}

input:focus-visible {
    outline: none;
}


/* 4. NAVIGATION
   ========================================================= */

nav {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;

    width: min(100%, var(--content-width));
    margin: 0 auto 48px;
    padding: 8px;

    background: rgba(255, 255, 255, 0.93);

    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: var(--shadow-sm);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 17px;

    color: var(--text-secondary);
    text-decoration: none;

    font-size: 14px;
    font-weight: 650;

    border: 1px solid transparent;
    border-radius: var(--radius-md);

    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition);
}

nav a:hover {
    color: var(--pink-800);
    background: var(--pink-50);
    border-color: var(--pink-100);
}


/* 5. HEADINGS AND TEXT
   ========================================================= */

h1,
h2,
h3,
h4 {
    margin-top: 0;
    color: var(--text);
    font-weight: 750;
    letter-spacing: -0.045em;
}

h1 {
    margin-bottom: 14px;

    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 1.12;
}

h2 {
    margin-bottom: 16px;

    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.3;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.4;
}

p {
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}


/* General content width */

body>h1,
body>p,
body>ul,
body>form,
body>#status,
body>#login-section,
body>#logout-button,
body>#login-message {
    width: 100%;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}


/* Intro paragraph */

body>h1+p {
    margin-top: 0;
    margin-bottom: 28px;

    padding: 0;

    background: transparent;
    border: none;
    box-shadow: none;

    color: var(--muted);
    font-size: 1.02rem;
}


/* 6. CONTENT CARDS
   ========================================================= */

body>p {
    margin-top: 22px;
    margin-bottom: 20px;
    padding: 25px 30px;

    color: var(--text-secondary);

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}


/* 7. BUTTONS
   ========================================================= */

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 47px;
    padding: 12px 22px;

    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    background: linear-gradient(135deg,
            var(--pink-500),
            var(--pink-700));

    border: 1px solid transparent;
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-pink);

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition),
        opacity var(--transition);
}

button:hover {
    filter: brightness(1.04);
    box-shadow: 0 8px 20px rgba(184, 60, 112, 0.23);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


/* 8. FORMS AND INPUTS
   ========================================================= */

form {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;

    width: 100%;
    margin-top: 24px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"] {
    min-width: 0;
    min-height: 49px;
    padding: 12px 15px;

    color: var(--text);
    font-family: inherit;
    font-size: 15px;

    background: #ffffff;

    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

form input[type="text"],
form input[type="password"],
form input[type="email"] {
    flex: 1 1 220px;
}

input:hover {
    border-color: var(--pink-300);
}

input:focus {
    border-color: var(--pink-500);
    box-shadow: 0 0 0 4px rgba(207, 82, 133, 0.11);
}

input::placeholder {
    color: #a0959e;
    opacity: 1;
}

input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: #f8f5f7;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--pink-600);
    cursor: pointer;
}


/* 9. GUESTBOOK
   ========================================================= */

#guestbook-list {
    display: flex;
    flex-direction: column;
    gap: 14px;

    width: 100%;
    max-width: var(--content-width);

    margin: 28px auto;
    padding: 0;

    list-style: none;
}

#guestbook-list li {
    padding: 21px 24px;

    color: var(--text-secondary);
    overflow-wrap: anywhere;

    background: var(--surface);

    border: 1px solid var(--border);
    border-left: 4px solid var(--pink-400);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

#guestbook-list li:hover {
    background: #fffafd;
    border-color: var(--pink-200);
    border-left-color: var(--pink-600);
    box-shadow: var(--shadow-md);
}


/* 10. ACCOUNT AND LOGIN PANEL
   ========================================================= */

#login-section {
    width: 100%;
    max-width: 460px;

    margin: 48px auto 28px;
    padding: 34px 36px;

    background: rgba(255, 255, 255, 0.97);

    border: 1px solid var(--border);
    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-lg);
}

#login-section::before {
    content: "✿";

    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;
    margin-bottom: 22px;

    color: var(--pink-700);

    background: var(--pink-100);

    border: 1px solid var(--pink-200);
    border-radius: 16px;

    font-size: 27px;
}

#login-section h2 {
    margin-bottom: 8px;
    font-size: 1.8rem;
}

#login-section p {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

#login-section form {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
}

#login-section label {
    display: block;
    margin-top: 7px;
    margin-bottom: 3px;

    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

#login-section input[type="text"],
#login-section input[type="password"],
#login-section input[type="email"] {
    width: 100%;
    flex: initial;
    min-height: 50px;
}

#login-section button {
    width: 100%;
    min-height: 49px;
    margin-top: 15px;
    font-size: 15px;
}

#login-section input[type="checkbox"] {
    flex: 0 0 auto;
    margin-right: 6px;
}


/* 11. LOGIN MESSAGES
   ========================================================= */

#login-message {
    width: 100%;
    max-width: 460px;

    margin: 16px auto;
    padding: 12px 15px;

    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;

    border-radius: var(--radius-md);
}


/* 12. STATUS PANELS
   ========================================================= */

#status {
    width: 100%;
    max-width: var(--content-width);

    margin: 24px auto;
    padding: 26px 30px;

    color: var(--text-secondary);

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

#status h1,
#status h2,
#status h3 {
    color: var(--text);
}

#status h2 {
    margin-bottom: 12px;
    font-size: 1.6rem;
}

#status a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    margin: 12px 8px 0 0;
    padding: 10px 16px;

    color: var(--pink-800);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;

    background: var(--pink-50);

    border: 1px solid var(--pink-200);
    border-radius: 10px;

    transition:
        background var(--transition),
        border-color var(--transition);
}

#status a:hover {
    background: var(--pink-100);
    border-color: var(--pink-300);
}

#status:empty {
    display: none;
}


/* 13. LOGOUT BUTTON
   ========================================================= */

#logout-button {
    display: flex;

    width: fit-content;
    min-width: 130px;
    max-width: 100%;

    margin: 20px auto 0;
    padding: 12px 20px;

    color: var(--pink-700);
    background: #ffffff;

    border: 1px solid var(--pink-200);
    border-radius: 11px;

    box-shadow: var(--shadow-sm);
}

#logout-button:hover {
    color: var(--pink-800);
    background: var(--pink-50);
    border-color: var(--pink-300);
    box-shadow: var(--shadow-md);
}


/* 14. ADMIN DASHBOARD
   ========================================================= */

body:has(#visitor-count)>h1 {
    margin-bottom: 12px;
}

body:has(#visitor-count)>h1+p {
    margin-bottom: 30px;
}

body>p:has(#visitor-count) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;

    width: 100%;
    max-width: var(--content-width);
    min-height: 190px;

    margin: 0 auto 24px;
    padding: 30px;

    color: var(--muted);
    font-size: 14px;
    font-weight: 600;

    background:
        radial-gradient(circle at 100% 0%,
            rgba(255, 225, 237, 0.9),
            transparent 45%),
        #ffffff;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

#visitor-count {
    display: block;
    margin-top: 5px;

    color: var(--pink-700);
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.06em;
    overflow-wrap: anywhere;
}


/* 15. SPACE PAGE — DATE PICKER
   ========================================================= */

#space-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;

    width: 100%;
    max-width: var(--content-width);

    margin: 30px auto 20px;
    padding: 24px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}

#space-form label {
    display: block;
    width: 100%;
    margin-bottom: -8px;

    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

#space-form input[type="date"] {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 49px;
    padding: 11px 14px;
}

#space-form button {
    flex-shrink: 0;
}


/* 16. SPACE PAGE — STATUS
   ========================================================= */

#space-form~#status {
    margin-top: 18px;
    margin-bottom: 26px;
    padding: 16px 20px;

    font-size: 14px;
    line-height: 1.7;
}

#space-form~#status:empty {
    display: none;
}


/* 17. SPACE PAGE — IMAGE GALLERY
   ========================================================= */

#result {
    width: 100%;
    max-width: var(--content-width);

    margin: 30px auto 0;
    padding: 30px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-lg);

    overflow: hidden;
}

#result h2 {
    margin-bottom: 12px;

    color: var(--text);
    font-size: clamp(1.65rem, 3.5vw, 2.4rem);
    line-height: 1.25;
}

#date-shown {
    display: inline-flex;
    align-items: center;

    margin: 0 0 24px;
    padding: 7px 12px;

    color: var(--pink-700);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    background: var(--pink-50);

    border: 1px solid var(--pink-100);
    border-radius: 8px;
}

#picture {
    display: block;

    width: 100%;
    max-height: 680px;
    height: auto;

    margin: 0 auto 26px;

    object-fit: contain;

    background: #17141d;

    border: 1px solid rgba(48, 38, 48, 0.08);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

#description {
    margin: 0 0 24px;

    color: #615662;
    font-size: 15px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

#nasa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 11px 17px;

    color: var(--pink-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;

    background: var(--pink-50);

    border: 1px solid var(--pink-200);
    border-radius: 11px;

    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition);
}

#nasa-link:hover {
    color: var(--pink-800);
    background: var(--pink-100);
    border-color: var(--pink-300);
}


/* 18. GENERAL FORM REFINEMENTS
   ========================================================= */

form:not(#login-section form):not(#space-form) {
    max-width: var(--content-width);
    margin-top: 22px;
    gap: 12px;
}

form:not(#login-section form):not(#space-form) input[type="text"] {
    min-height: 49px;
}

form:not(#login-section form):not(#space-form) button {
    min-height: 49px;
}


/* 19. TABLETS
   ========================================================= */

@media (max-width: 768px) {
    body {
        padding: 24px 20px 55px;
    }

    nav {
        margin-bottom: 40px;
    }

    nav a {
        padding: 9px 13px;
        font-size: 13px;
    }

    body>h1 {
        font-size: clamp(2.2rem, 7vw, 3rem);
    }

    body>p {
        padding: 23px;
    }

    #login-section {
        margin-top: 40px;
        padding: 30px;
    }

    #status {
        padding: 24px;
    }

    #space-form {
        padding: 20px;
    }

    #result {
        padding: 24px;
    }

    #picture {
        max-height: 560px;
    }
}


/* 20. MOBILE PHONES
   ========================================================= */

@media (max-width: 520px) {
    body {
        padding: 18px 14px 42px;
        font-size: 14px;
    }

    nav {
        gap: 3px;
        padding: 6px;
        margin-bottom: 34px;
        border-radius: 15px;
    }

    nav a {
        padding: 9px 10px;
        font-size: 12px;
    }

    body>h1 {
        font-size: 2.3rem;
        letter-spacing: -0.05em;
    }

    body>h1+p {
        margin-bottom: 24px;
        font-size: 14px;
    }

    body>p {
        margin-top: 18px;
        padding: 20px;
    }

    form {
        flex-direction: column;
        gap: 12px;
    }

    form button {
        width: 100%;
    }

    form input[type="text"],
    form input[type="password"],
    form input[type="email"] {
        width: 100%;
        flex: auto;
    }

    #guestbook-list {
        gap: 12px;
        margin-top: 22px;
    }

    #guestbook-list li {
        padding: 17px;
    }

    #login-section {
        margin-top: 32px;
        padding: 25px 20px;
        border-radius: 18px;
    }

    #login-section::before {
        width: 48px;
        height: 48px;
        margin-bottom: 18px;
    }

    #login-section h2 {
        font-size: 1.6rem;
    }

    #login-section button {
        width: 100%;
    }

    #status {
        padding: 20px 18px;
        border-radius: 15px;
    }

    #status a {
        margin-right: 5px;
    }

    #logout-button {
        width: 100%;
    }

    body>p:has(#visitor-count) {
        min-height: 160px;
        padding: 24px;
    }

    #visitor-count {
        font-size: 3.2rem;
    }

    #space-form {
        flex-direction: column;
        align-items: stretch;
        gap: 13px;
        padding: 20px;
        border-radius: 17px;
    }

    #space-form label {
        margin-bottom: -5px;
    }

    #space-form input[type="date"] {
        width: 100%;
        flex: auto;
    }

    #space-form button {
        width: 100%;
    }

    #space-form~#status {
        padding: 13px 15px;
    }

    #result {
        padding: 17px;
        border-radius: 18px;
    }

    #result h2 {
        font-size: 1.65rem;
    }

    #date-shown {
        margin-bottom: 18px;
    }

    #picture {
        max-height: 440px;
        margin-bottom: 20px;
        border-radius: 13px;
    }

    #description {
        font-size: 14px;
        line-height: 1.85;
    }

    #nasa-link {
        width: 100%;
        text-align: center;
    }
}


/* 21. EXTRA SMALL SCREENS
   ========================================================= */

@media (max-width: 360px) {
    body {
        padding-right: 10px;
        padding-left: 10px;
    }

    nav {
        gap: 2px;
    }

    nav a {
        padding: 8px;
        font-size: 11px;
    }

    body>h1 {
        font-size: 2rem;
    }

    #login-section {
        padding: 22px 16px;
    }

    #space-form {
        padding: 15px;
    }

    #result {
        padding: 13px;
    }
}


/* 22. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}