/* 1. VARIABLES */
:root {
    --main-blue: #1a237e;
    --gold: #d4af37;
    --whatsapp-green: #25d366;
    --pdf-red: #d32f2f;
}

/* 2. BODY */
body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f5f5f5;
}

/* 3. CONTROL PANEL */
.control-panel {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 550px;
    text-align: center;
}

.hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: block;
}

input {
    padding: 12px;
    width: 90%;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 17px;
}

/* BUTTONS */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

button {
    flex: 1;
    padding: 12px;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.btn-pdf { background: var(--pdf-red); }
.btn-wa { background: var(--whatsapp-green); }

/* 🔥 MAIN FIX: PDF CONTAINER */
#pdf-container {
    width: 800px;   /* FIXED WIDTH */
}

/* 🔥 PAGE FIX */
.page {
    width: 800px;
    height: 1120px; /* FIXED HEIGHT = MOST IMPORTANT */
    display: block;
    box-sizing: border-box;
}

/* 4. CARD PAGE 1 */
#card-to-print {
    border: 10px double var(--gold);
    padding: 40px;
    text-align: center;
    overflow: hidden;

    background:
        url("images/top-1.png") left top no-repeat,
        url("images/top-2.png") right top no-repeat,
        url("images/bott-1.png") left bottom no-repeat,
        url("images/bott-2.png") right bottom no-repeat,
        radial-gradient(circle at bottom right, rgba(212,175,55,0.3), transparent 50%),
        linear-gradient(135deg, #f7f1dd, #f3e5ab);

    background-size: 120px,120px,120px,120px,auto,auto;
}

/* 5. PAGE 2 FIX */
#card-to-print-2 {
    border: 10px double var(--gold);
    overflow: hidden;
    display: flex;
}

#card-to-print-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 6. TEXT */
.mantra {
    font-family: 'Tiro Devanagari Hindi', serif;
    font-size: 12px;
    color: #444;
}

.guest-name {
    font-family: 'Tiro Devanagari Hindi', serif;
    font-size: 22px;
    color: var(--pdf-red);
    font-weight: bold;
}

.baby-name {
    font-family: 'Tiro Devanagari Hindi', serif;
    font-size: 42px;
    color: var(--main-blue);
}

.event-container {
    border: 2px solid #cfd8dc;
    border-radius: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.95);
}

/* FOOTER */
.footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.tag {
    background: var(--main-blue);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
}

/* 🔥 PRINT FIX */
@media print {
    .control-panel { display: none; }
    body { padding: 0; background: white; }
}