/* ============================================================
   BASE RESET & TYPOGRAPHY
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

p {
    font-family: "Gulzar", serif;
    font-weight: 400;
    font-style: normal;
}

body {
    background-color: #080710;
}

/* ============================================================
   DECORATIVE BACKGROUND BLOBS
   ============================================================ */
.background {
    width: 430px;
    height: 520px;
    position: fixed;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
}

.background .shape {
    height: 200px;
    width: 200px;
    position: absolute;
    border-radius: 50%;
}

.shape:first-child {
    background: linear-gradient(#006654, #00C49D);
    left: -80px;
    top: -80px;
}

.shape:last-child {
    background: linear-gradient(to right, #001B1B, #00C49D);
    right: -30px;
    bottom: -80px;
}

/* ============================================================
   MAIN SECTION & GLASS CARD
   ============================================================ */
.main {
    width: 100%;
}

.main .glass-container {
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    width: 300px;
    height: 500px;
    box-shadow: 0 0 40px rgba(8, 7, 16, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.07);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

/* ============================================================
   HEADING
   ============================================================ */
.main .glass-container h2 {
    font-family: "Noto Nastaliq Urdu", serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    color: white;
    font-size: 24px;
    position: absolute;
    top: 35px;
}

.main .glass-container h2::after {
    content: "";
    height: 2px;
    width: 60%;
    position: absolute;
    background-color: #080710;
    left: 50%;
    transform: translateX(-50%);
    top: 74px;
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.content {
    display: flex;
    flex-direction: column;   /* stack verse <p> and #ayah-info vertically */
    align-items: center;      /* center the verse text horizontally */
    width: 100%;
}

/* ============================================================
   VERSE TEXT
   ============================================================ */
.main .glass-container p {
    color: white;
    font-size: 25px;
    transition: opacity 0.4s ease;
    padding: 0 16px;
}

.main .glass-container p::before {
    content: "\"";
    color: #ffffff;
}

.main .glass-container p::after {
    content: "\"";
    color: #ffffff;
}

/* ============================================================
   [ADDED] SURAH NAME & AYAH NUMBER
   Injected as a <span> inside .content by renderVerse().
   Flows naturally below the verse — no absolute positioning.
   ============================================================ */
#ayah-info {
    /* Sits inside .glass-container, positioned below the verse area */
    position: absolute;
    bottom: 140px;
    left: 0;
    right: 150px;
    width: 180px;
    text-align: center;
    font-family: "Noto Nastaliq Urdu", serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    direction: rtl;
    padding: 0 20px;
    letter-spacing: 0.02em;
}

/* ============================================================
   NEXT BUTTON (arrow)
   ============================================================ */
.main .glass-container button.next {
    position: absolute;
    top: 78%;
    /* offset to the right side (RTL layout) */
    right: 20px;
    left: auto;
    margin: 0;
    padding: 5px 20px;
    border-radius: 25px;
    border: 1px solid #00C49D;
    background-color: #00C49D;
    color: white;
    font-size: 15px;
    width: 120px;
    font-family: "Noto Nastaliq Urdu", serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.main .glass-container button.next img {
    width: 35px;
}

/* ============================================================
   SHARE WRAPPER  (positions the button + popup together)
   ============================================================ */
.share-wrapper {
    position: absolute;
    top: 78%;
    left: 20px;
    right: auto;
}

/* ============================================================
   SHARE BUTTON
   ============================================================ */
.btn-share {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: 25px;
    border: 1px solid #006654;
    background-color: transparent;
    color: white;
    font-size: 15px;
    width: 120px;
    font-family: "Noto Nastaliq Urdu", serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    cursor: pointer;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-share:hover {
    background-color: #006654;
}

.btn-share i {
    font-size: 16px;
}

/* ============================================================
   SHARE POPUP
   ============================================================ */
.share-popup {
    position: absolute;
    /* sits just above the share button */
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    background: rgb(0 199 162 / 9%);
    backdrop-filter: blur(14px);
    border: 1px solid #00c7a2;
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Visible state toggled by JS */
.share-popup.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Small label */
.popup-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-family: "Noto Nastaliq Urdu", serif;
    letter-spacing: 0.03em;
}

/* Row of social icon buttons */
.social-icons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Individual social icon button */
.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.social-btn:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
}

/* Platform colours */
.social-btn.whatsapp  { background-color: #25D366; }
.social-btn.twitter   { background-color: #000000; }
.social-btn.facebook  { background-color: #1877F2; }
.social-btn.instagram {
    background: radial-gradient(circle at 30% 107%,
        #fdf497 0%, #fdf497 5%,
        #fd5949 45%, #d6249f 60%,
        #285AEB 90%);
}

/* Small arrow pointing down from popup toward the button */
.share-popup::after {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px 7px 0 7px;
    border-style: solid;
    border-color: rgb(0 199 162) transparent transparent transparent;
}

/* ============================================================
   RESPONSIVE — narrow screens
   ============================================================ */
@media (max-width: 360px) {
    .main .glass-container {
        width: 92vw;
        height: 90vw;
        min-height: 420px;
    }

    .background {
        width: 92vw;
    }
}
