/* S.E.C Frontend Cards - Apple Style */
.sec-poll-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    overflow: hidden;
    /* Limit width on dashboard desktop */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sec-poll-q {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 20px;
    line-height: 1.3;
}

.sec-poll-opt {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.sec-poll-opt:hover {
    background: #e8e8ed;
    transform: scale(1.02);
    padding-left: 22px;
    /* Slight slide effect */
}

.sec-poll-opt:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes secFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sec-fade-in {
    animation: secFadeIn 0.5s ease-out;
}

/* Results Bars */
.sec-bar-wrap {
    margin-bottom: 15px;
}

.sec-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.sec-bar-bg {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.sec-bar-fill {
    height: 100%;
    background: #0071e3;
    border-radius: 4px;
    animation: secFill 1s ease-out forwards;
    width: 0;
    /* Start at 0 for anim */
}

@keyframes secFill {
    from {
        width: 0;
    }
}

/* Coin Badge */
.sec-coin-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff8e1;
    color: #f59e0b;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Loading State */
.sec-voting {
    opacity: 0.7;
    pointer-events: none;
}

/* Mobile First */
@media (max-width: 600px) {
    .sec-poll-card {
        padding: 20px;
        margin: 15px auto;
        border-radius: 20px;
    }

    .sec-poll-q {
        font-size: 18px;
    }

    .sec-poll-opt {
        padding: 12px;
    }

    /* Ensure grid collapses on mobile */
    .sec-active-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .od-layout-item {
        margin-bottom: 20px;
    }
}

/* =========================================
   6. DASHBOARD GRID LAYOUT (Active Poll)
   ========================================= */
/* =========================================
   6. DASHBOARD GRID LAYOUT (Active Poll)
   ========================================= */
@media (min-width: 900px) {
    .sec-active-layout {
        display: grid;
        grid-template-columns: 1.2fr 1fr 1fr;
        /* Poll wider, others equal */
        gap: 25px;
        align-items: start;
    }



    .od-right-col {
        display: block;
        /* Restore visibility */
    }

    /* 1. Poll Card Styles (Slim & Inline) */
    .sec-poll-card {
        padding: 24px 20px;
        border-radius: 24px;
        background: #fff;
        height: 100%;
        /* Match grid height if we stretch */
        max-height: 360px;
        /* Fixed height to match Wallet + Buttons */
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center content vertically */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    .sec-poll-q {
        font-size: 16px;
        margin-bottom: 12px;
        font-weight: 700;
        text-align: center;
    }

    .sec-poll-options {
        overflow-y: auto;
        padding-right: 5px;
        max-height: 250px;
        scrollbar-width: none;
        /* Hide scrollbar for clean look */
    }

    .sec-poll-options::-webkit-scrollbar {
        display: none;
    }

    .sec-poll-opt {
        padding: 10px 15px;
        font-size: 13px;
        background: #f5f5f7;
        margin-bottom: 8px;
        border-radius: 12px;
        transition: transform 0.2s, background 0.2s;
    }

    .sec-poll-opt:hover {
        background: #e5e5ea;
        transform: scale(1.02);
    }

    /* 2. Activity Column Adjustments */
    .od-right-col .od-activity-hero {
        margin-bottom: 0 !important;
        height: 100%;
        max-height: 280px;
        /* Match Wallet/Poll */
        overflow: hidden;
    }

    .od-right-col .od-activity-scroll {
        max-height: 200px;
        overflow-y: auto;
    }

}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .sec-poll-card {
        padding: 16px;
        margin-bottom: 15px;
        border-radius: 16px;
    }

    .sec-poll-q {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .sec-poll-opt {
        padding: 12px 14px;
        font-size: 14px;
    }
}
/* =========================================
   7. POLL ENDED STATE
   ========================================= */

.sec-poll-card.poll-ended {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f7 100%);
}

.sec-poll-ended-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.sec-poll-card.poll-ended .sec-poll-q {
    padding-top: 20px;
}

.sec-poll-meta {
    font-size: 13px;
    color: #86868b;
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* =========================================
   8. TRIVIA CARD STYLES (FRONTEND)
   ========================================= */

.sec-trivia-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sec-trivia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sec-trivia-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.sec-trivia-badge.easy { background: #dcfce7; color: #16a34a; }
.sec-trivia-badge.medium { background: #fef3c7; color: #d97706; }
.sec-trivia-badge.hard { background: #fee2e2; color: #dc2626; }

.sec-trivia-category {
    font-size: 11px;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sec-trivia-question {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 24px;
    line-height: 1.4;
}

.sec-trivia-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sec-trivia-opt {
    background: #f5f5f7;
    border-radius: 14px;
    padding: 16px 20px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sec-trivia-opt:hover {
    background: #e8e8ed;
    transform: scale(1.02);
    border-color: #d1d5db;
}

.sec-trivia-opt.selected { border-color: #0071e3; background: #e0f2fe; }
.sec-trivia-opt.correct { border-color: #16a34a; background: #dcfce7; pointer-events: none; }
.sec-trivia-opt.correct::after { content: '✓'; margin-left: auto; color: #16a34a; font-weight: 700; font-size: 18px; }
.sec-trivia-opt.wrong { border-color: #dc2626; background: #fee2e2; pointer-events: none; }
.sec-trivia-opt.wrong::after { content: '✗'; margin-left: auto; color: #dc2626; font-weight: 700; font-size: 18px; }
.sec-trivia-opt.disabled { opacity: 0.6; pointer-events: none; }

.sec-trivia-opt-letter {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

.sec-trivia-opt.selected .sec-trivia-opt-letter { background: #0071e3; color: #fff; }
.sec-trivia-opt.correct .sec-trivia-opt-letter { background: #16a34a; color: #fff; }
.sec-trivia-opt.wrong .sec-trivia-opt-letter { background: #dc2626; color: #fff; }

/* Trivia Timer */
.sec-trivia-timer {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1d1d1f;
}

.sec-trivia-timer.urgent { color: #dc2626; animation: timerPulse 0.5s ease-in-out infinite; }
@keyframes timerPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* Trivia Reward Badge */
.sec-trivia-reward {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Trivia Result */
.sec-trivia-result { text-align: center; padding: 20px 0; }
.sec-trivia-result-icon { font-size: 60px; margin-bottom: 15px; animation: resultBounce 0.6s ease-out; }
@keyframes resultBounce { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.sec-trivia-result-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.sec-trivia-result-title.correct { color: #16a34a; }
.sec-trivia-result-title.wrong { color: #dc2626; }
.sec-trivia-result-coins { font-size: 18px; color: #92400e; font-weight: 700; background: #fef3c7; padding: 8px 20px; border-radius: 25px; display: inline-block; margin-top: 10px; }

.sec-trivia-explanation {
    background: #f0f9ff;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    text-align: left;
}

.sec-trivia-explanation-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #0369a1; margin-bottom: 8px; }
.sec-trivia-explanation-text { font-size: 14px; color: #1d1d1f; line-height: 1.5; }

/* Trivia Streak */
.sec-trivia-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
}

.sec-trivia-streak-fire { font-size: 20px; animation: fireFlicker 0.3s ease-in-out infinite alternate; }
@keyframes fireFlicker { from { transform: scale(1) rotate(-5deg); } to { transform: scale(1.1) rotate(5deg); } }

/* Mobile Trivia */
@media (max-width: 600px) {
    .sec-trivia-card { padding: 20px; border-radius: 20px; }
    .sec-trivia-question { font-size: 18px; padding-right: 50px; }
    .sec-trivia-opt { padding: 14px 16px; font-size: 14px; }
    .sec-trivia-opt-letter { width: 28px; height: 28px; font-size: 12px; }
}
