/* ================================================
   Tweet Performance Predictor — Shared Styles
   style.css
   ================================================ */

:root {
    --navy:        #1e3a5f;
    --navy-mid:    #24497a;
    --navy-light:  #2d5a96;
    --amber:       #f59e0b;
    --amber-dark:  #d97706;
    --amber-pale:  #fffbeb;
    --slate-bg:    #f4f6f9;
    --slate-card:  #ffffff;
    --slate-border:#e2e8f0;
    --text-dark:   #1a2a3a;
    --text-mid:    #4a6280;
    --text-light:  #7a95b0;
    --green-ok:    #059669;
    --red-warn:    #dc2626;
    --yellow-mid:  #d97706;
}

/* ── Base ── */
* { font-family: 'DM Sans', sans-serif; box-sizing: border-box; }
h1, h2, h3, h4 { font-family: 'Sora', sans-serif; }

body {
    background-color: var(--slate-bg);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(30,58,95,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(245,158,11,0.05) 0%, transparent 60%);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* ── Header ── */
.gradient-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}
.gradient-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(245,158,11,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 90%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.gradient-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--amber) 0%, var(--amber-dark) 100%);
}

/* ── Cards ── */
.card {
    background: var(--slate-card);
    border-radius: 0.875rem;
    box-shadow: 0 1px 3px rgba(30,58,95,0.08), 0 4px 12px rgba(30,58,95,0.05);
    border: 1px solid var(--slate-border);
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 2px 8px rgba(30,58,95,0.12), 0 8px 24px rgba(30,58,95,0.07);
}
.card-pro {
    background: var(--slate-card);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(30,58,95,0.14), 0 1px 4px rgba(30,58,95,0.08);
    border: 2px solid var(--amber);
    position: relative;
}

/* ── Buttons ── */
.btn-primary {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(30,58,95,0.25);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
    box-shadow: 0 4px 16px rgba(30,58,95,0.35);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-accent {
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
    color: var(--navy);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245,158,11,0.30);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-accent:hover {
    box-shadow: 0 4px 16px rgba(245,158,11,0.45);
    transform: translateY(-1px);
}

.btn-cta {
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
    color: var(--navy);
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    box-shadow: 0 4px 16px rgba(245,158,11,0.40);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
}
.btn-cta:hover {
    box-shadow: 0 6px 24px rgba(245,158,11,0.55);
    transform: translateY(-2px);
}
.btn-cta:active { transform: translateY(0); }

.btn-outline {
    background: white;
    color: var(--navy);
    border: 1.5px solid var(--navy-light);
    transition: all 0.2s;
    cursor: pointer;
}
.btn-outline:hover {
    background: var(--navy);
    color: white;
}

/* ── Form Elements ── */
textarea, select, input[type="text"], input[type="email"], input[type="password"] {
    border-color: var(--slate-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fafcff;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-style: solid;
    border-width: 2px;
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'DM Sans', sans-serif;
}
textarea:focus, select:focus, input:focus {
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(45,90,150,0.12);
    outline: none;
    background: #fff;
}

/* ── Score Colors ── */
.score-value-overall  { color: var(--navy); }
.score-value-engage   { color: var(--green-ok); }
.score-value-reach    { color: var(--navy-light); }
.score-value-viral    { color: var(--amber-dark); }

/* ── Breakdown Items ── */
.breakdown-good  { border-color: var(--green-ok);  background: #f0fdf4; color: #14532d; }
.breakdown-mid   { border-color: var(--yellow-mid); background: #fffbeb; color: #78350f; }
.breakdown-bad   { border-color: var(--red-warn);  background: #fef2f2; color: #7f1d1d; }

/* ── Suggestions ── */
.suggestions-box {
    background: var(--amber-pale);
    border-left: 4px solid var(--amber);
}
.suggestions-box h3 { color: #78350f; }

/* ── Rewrite ── */
.rewrite-item {
    border-left: 4px solid var(--navy-light);
    background: #eff4ff;
    color: var(--navy);
}

/* ── Example Tweets ── */
.example-tweet {
    cursor: pointer;
    transition: all 0.25s;
    border-radius: 0.75rem;
}
.example-tweet:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30,58,95,0.14);
}
#highScoreExample {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1.5px solid #6ee7b7;
}
#lowScoreExample {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fcd34d;
}

/* ── Estimated Metrics ── */
.metric-likes    { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.metric-retweets { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.metric-replies  { background: linear-gradient(135deg, #eff6ff, #dbeafe); }

/* ── Tooltip ── */
.tooltip { position: relative; display: inline-block; }
.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--navy);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}
.tooltip:hover .tooltiptext { visibility: visible; opacity: 1; }

/* ── Details/Summary ── */
details summary { list-style: none; padding-bottom: 1rem; }
details summary::-webkit-details-marker { display: none; }
details summary:after { content: ' [+]'; float: right; font-size: 1.2rem; color: var(--navy-light); }
details[open] summary:after { content: ' [−]'; }

/* ── Footer ── */
footer { border-top-color: var(--slate-border); }
footer a { color: var(--navy-light); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--amber-dark); }

/* ── Section Accent ── */
.section-accent { border-left: 3px solid var(--amber); padding-left: 0.6rem; }

/* ── Badges ── */
.badge-info {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    color: #dce9f7;
}
.badge-most-popular {
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
    color: var(--navy);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 4px 14px;
    border-radius: 99px;
}

/* ── Pro Gate Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-box {
    background: var(--slate-card);
    border-radius: 1rem;
    border: 2px solid var(--amber);
    padding: 2rem;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(30,58,95,0.2);
    position: relative;
}
.modal-box h3 {
    color: var(--navy);
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}
.modal-box p {
    color: var(--text-mid);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text-dark); }
.license-input {
    font-family: 'DM Mono', monospace, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
    color: var(--navy);
    font-size: 0.65rem;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    padding: 2px 8px;
    border-radius: 99px;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.04em;
}

/* ── Pro Feature Lock Icon ── */
.feature-locked {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}
.lock-icon {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.85em;
    vertical-align: middle;
}

/* ── History Table ── */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.history-table th {
    background: var(--navy);
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
}
.history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--slate-border);
    color: var(--text-dark);
    vertical-align: middle;
}
.history-table tr:nth-child(even) td { background: var(--slate-bg); }
.history-table tr:hover td { background: #eef2f8; }

/* ── Urgency Bar ── */
.urgency-bar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-bottom: 3px solid var(--amber);
}

/* ── Pricing ── */
.price-strike {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1.1rem;
}
.spots-left {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    display: inline-block;
}
.testimonial {
    background: var(--slate-card);
    border-left: 4px solid var(--amber);
    border-radius: 0 0.75rem 0.75rem 0;
}
.guarantee {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #6ee7b7;
    border-radius: 0.875rem;
}
.sticky-cta {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--navy);
    border-top: 3px solid var(--amber);
    padding: 0.875rem 1.25rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── Misc ── */
.check-icon { color: var(--amber-dark); }
.modal-header-accent { color: var(--navy-light); }
#liveFeedback span { font-size: 0.72rem; font-weight: 600; }
#performanceTierBox {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-left: 4px solid var(--amber);
}

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--slate-border); padding: 1rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-question:hover { color: var(--navy-light); }
.faq-toggle { font-size: 1.25rem; color: var(--navy-light); flex-shrink: 0; line-height: 1; }
.faq-answer { color: var(--text-mid); font-size: 0.92rem; margin-top: 0.6rem; line-height: 1.65; display: none; }