:root {
    --bg-color: #fffafb;
    --accent-pink: #ff85a1;
    --light-pink: #fff0f6;
    --accent-mint: #81e6d9;
    --text-color: #4a5568;
    --error-color: #f56565;
    --card-shadow: 0 10px 25px rgba(255, 133, 161, 0.15);
    --font-rounded: 'M PLUS Rounded 1c', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-rounded);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* --- Soft Bubble Background --- */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    bottom: -100px;
    width: 40px;
    height: 40px;
    background: rgba(255, 133, 161, 0.1);
    border-radius: 50%;
    animation: rise 15s infinite ease-in;
}

.bubble:nth-child(1) {
    left: 10%;
    width: 80px;
    height: 80px;
    animation-duration: 12s;
}

.bubble:nth-child(2) {
    left: 20%;
    width: 40px;
    height: 40px;
    animation-duration: 18s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    left: 70%;
    width: 60px;
    height: 60px;
    animation-duration: 15s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    left: 80%;
    width: 30px;
    height: 30px;
    animation-duration: 20s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    left: 45%;
    width: 100px;
    height: 100px;
    animation-duration: 25s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }

    50% {
        transform: translateX(50px);
    }

    100% {
        bottom: 100vh;
        transform: translateX(-50px);
    }
}

/* --- App Layout --- */
.app-container {
    width: 90%;
    max-width: 500px;
    text-align: center;
    padding: 20px;
}

header {
    margin-bottom: 30px;
}

.app-icon-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.app-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(255, 133, 161, 0.2);
    transition: transform 0.3s ease;
}

.app-logo:hover {
    transform: rotate(5deg) scale(1.1);
}

h1 {
    font-size: 2rem;
    color: var(--accent-pink);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.9rem;
    color: #a0aec0;
}

/* --- Card Design --- */
.card {
    background: white;
    padding: 40px 30px;
    border-radius: 30px;
    box-shadow: var(--card-shadow);
    border: 3px solid var(--light-pink);
}

label {
    display: block;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--accent-pink);
}

.input-group,
.result-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 5px;
}

@media (min-width: 480px) {

    .input-group,
    .result-group {
        flex-direction: row;
    }
}

input {
    flex: 1;
    background: #f7fafc;
    border: 2px solid #edf2f7;
    border-radius: 20px;
    padding: 15px 20px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--accent-pink);
    background: white;
}

button {
    background: var(--accent-pink);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 15px 30px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

button:hover {
    transform: scale(1.05);
    background: #ff6b8e;
}

button:active {
    transform: scale(0.95);
}

#copy-btn {
    background: var(--accent-mint);
    color: #285e61;
}

#copy-btn:hover {
    background: #4fd1c5;
}

/* --- Helpers --- */
.hidden {
    display: none;
    opacity: 0;
}

.divider {
    height: 2px;
    background: var(--light-pink);
    margin: 30px 0;
    border-radius: 1px;
}

.error-msg {
    color: var(--error-color);
    font-size: 0.8rem;
    text-align: left;
    margin-top: 10px;
    height: 1rem;
}

.success-msg {
    color: #38a169;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 15px;
}

/* --- Footer --- */
footer {
    margin-top: 40px;
    font-size: 0.85rem;
}

footer a {
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

footer a:hover {
    border-bottom-color: var(--accent-pink);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section:not(.hidden) {
    display: block;
    animation: fadeIn 0.5s ease-out forwards;
}