/**
 * ✨ SHARE QUOTE AS IMAGE - Cosmic Instagram Story Design
 * Client-side quote card rendering for beautiful PNG exports
 * Size: 1080x1920 (Instagram Story dimensions)
 */

/* ═══════════════════════════════════════════════════════════
   QUOTE CARD WRAPPER - Main container for image generation
   ═══════════════════════════════════════════════════════════ */

.sq-wrapper {
    width: 1080px;
    height: 1920px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Cinzel', 'Georgia', serif;
}

/* ═══════════════════════════════════════════════════════════
   COSMIC BACKGROUND - Deep space gradient with mystical glow effects
   ═══════════════════════════════════════════════════════════ */

.sq-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 180, 219, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a1a 0%, #050510 100%);
    z-index: 1;
}

/* Mystical glowing orbs */
.sq-bg::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 180, 219, 0.2) 0%, transparent 70%);
    top: 10%;
    left: -10%;
    border-radius: 50%;
    filter: blur(100px);
    animation: pulse-glow 8s ease-in-out infinite;
}

.sq-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, transparent 70%);
    bottom: 10%;
    right: -10%;
    border-radius: 50%;
    filter: blur(100px);
    animation: pulse-glow 10s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════
   GLASSMORPHISM CARD - Central quote container with mystical glow
   ═══════════════════════════════════════════════════════════ */

.sq-card {
    position: relative;
    z-index: 10;
    width: 880px;
    min-height: 1160px;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 30, 0.95) 0%,
        rgba(15, 15, 45, 0.90) 50%,
        rgba(10, 10, 30, 0.95) 100%
    );
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border-radius: 40px;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 0 2px rgba(0, 180, 219, 0.5),
        0 0 40px rgba(0, 180, 219, 0.4),
        0 0 80px rgba(0, 180, 219, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 0 60px rgba(0, 180, 219, 0.05);
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 
            0 0 0 2px rgba(0, 180, 219, 0.5),
            0 0 40px rgba(0, 180, 219, 0.4),
            0 0 80px rgba(0, 180, 219, 0.2),
            0 8px 32px rgba(0, 0, 0, 0.6),
            inset 0 0 60px rgba(0, 180, 219, 0.05);
    }
    50% { 
        box-shadow: 
            0 0 0 2px rgba(0, 180, 219, 0.7),
            0 0 60px rgba(0, 180, 219, 0.5),
            0 0 100px rgba(0, 180, 219, 0.3),
            0 8px 32px rgba(0, 0, 0, 0.6),
            inset 0 0 80px rgba(0, 180, 219, 0.08);
    }
}

/* Subtle gradient overlay for depth */
.sq-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    background: linear-gradient(
        135deg,
        rgba(0, 180, 219, 0.05) 0%,
        transparent 50%,
        rgba(138, 43, 226, 0.05) 100%
    );
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   LABEL & TEXT ELEMENTS
   ═══════════════════════════════════════════════════════════ */

.sq-label {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: rgba(100, 200, 255, 0.85);
    margin-bottom: 70px;
    text-align: center;
    font-family: 'Cinzel', serif;
    text-shadow: 
        0 0 20px rgba(0, 180, 219, 0.6),
        0 0 40px rgba(0, 180, 219, 0.3);
}

.sq-quote-text {
    font-size: 48px;
    line-height: 1.45;
    color: #F5F5F5;
    text-align: center;
    max-width: 740px;
    margin: 0 auto 70px;
    font-family: 'EB Garamond', 'Crimson Pro', 'Georgia', serif;
    font-weight: 400;
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 180, 219, 0.1);
    word-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   DECORATIVE DIVIDER - Mystical separator
   ═══════════════════════════════════════════════════════════ */

.sq-divider {
    width: 160px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 100, 0.7) 50%,
        transparent 100%
    );
    margin: 50px 0;
    position: relative;
}

.sq-divider::before,
.sq-divider::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 215, 100, 0.85);
    font-size: 18px;
    text-shadow: 0 0 15px rgba(255, 215, 100, 0.5);
}

.sq-divider::before {
    left: -28px;
}

.sq-divider::after {
    right: -28px;
}

/* ═══════════════════════════════════════════════════════════
   AUTHOR SIGNATURE - Golden mystical text
   ═══════════════════════════════════════════════════════════ */

.sq-author {
    font-size: 34px;
    font-weight: 600;
    color: #FFD76B;
    text-align: center;
    margin-top: 30px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 
        0 0 25px rgba(255, 215, 100, 0.5),
        0 0 50px rgba(255, 215, 100, 0.2),
        0 2px 10px rgba(0, 0, 0, 0.7);
}

/* ═══════════════════════════════════════════════════════════
   BRANDING FOOTER - App name & URL
   ═══════════════════════════════════════════════════════════ */

.sq-brand {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.sq-brand-pill {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 15, 40, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 50px;
    border: 2px solid rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(99, 102, 241, 0.2);
    font-size: 32px;
    font-weight: 600;
    color: #FFFFFF;
    font-family: 'Cinzel', serif;
}

.sq-brand-icon {
    font-size: 40px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6));
}

.sq-brand-url {
    font-size: 26px;
    color: rgba(168, 85, 247, 0.9);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   SHARE MODAL - Preview & save on mobile
   ═══════════════════════════════════════════════════════════ */

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.share-modal-content {
    position: relative;
    z-index: 100000;
    background: rgba(15, 15, 40, 0.95);
    border-radius: 24px;
    padding: 32px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(99, 102, 241, 0.4);
}

.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #FFFFFF;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100001;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.share-modal-content h3 {
    font-size: 28px;
    color: #FFFFFF;
    margin: 0 0 12px 0;
    font-family: 'Cinzel', serif;
    text-align: center;
}

.share-modal-instruction {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    text-align: center;
}

.share-quote-preview {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
}

.share-modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.share-modal-actions .btn {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS - Font scaling for long quotes
   ═══════════════════════════════════════════════════════════ */

/* These classes are dynamically applied by JS based on quote length */
.sq-quote-text.sq-text-small {
    font-size: 36px;
    line-height: 1.3;
}

.sq-quote-text.sq-text-medium {
    font-size: 44px;
    line-height: 1.32;
}

.sq-quote-text.sq-text-large {
    font-size: 52px;
    line-height: 1.35;
}
