@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sniglet:wght@400;800&display=swap');

:root {
    --bg-yellow: #fde062;
    --bg-red: #d95550;
    --btn-pink: #eb8c8c;
    /* Soft pink for button */
    --input-bg: #f4f4f4;
    --input-border: #fde062;
    --text-white: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-yellow);
    font-family: 'Fredoka', sans-serif;
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Cloud CSS */
.css-cloud {
    background: white;
    border-radius: 50px;
    position: absolute;
    z-index: 1;
    opacity: 0.9;
}

.css-cloud::before,
.css-cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 {
    width: 80px;
    height: 25px;
    top: 15px;
    left: -10px;
}

.cloud-1::before {
    width: 35px;
    height: 35px;
    top: -15px;
    left: 10px;
}

.cloud-1::after {
    width: 45px;
    height: 45px;
    top: -20px;
    right: 10px;
}

.cloud-2 {
    width: 90px;
    height: 30px;
    top: 65px;
    right: -10px;
}

.cloud-2::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 15px;
}

.cloud-2::after {
    width: 50px;
    height: 50px;
    top: -25px;
    right: 10px;
}

.cloud-3 {
    width: 40px;
    height: 15px;
    bottom: 20px;
    left: 60px;
}

.cloud-3::before {
    width: 20px;
    height: 20px;
    top: -10px;
    left: 5px;
}

.cloud-3::after {
    width: 25px;
    height: 25px;
    top: -12px;
    right: 5px;
}

.cloud-4 {
    width: 50px;
    height: 18px;
    bottom: 10px;
    right: 50px;
}

.cloud-4::before {
    width: 22px;
    height: 22px;
    top: -12px;
    left: 8px;
}

.cloud-4::after {
    width: 30px;
    height: 30px;
    top: -15px;
    right: 8px;
}

.cloud-lantern-bg {
    width: 100%;
    max-width: 500px;
    position: relative;
    margin-top: 40px;
    padding: 0 20px;
    box-sizing: border-box;
}

.lamp {
    position: absolute;
    top: 150px;
    width: 75px;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
    pointer-events: none;
}

.lamp-left {
    left: 15px;
}

.lamp-right {
    right: 15px;
}

.sponsor-pill {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 50px;
    padding: 8px 20px;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-pill img {
    height: 50px;
    object-fit: contain;
    display: block;
}

.logo-wrapper {
    position: absolute;
    top: 105px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    z-index: 15;
    text-align: center;
    filter: drop-shadow(0px 8px 10px rgba(0, 0, 0, 0.15));
}

.logo-wrapper img {
    width: 100%;
    object-fit: contain;
}

.form-card {
    background-color: var(--bg-red);
    border-radius: 40px;
    padding: 130px 25px 40px 25px;
    position: relative;
    z-index: 5;
    margin-top: 130px;
    box-shadow: 0 15px 0px rgba(200, 60, 60, 0.3), 0 20px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-header h1 {
    font-family: 'Sniglet', cursive;
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    color: var(--text-white);
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.08);
    letter-spacing: 2px;
    line-height: 1.1;
}

.form-header p {
    font-size: 15px;
    font-weight: 600;
    margin: 10px 0 20px 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

input,
textarea {
    width: 100%;
    background: var(--input-bg);
    border: 5px solid var(--input-border);
    border-radius: 15px;
    padding: 15px 15px 25px 15px;
    font-size: 16px;
    color: #333;
    font-family: 'Fredoka', sans-serif;
    box-sizing: border-box;
    outline: none;
    font-weight: 600;
    transition: border-color 0.2s;
}

textarea {
    min-height: 160px;
    resize: none;
}

input:focus,
textarea:focus {
    border-color: #ffd22c;
}

.counter {
    text-align: right;
    font-size: 14px;
    color: #7a7a7a;
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-weight: 700;
}

.submit-btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    position: relative;
    gap: 15px;
}
.sun-right {
    right: -70px;
}
.sun-left {
    left: -72px;
}

.sun {
    width: 190px;
    height: 150px;
    position: absolute;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    z-index: 10;
}

.btn {
    background-color: var(--btn-pink);
    color: white;
    font-family: 'Sniglet', cursive;
    font-size: 26px;
    font-weight: 800;
    border: none;
    border-radius: 20px;
    padding: 15px 30px;
    cursor: pointer;
    box-shadow: 0 6px 0px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: transform 0.1s, box-shadow 0.1s;
    flex: 1;
    max-width: 250px;
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 4px 0px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
    background-color: #d19e9e;
    cursor: not-allowed;
    box-shadow: none;
    transform: translateY(6px);
}

.sparkle {
    color: #ffde6a;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-top: -5px;
}

.list-panel {
    background-color: #d1504d;
    /* slightly different shade if tucked under */
    border-radius: 40px 40px 0 0;
    padding: 60px 25px 40px 25px;
    width: 100%;
    min-height: 500px;
    margin-top: -70px;
    /* Tuck deeply under the form card */
    z-index: 1;
    box-shadow: inset 0 15px 20px -15px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.list-header {
    font-family: 'Sniglet', cursive;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-header h2 {
    font-size: 28px;
    margin: 0;
    color: white;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Fredoka', sans-serif;
    margin: 0;
    font-weight: 500;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg-card {
    background-color: var(--btn-pink);
    border-radius: 20px;
    padding: 20px;
    color: white;
    min-height: 80px;
    box-shadow: 0 6px 0px rgba(0, 0, 0, 0.1);
}

.msg-meta {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 10px;
    font-weight: 700;
}

.msg-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
}

.notice {
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    font-weight: 600;
}

.notice.danger {
    background-color: #ffcccc;
    border: 2px solid #ff4d4d;
    color: #cc0000;
}

.notice.ok {
    background-color: #ccffcc;
    border: 2px solid #33cc33;
    color: #008000;
}

.notice.warn {
    background-color: #ffffcc;
    border: 2px solid #cccc00;
    color: #808000;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}