/* ===== STORY CARD (for html2canvas rendering) ===== */
/* Fixed 1080x1920 — Instagram Stories format */
/* Uses absolute px values — NOT rem/em */
/* Avoids backdrop-filter and complex CSS that html2canvas can't render */

.story-card {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1080px;
    height: 1920px;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #F0EEFF;
    z-index: -1;
}

.story-card__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, #0D0B18 0%, #150e28 30%, #1a1235 50%, #0D0B18 100%);
}

.story-card__orb {
    position: absolute;
    border-radius: 50%;
}

.story-card__orb--1 {
    width: 800px;
    height: 800px;
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, rgba(107, 63, 212, 0.5) 0%, transparent 70%);
}

.story-card__orb--2 {
    width: 600px;
    height: 600px;
    bottom: -100px;
    right: -150px;
    background: radial-gradient(circle, rgba(244, 120, 184, 0.3) 0%, transparent 70%);
}

.story-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 70px 60px 50px;
    height: 100%;
}

/* Header */
.story-card__header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.story-card__logo {
    font-size: 56px;
    line-height: 1;
}

.story-card__brand {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #C4A7FF 0%, #F478B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Result box */
.story-card__result-box {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(155, 115, 255, 0.15);
    border-radius: 40px;
    padding: 44px 40px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 0 60px rgba(155, 115, 255, 0.08), inset 0 0 30px rgba(155, 115, 255, 0.03);

.story-card__sticker {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 24px;
}

.story-card__result-label {
    font-size: 28px;
    font-weight: 500;
    color: rgba(240, 238, 255, 0.6);
    margin-bottom: 12px;
}

.story-card__style-name {
    font-size: 46px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #C4A7FF 0%, #F478B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scores */
.story-card__scores {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 36px;
}

.story-card__score-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.story-card__score-label {
    font-size: 26px;
    font-weight: 600;
    color: rgba(240, 238, 255, 0.65);
    width: 340px;
    flex-shrink: 0;
}

.story-card__score-bar {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

.story-card__score-fill {
    height: 100%;
    border-radius: 100px;
}

.story-card__score-fill--secure   { background: linear-gradient(90deg, #4ADE80, #22C55E); }
.story-card__score-fill--anxious  { background: linear-gradient(90deg, #FB923C, #F97316); }
.story-card__score-fill--avoidant { background: linear-gradient(90deg, #60A5FA, #3B82F6); }
.story-card__score-fill--fearful  { background: linear-gradient(90deg, #F87171, #EF4444); }

.story-card__score-value {
    font-size: 28px;
    font-weight: 800;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.story-card__score-value--secure   { color: #86EFAC; }
.story-card__score-value--anxious  { color: #FDBA74; }
.story-card__score-value--avoidant { color: #93C5FD; }
.story-card__score-value--fearful  { color: #FCA5A5; }

/* Strengths */
.story-card__strengths {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 32px 40px;
    margin-bottom: 30px;
}

.story-card__strengths-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #86EFAC;
    margin-bottom: 20px;
}

.story-card__strength-item {
    font-size: 26px;
    line-height: 1.5;
    color: rgba(240, 238, 255, 0.7);
    padding: 8px 0;
}

.story-card__strength-item::before {
    content: '✅ ';
}

/* Character */
.story-card__character {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(155, 115, 255, 0.2);
    border-radius: 30px;
    padding: 36px 40px;
    margin-bottom: 40px;
}

.story-card__character-img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    border: 3px solid rgba(155, 115, 255, 0.4);
    flex-shrink: 0;
    background: rgba(155, 115, 255, 0.15);
}

.story-card__character-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.story-card__character-label {
    font-size: 22px;
    font-weight: 600;
    color: rgba(240, 238, 255, 0.5);
}

.story-card__character-name {
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(135deg, #C4A7FF 0%, #F478B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.story-card__character-source {
    font-size: 24px;
    font-weight: 500;
    color: rgba(240, 238, 255, 0.45);
}

/* CTA */
.story-card__cta {
    text-align: center;
    margin-bottom: 30px;
    margin-top: auto;
}

.story-card__cta-text {
    font-size: 28px;
    font-weight: 500;
    color: rgba(240, 238, 255, 0.5);
    margin-bottom: 8px;
}

.story-card__cta-url {
    font-size: 40px;
    font-weight: 800;
    color: #C4A7FF;
    letter-spacing: -0.5px;
}

/* Footer / Author */
.story-card__footer {
    display: flex;
    align-items: center;
    gap: 20px;
}

.story-card__author-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(155, 115, 255, 0.5);
}

.story-card__author-text {
    font-size: 24px;
    font-weight: 500;
    color: rgba(240, 238, 255, 0.5);
    line-height: 1.4;
}

/* ===== STORY LOADING OVERLAY ===== */
.story-loading {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(13, 11, 24, 0.85);
}

.story-loading__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(155, 115, 255, 0.2);
    border-top-color: #9B73FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.story-loading__text {
    font-size: 15px;
    font-weight: 600;
    color: rgba(240, 238, 255, 0.65);
}

/* ===== STORY SHARE BUTTON ===== */
.btn--story {
    background: linear-gradient(135deg, #E040FB 0%, #9B73FF 50%, #536DFE 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 24px rgba(224, 64, 251, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.btn--story:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(224, 64, 251, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
    background-position: right center;
}

.btn--story:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(224, 64, 251, 0.35);
}
