:root {
    --accent-color: #FFD700;
    --accent-color-secondary: #f32170;
    --error-message: #eb6969;
    --success-message: #adebad;
    --stars-color: #fff;
    --border-color: #ccc;
    --dark-color: #000;
}

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

* {
    margin: 0;
}

body {
    line-height: 1.5;
    font-size: 1.2rem;
    -webkit-font-smoothing: antialiased;
    font-family: system-ui;
    background: linear-gradient(#07081e, #161965);
    color: var(--stars-color);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
    transition: outline 0.3s ease-in-out;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

h1,
#powered-by {
    background: linear-gradient(to right, #f32170, #ff6b08, #cf23cf, #eedd44);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    width: min-content;
    white-space: nowrap;
}

#logo {
    display: flex;
    gap: .5rem;
    align-items: center;
}

#logo img {
    width: 60px
}

header,
footer,
section {
    padding: 1% 1.5%;
}

#star-map {
    width: 100%;
    height: 100vh;
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, .6);
    color: var(--stars-color);
    padding: 5px;
    border: 1px solid var(--border-color);
    display: none;
    white-space: nowrap;
    z-index: 2;
    border-radius: 10px
}

.star:hover {
    background-color: var(--accent-color-secondary) !important;

}

.star.selected {
    outline: 3px solid var(--accent-color-secondary);

}

.star {
    position: absolute;
    border-radius: 50%;
    color: white;
    text-align: center;
    font-size: 8px;
    z-index: 1;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8)
}

input#star-name-display {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    border: none;
    padding: 0;
    font-weight: 700;
    opacity: 1;
}

.promo {
    background: var(--accent-color);
    display: inline-block;
    color: var(--dark-color);
    padding: 0 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    margin-bottom: .5rem;
    width: max-content;
}

#dedication-form {
    display: none;
    /* Form is hidden initially */
}

label[for=star-name-display],
input#star-name-display {
    font-size: 1.7rem;
}

fieldset {
    margin: 1rem 0;
}

label:not(:first-of-type) {
    margin-left: .5rem;
}

legend {
    font-weight: 700;
}


input {
    accent-color: var(--accent-color-secondary);
}

input:focus,
textarea:focus {
    outline: 2px solid var(--accent-color-secondary);
}

#dedication-form.active {
    outline: 3px solid var(--accent-color-secondary);
    box-shadow: 0 0 55px rgb(168 162 194 / 50%);
    transition: all 0.3s ease-in-out;
    padding: 1.3rem;
    border-radius: 30px;
}

.dedicate-btn {
    background: linear-gradient(to right, #f32170, #ff6b08);
    border: none;
    padding: .5rem 1rem;
    margin: 1rem 0;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    background-size: 200% 100%;
    /* Transition for the background position */
    transition: background-position 0.5s;
}

.dedicate-btn:hover {
    background-position: -100% 0;
}

#powered-by {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    margin-top: .2rem;
}

#powered-by img {
    width: 70px;
}

/* STRIPE */
#card-element {
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
}

#card-element.StripeElement--empty {
    background-color: #f8f8f8;
}

#card-element.StripeElement--complete {
    background-color: #e6ffee;
}

#card-element.StripeElement--invalid {
    background-color: #ffeeee;
}

#card-errors {
    color: color: var(--error-message);
}

/* Ensure it's not disabled */
.StripeElement {
    box-shadow: none;
    outline: none;
}


/* MOBILE */
@media (max-width: 768px) {
    fieldset {
        display: flex;
        flex-direction: column;
    }

    textarea {
        width: 100%;
    }

    label:not(:first-of-type) {
        margin-left: unset;
    }

    .star {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.8)
    }

    .dedicate-btn {
        width: 100%;
    }
}