/* FFN Spin Wheel — CSS
   Theme tokens: --primary-color:#241164; --secondary-color:#e76c1e; --primary-light:#eae1f9
*/

.ffn-sw-wrap {
    font-family: "Google Sans Flex", sans-serif;
    color: #0f0f0f;
}

/* ── HERO ─────────────────────────────────────────── */
.ffn-sw-hero {
    background: linear-gradient(135deg, #241164 0%, #3d1f8e 60%, #e76c1e 100%);
    padding: 3rem 1rem 2.5rem;
    text-align: center;
    border-radius: 0 0 24px 24px;
}
.ffn-sw-hero-inner { max-width: 700px; margin: 0 auto; }
.ffn-sw-badge {
    display: inline-block;
    background: #e76c1e;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.ffn-sw-hero-title {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 0 0 10px;
    line-height: 1.2;
}
.ffn-sw-hero-sub {
    color: rgba(255,255,255,.85);
    font-size: 1rem;
    margin-bottom: 20px;
}
.ffn-sw-login-cta {
    display: inline-block;
    background: #e76c1e;
    color: #fff;
    padding: .7rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background .2s;
}
.ffn-sw-login-cta:hover { background: #c9560e; }

/* ── MAIN LAYOUT ──────────────────────────────────── */
.ffn-sw-main-layout {
    display: flex;
    gap: 28px;
    max-width: 1100px;
    margin: 28px auto 0;
    padding: 0 16px;
    align-items: flex-start;
}
.ffn-sw-wheel-col { flex: 1 1 0; min-width: 0; }
.ffn-sw-sidebar   { width: 320px; flex-shrink: 0; }

/* ── USER STATUS BAR ──────────────────────────────── */
.ffn-sw-user-bar {
    background: #eae1f9;
    border: 1px solid #c8b8f0;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}
.ffn-sw-status-ok   { color: #2e7d32; font-weight: 600; }
.ffn-sw-status-wait { color: #c62828; font-weight: 600; }

/* ── WHEEL CANVAS ─────────────────────────────────── */
.ffn-sw-canvas-wrap { text-align: center; }
.ffn-sw-wheel-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}
.ffn-sw-wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #e76c1e;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
    line-height: 1;
}
#ffn-spin-canvas {
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(36,17,100,.3), 0 2px 8px rgba(0,0,0,.15);
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── SPIN BUTTON ──────────────────────────────────── */
.ffn-sw-btn-area { margin-top: 20px; }
.ffn-sw-btn {
    display: inline-block;
    padding: .9rem 2.5rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform .15s, background .2s;
    text-decoration: none;
    letter-spacing: .5px;
}
.ffn-sw-btn-spin {
    background: linear-gradient(135deg, #e76c1e, #ff8c42);
    color: #fff;
    box-shadow: 0 4px 16px rgba(231,108,30,.4);
    animation: ffn-pulse 2s infinite;
}
.ffn-sw-btn-spin:hover { transform: scale(1.04); }
.ffn-sw-btn-spin:disabled,
.ffn-sw-btn-disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
}
.ffn-sw-btn-login {
    background: #241164;
    color: #fff;
    box-shadow: 0 4px 16px rgba(36,17,100,.3);
}
.ffn-sw-btn-login:hover { background: #1b0e52; }
.ffn-sw-spin-note {
    font-size: .8rem;
    color: #888;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ── ROLL ANIMATION ───────────────────────────────── */
.ffn-sw-roll {
    background: #241164;
    color: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    margin-top: 20px;
}
.ffn-sw-roll-label { font-size: .85rem; opacity: .8; margin-bottom: 8px; }
.ffn-sw-roll-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffce54;
    min-height: 36px;
    letter-spacing: 1px;
    transition: all .05s;
}

/* ── RESULT BOX ───────────────────────────────────── */
.ffn-sw-result {
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    margin-top: 20px;
    animation: ffn-fadeIn .4s ease;
}
.ffn-sw-result.won {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 2px solid #2e7d32;
}
.ffn-sw-result.lost {
    background: #f5f5f5;
    border: 1px solid #ddd;
}
.ffn-sw-result .result-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.ffn-sw-result.won .result-title { color: #2e7d32; }
.ffn-sw-result.lost .result-title { color: #555; }
.ffn-sw-result .result-code {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: #241164;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    letter-spacing: 3px;
    margin: 12px 0;
    display: inline-block;
    user-select: all;
}
.ffn-sw-result .copy-btn {
    background: #e76c1e;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    margin-top: 8px;
}
.ffn-sw-result .copy-btn:hover { background: #c9560e; }
.ffn-sw-result .redeem-link {
    display: inline-block;
    margin-top: 10px;
    font-size: .85rem;
    color: #241164;
    text-decoration: underline;
}
.ffn-sw-result .result-sub { font-size: .9rem; color: #666; margin-top: 8px; }

/* ── HOW IT WORKS ─────────────────────────────────── */
.ffn-sw-howto {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 24px;
}
.ffn-sw-howto h3 { font-size: 1.1rem; margin-bottom: 14px; color: #241164; }
.ffn-sw-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.ffn-sw-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: .9rem;
}
.ffn-sw-step span {
    background: #241164;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: .85rem;
}
.ffn-sw-step p { margin: 0; color: #444; line-height: 1.4; }
.ffn-sw-tip {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: .88rem;
    color: #5d4037;
}

/* ── WINNERS SIDEBAR ──────────────────────────────── */
.ffn-sw-winners-box {
    background: #fff;
    border: 1px solid #eae1f9;
    border-radius: 12px;
    overflow: hidden;
}
.ffn-sw-winners-header {
    background: #241164;
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ffn-sw-refresh-btn {
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s;
}
.ffn-sw-refresh-btn:hover { background: rgba(255,255,255,.1); }
.ffn-sw-winners-list { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow-y: auto; }
.ffn-sw-winner-item {
    padding: 10px;
    margin-bottom: 0;
}
.ffn-sw-todays-winner-bar {
    margin-top: 20px;
}
.ffn-sw-today-card.ffn-sw-today-taken {
    background-color: #ffcdcd;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ffn-sw-winner-item:last-child { border-bottom: none; }
.ffn-sw-winner-icon { font-size: 1.1rem; flex-shrink: 0; }
.ffn-sw-winner-name { font-weight: 600; color: #241164; flex: 1; }
.ffn-sw-winner-prize { color: #2e7d32; font-size: .8rem; font-weight: 600; }
.ffn-sw-winner-time  { color: #aaa; font-size: .78rem; margin-left: auto; }
.ffn-sw-no-winners   { padding: 20px 16px; text-align: center; color: #888; font-size: .9rem; }

/* ── CROSS-SITE PROMO ─────────────────────────────── */
.ffn-sw-crosslinks-box {
    background: linear-gradient(135deg, #fff4ee, #fff);
    border: 1px solid #f0c8a0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.ffn-sw-crosslinks-header {
    font-weight: 700;
    color: #241164;
    font-size: 1rem;
    margin-bottom: 6px;
}
.ffn-sw-crosslinks-sub {
    font-size: .83rem;
    color: #888;
    margin-bottom: 12px;
}
.ffn-sw-crosslinks-list { display: flex; flex-direction: column; gap: 8px; }
.ffn-sw-crosslink-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e76c1e33;
    border-radius: 8px;
    padding: 10px 14px;
    text-decoration: none;
    color: #0f0f0f;
    transition: border-color .2s, transform .15s;
    flex-wrap: wrap;
}
.ffn-sw-crosslink-item:hover { border-color: #e76c1e; transform: translateX(2px); }
.ffn-sw-cl-name  { font-weight: 700; color: #241164; font-size: .9rem; }
.ffn-sw-cl-desc  { font-size: .8rem; color: #666; flex: 1; }
.ffn-sw-cl-arrow { margin-left: auto; color: #e76c1e; font-weight: 700; font-size: .85rem; white-space: nowrap; }

/* ── AD ZONE ──────────────────────────────────────── */
.ffn-sw-ad-zone {
    border: 1px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── FAQ ──────────────────────────────────────────── */
.ffn-sw-faq { background: #fafafa; margin-top: 40px; }

/* ── ANIMATIONS ───────────────────────────────────── */
@keyframes ffn-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(231,108,30,.4); }
    50%       { box-shadow: 0 4px 28px rgba(231,108,30,.7); transform: scale(1.02); }
}
@keyframes ffn-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ffn-spin-anim {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.ffn-sw-spinning { animation: ffn-spin-anim 0.4s linear infinite; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
    .ffn-sw-main-layout { flex-direction: column; }
    .ffn-sw-sidebar { width: 100%; }
    .ffn-sw-winners-list { max-height: 260px; }
}
@media (max-width: 600px) {
    .ffn-sw-steps { grid-template-columns: 1fr; }
    #ffn-spin-canvas { width: 300px; height: 300px; }
    .ffn-sw-hero { padding: 2rem 1rem 1.5rem; }
}
@media (max-width: 400px) {
    #ffn-spin-canvas { width: 260px; height: 260px; }
    .ffn-sw-btn { padding: .8rem 1.5rem; font-size: 1rem; }
}

/* ── TODAY'S WINNER BAR ───────────────────────────── */
.ffn-sw-todays-winner-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff3e0;
    border-bottom: 2px solid #e76c1e;
    flex-wrap: wrap;
    font-size: .92rem;
}
.ffn-sw-todays-winner-bar.ffn-sw-tw-available {
    background: #e8f5e9;
    border-bottom-color: #2e7d32;
}
.ffn-sw-tw-icon { font-size: 1.3rem; }
.ffn-sw-tw-text { flex: 1; color: #333; }
.ffn-sw-tw-next { color: #e76c1e; font-weight: 600; font-size: .85rem; white-space: nowrap; }

/* ── TODAY'S WINNER CARD (sidebar) ───────────────── */
.ffn-sw-today-card {
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.ffn-sw-today-taken {
    background: linear-gradient(135deg, #241164, #3d1f8e);
    color: #fff;
}
.ffn-sw-today-open {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 2px solid #2e7d32;
}
.ffn-sw-today-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .8;
    margin-bottom: 6px;
}
.ffn-sw-today-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffce54;
    margin-bottom: 4px;
}
.ffn-sw-today-prize {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    margin-bottom: 10px;
}
.ffn-sw-today-msg {
    font-size: .83rem;
    color: rgba(255,255,255,.75);
    background: rgba(0,0,0,.2);
    padding: 8px 12px;
    border-radius: 6px;
}
