body {
    font-family: Arial, sans-serif;
    background: linear-gradient(45deg,#161415,#b13166);
    text-align: center;
    color: white;
}

.container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.controls {
    background: #484e61;
    color: #ffffff;
    padding: 25px;
    width: 280px;
    border-radius: 12px;
}

.controls input,
.controls textarea,
.controls button {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
}

#card {
    width: 400px;
    height: 500px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: black;
}

/* Background */
#bgWrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
}

#bgImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;   /* HIDE initially */
}

/* Balloon */
#balloon {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}


/* Company Logo */
#logoImage {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: auto;
    z-index: 4;
}

/* Photo Area (fixed space for photo) */
/* Photo area fixed */
#photoArea {
    position: absolute;
    bottom: 180px;     /* Space reserved */
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 3;
}

/* Person image */
#personImage {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
}

/* Text area fixed height */
#textArea {
    position: absolute;
    bottom: 20px;
    width: 100%;
    height: 120px;     /* FIXED HEIGHT */
    padding: 10px;
    background: rgba(0,0,0,0.6);
    text-align: center;
    z-index: 5;

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow: hidden;      /* Prevent overwrite */
}

/* Message */
#cardMsg {
    font-size: 16px;
    overflow-y: auto;      /* Scroll if too big */
    max-height: 70px;
    word-wrap: break-word;
}

/* Text always below photo */
.text {
    position: absolute;
    bottom: 30px;
    width: 100%;
    padding: 15px;
    z-index: 5;

    background: rgba(0,0,0,0.5);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;      /* CENTER TEXT */
}

/* Name */
#cardName {
    margin: 5px 0;
    font-size: 26px;
    word-wrap: break-word;
}

