/* ==========================================================================
   ENERGYPAC CELEBRATION E-CARD - MINIMALIST SITE STYLESHEET
   Reference Style: Clean UI, bottom-border inputs, rounded outline buttons
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    /* Energypac Corporate Colors */
    --color-blue: #004085;       /* Congress Blue */
    --color-red: #B21F2D;        /* Cardinal Red */
    --color-yellow: #FECF72;     /* Goldenrod Yellow */
    
    /* Background Themes */
    --bg-light: #f8fafc;
    --bg-editor: #f4f6f9;
    --bg-carousel: linear-gradient(135deg, #07162c 0%, #002c5c 100%);
    
    /* Typography */
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-bengali: 'Anek Bangla', sans-serif;
    
    /* Shadows */
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    /* Dimensions */
    --card-width: 330px;
    --card-height: 485px;
}

/* Global resets & scrollbars */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Layout containers */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Header Navbar Styles */
.navbar-custom {
    background-color: #002c5c; /* Dark Blue matching the Energypac branding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 30px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.85rem;
    color: #e2e8f0; /* Light grey/white for readability on dark header background */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.nav-item:hover, .nav-item.active {
    color: var(--color-yellow); /* Goldenrod active/hover state */
}

/* Footer layout */
.footer-custom {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 40px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: auto;
}

/* ==========================================================================
   ROUTE 1: HOME/LANDING PAGE DESIGN
   ========================================================================== */
.hero-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: radial-gradient(circle at top right, rgba(254, 207, 114, 0.08) 0%, rgba(255,255,255,0) 50%),
                radial-gradient(circle at bottom left, rgba(0, 64, 133, 0.05) 0%, rgba(255,255,255,0) 50%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--color-red);
    background-color: rgba(178, 31, 45, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 25px;
}

.hero-content h1 {
    font-family: var(--font-title);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--color-blue);
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content h1 span {
    color: var(--color-red);
}

.hero-content p {
    font-size: 1.15rem;
    color: #475569;
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 300;
}

/* Outline Buttons */
.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-blue);
    background: transparent;
    border: 2px solid var(--color-blue);
    padding: 15px 40px;
    border-radius: 40px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-outline-custom:hover {
    background-color: var(--color-blue);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 64, 133, 0.15);
    transform: translateY(-2px);
}

/* ==========================================================================
   ROUTE 2: CAROUSEL PAGE DESIGN (https://mybracuniversitycard.com/e-card)
   ========================================================================== */
.carousel-view-bg {
    flex: 1;
    background: var(--bg-carousel);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.carousel-title-area {
    text-align: center;
    margin-bottom: 40px;
}

.carousel-title-area h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.carousel-title-area p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Deck stage */
.deck-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: 100%;
    max-width: 950px;
    position: relative;
    min-height: 520px;
}

.deck-nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 10px 20px;
    transition: color 0.3s, transform 0.3s;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 50;
}

.deck-nav-btn:hover {
    color: var(--color-yellow);
    transform: scale(1.05);
}

/* Deck stack of cards */
.deck-container {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
    transform-style: preserve-3d;
    perspective: 1200px;
}

.deck-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, -300px) scale(0.6);
}

.deck-card.active {
    transform: translate3d(0, 0, 0) scale(1.02);
    z-index: 20;
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.deck-card.prev {
    transform: translate3d(-100px, 0, -100px) rotateY(15deg) scale(0.9);
    z-index: 10;
    opacity: 0.6;
    pointer-events: auto;
    cursor: pointer;
}

.deck-card.next {
    transform: translate3d(100px, 0, -100px) rotateY(-15deg) scale(0.9);
    z-index: 10;
    opacity: 0.6;
    pointer-events: auto;
    cursor: pointer;
}

.deck-card.prev-2 {
    transform: translate3d(-170px, 0, -200px) rotateY(25deg) scale(0.8);
    z-index: 5;
    opacity: 0.25;
}

.deck-card.next-2 {
    transform: translate3d(170px, 0, -200px) rotateY(-25deg) scale(0.8);
    z-index: 5;
    opacity: 0.25;
}

/* ==========================================================================
   ROUTE 3: EDITOR PAGE DESIGN (https://mybracuniversitycard.com/image-generate/2)
   ========================================================================== */
.editor-view-bg {
    flex: 1;
    background-color: var(--bg-editor);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    width: 100%;
    max-width: 1100px;
    align-items: center;
}

/* Left side navigation & form */
.editor-left-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.back-navigation {
    display: flex;
}

.back-link {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.9rem;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--color-blue);
}

/* Clean Editor Panel */
.form-panel {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-panel);
    border: 1px solid #e2e8f0;
}

.form-panel h3 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-blue);
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

/* Line Inputs (Reference Site Style: bottom-border inputs, no outline boxes) */
.minimal-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.minimal-input-group label {
    font-family: var(--font-title);
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.minimal-input {
    border: none;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0;
    outline: none;
    background: transparent;
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #0f172a;
    transition: border-bottom-color 0.3s;
    width: 100%;
}

.minimal-input:focus {
    border-bottom-color: var(--color-blue);
}

.minimal-input::placeholder {
    color: #94a3b8;
    font-weight: 300;
}

/* Editor Action Button: Outlined Rounded */
.btn-outline-download {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-blue);
    background: transparent;
    border: 2px solid var(--color-blue);
    padding: 14px;
    border-radius: 30px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-outline-download:hover {
    background-color: var(--color-blue);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 64, 133, 0.15);
}

.btn-outline-share {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 700;
    color: #25d366; /* WhatsApp-inspired green theme for sharing */
    background: transparent;
    border: 2px solid #25d366;
    padding: 14px;
    border-radius: 30px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-outline-share:hover {
    background-color: #25d366;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(37, 211, 102, 0.15);
}

/* Share Link Section */
.share-section {
    margin-top: 25px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 20px;
}

.share-title {
    font-family: var(--font-title);
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-social {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-title);
    font-size: 0.78rem;
    font-weight: 700;
    background: transparent;
    padding: 11px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-whatsapp {
    color: #25d366;
    border: 2px solid #25d366;
}

.btn-whatsapp:hover {
    background-color: #25d366;
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(37, 211, 102, 0.15);
}

.btn-facebook {
    color: #1877f2;
    border: 2px solid #1877f2;
}

.btn-facebook:hover {
    background-color: #1877f2;
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(24, 119, 242, 0.15);
}

.btn-copy-link {
    color: var(--color-blue);
    border: 2px solid var(--color-blue);
}

.btn-copy-link:hover {
    background-color: var(--color-blue);
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 64, 133, 0.15);
}

/* Right side Card rendering stage */
.editor-right-column {
    display: flex;
    justify-content: center;
}

.editor-card-stage {
    width: var(--card-width);
    height: var(--card-height);
    position: relative;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    background: #0f172a;
    overflow: hidden;
}

/* Remove absolute position when inside editor stage */
.editor-card-stage .deck-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-shadow: none;
    border: none;
}

/* ==========================================================================
   OCCASION CARD TEMPLATES STYLING
   ========================================================================== */
.card-content {
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.card-logo-box {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0; /* Prevents the logo box from shrinking inside flex layouts */
}

.card-logo-image {
    height: 18px;
    width: auto;
    display: block;
    max-width: none; /* Prevents max-width rules from squishing the image width */
}

.card-badge {
    font-family: var(--font-title);
    font-size: 0.58rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 1px;
    color: #ffffff;
}

.card-middle {
    position: relative;
    z-index: 10;
    margin: auto 0;
}

.card-greeting-msg {
    font-size: 0.8rem;
    color: #cbd5e1;
    max-width: 90%;
    margin: 15px auto 0;
    font-weight: 300;
    line-height: 1.5;
    text-align: center;
}

.card-bottom {
    text-align: center;
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
}

.card-bottom-name {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.card-bottom-title {
    font-family: var(--font-title);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-yellow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-bottom-corp {
    font-size: 0.52rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
    width: 100%;
    display: block;
}

/* 1. Eid Mubarak Template */
.bg-eid {
    background: linear-gradient(135deg, #020617 0%, #0c1530 40%, #001233 100%);
}

.eid-shapes {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    pointer-events: none;
    opacity: 0.8;
}

.eid-crescent {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: -10px 10px 0 0 #ffeb99;
    filter: drop-shadow(0 0 8px rgba(254, 207, 114, 0.35));
}

.bg-eid .greetings-title-en {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 4px;
    line-height: 1;
    text-align: center;
}

.bg-eid .greetings-sub-en {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-yellow);
    letter-spacing: 2.5px;
    margin-top: 2px;
    text-align: center;
}

/* 2. Pohela Boishakh Template */
.bg-boishakh {
    background: linear-gradient(135deg, #B21F2D 0%, #d84a0d 60%, #eab308 100%);
}

.boishakh-shapes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 90%;
    pointer-events: none;
    opacity: 0.8;
}

.boishakh-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    color: #ffffff;
    display: inline-block;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.bg-boishakh .greetings-title-bn {
    font-family: var(--font-bengali);
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
    line-height: 1.2;
}

.bg-boishakh .greetings-sub-en {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-yellow);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
}

/* 3. Victory Day Template */
.bg-victory {
    background: linear-gradient(135deg, #022c22 0%, #064e3b 60%, #0f172a 100%);
}

.victory-shapes {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 45%;
    pointer-events: none;
    opacity: 0.75;
}

.bg-victory .greetings-title-en {
    font-family: var(--font-title);
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 3px;
    line-height: 1.1;
    text-align: center;
}

.bg-victory .greetings-sub-en {
    font-family: var(--font-title);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-yellow);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: center;
}

.bg-victory .greetings-title-bn {
    font-family: var(--font-bengali);
    font-size: 1.6rem;
    font-weight: 700;
    color: #f43f5e;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 4. Women's Day Template */
.bg-womens-day {
    background: linear-gradient(135deg, #3b0764 0%, #701a75 60%, #1e1b4b 100%);
}

.women-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.women-icon {
    font-size: 2.3rem;
    color: var(--color-yellow);
    margin-bottom: 6px;
    text-align: center;
}

.bg-womens-day .greetings-title-en {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
    line-height: 1.1;
    text-align: center;
}

.bg-womens-day .greetings-sub-en {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f472b6;
    letter-spacing: 1.5px;
    text-align: center;
}

/* 5. Corporate Template */
.bg-corporate {
    background: linear-gradient(135deg, #002c5c 0%, #03152b 60%, #010710 100%);
}

.corp-shapes {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.corp-icon {
    font-size: 2.3rem;
    color: var(--color-yellow);
    margin-bottom: 8px;
    text-align: center;
}

.bg-corporate .greetings-title-en {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-align: center;
}

.bg-corporate .greetings-sub-en {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE DESIGN MEDIA QUERIES
   ========================================================================== */
@media (max-width: 991px) {
    .navbar-custom {
        padding: 15px 20px;
    }
    
    .editor-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-panel {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
    
    .editor-right-column {
        margin-top: 10px;
    }
    
    .deck-stage {
        flex-direction: column;
        gap: 30px;
        min-height: 520px;
    }
    
    .deck-nav-btn span {
        display: none; /* Keep icon only on mobile */
    }
}

@media (max-width: 640px) {
    .navbar-custom {
        flex-direction: column;
        gap: 12px;
        padding: 15px 10px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .deck-container {
        transform: scale(0.85);
        margin: -35px 0;
    }
    
    .deck-card.prev {
        transform: translate3d(-60px, 0, -80px) rotateY(12deg) scale(0.85);
    }
    
    .deck-card.next {
        transform: translate3d(60px, 0, -80px) rotateY(-12deg) scale(0.85);
    }
    
    .deck-card.prev-2, .deck-card.next-2 {
        display: none; /* Hide edge cards on mobile */
    }
    
    .editor-card-stage {
        transform: scale(0.85);
        margin: -35px 0;
    }
}

/* Image Preview Modal Fallback Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.7); /* Dark semi-transparent backdrop */
    backdrop-filter: blur(8px); /* Blur behind the popup */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Topmost layer */
    padding: 20px;
    box-sizing: border-box;
}

/* Modal open transition style */
.modal-overlay.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 440px; /* Match our card width nicely */
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    text-align: center;
    position: relative;
    box-sizing: border-box;
    animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: 300;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--color-red);
}

.modal-content h4 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-image-wrapper {
    width: 100%;
    max-width: 320px; /* Slightly scaled preview */
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
}

.modal-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    user-select: all; /* Make it easy to select/copy */
}

.modal-instruction {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
    padding: 0 10px;
}

.modal-instruction strong {
    color: var(--color-blue);
}

.modal-instruction i {
    margin-right: 5px;
}

/* Detect and toggle instructions based on desktop/mobile user-agent */
.modal-instruction.desktop-instr {
    display: block;
}
.modal-instruction.mobile-instr {
    display: none;
}

body.mobile-device .modal-instruction.desktop-instr {
    display: none;
}
body.mobile-device .modal-instruction.mobile-instr {
    display: block;
}

/* Animations */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}