/**
 * PRO Frontend Styles
 * 
 * Styles for PRO features on the frontend
 */

/* Quiz Timer */
.livq-quiz-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.livq-quiz-timer.warning {
    background: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Fill in the Blanks - Enhanced */
.livq-fill-blanks-text {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.livq-blank-input:focus {
    outline: none;
    background: #fff !important;
    border-bottom-color: #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

/* Match the Pair - Premium Grid */
.livq-match-pair-grid {
    margin: 25px 0;
}

.livq-match-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.livq-match-item.selected {
    background: #eef2ff !important;
    border-color: #6366f1 !important;
    color: #4338ca !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.livq-match-item.matched {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
    cursor: default;
    opacity: 0.9;
    font-weight: 700 !important;
}

.livq-match-item.matched::after {
    content: '✓';
    float: right;
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Instructions Styling */
.livq-question-instruction {
    font-family: inherit;
    line-height: 1.5;
    animation: fadeInDown 0.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Drag and Drop Premium */
.livq-drag-source-item {
    background: #fff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.livq-drag-answer-box {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.livq-drag-answer-box.drag-over {
    border-color: #6366f1 !important;
    background: #f5f3ff !important;
    border-style: solid !important;
}

.livq-drag-answer-box.filled {
    border-style: solid !important;
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

/* Drag and Drop */
.livq-drag-drop-container {
    margin: 20px 0;
}

.livq-drag-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 6px;
    cursor: move;
    border: 2px solid #ddd;
    transition: all 0.3s;
}

.livq-drag-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.livq-drag-item.dragging {
    opacity: 0.5;
}

.livq-drag-item.drag-over {
    border-color: #667eea;
    border-style: dashed;
}

/* Leaderboard Widget */
.livq-leaderboard-widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.livq-leaderboard-widget h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.livq-leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.livq-leaderboard-entry:last-child {
    border-bottom: none;
}

.livq-leaderboard-entry.current-user {
    background: #e3f2fd;
    font-weight: 600;
    border-radius: 4px;
}

.livq-rank {
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
    min-width: 40px;
}

.livq-rank.top-3 {
    font-size: 24px;
}

/* User Badges Display */
.livq-user-badges-widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.livq-badges-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.livq-badge-display {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    transition: transform 0.3s;
}

.livq-badge-display:hover {
    transform: scale(1.05);
}

.livq-badge-display .badge-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.livq-badge-display .badge-name {
    font-size: 14px;
    font-weight: 600;
}

/* Custom Themes */
.livq-quiz-container.theme-dark {
    background: #1a1a1a;
    color: #fff;
}

.livq-quiz-container.theme-dark .livq-question {
    background: #2d2d2d;
    border-color: #444;
}

.livq-quiz-container.theme-dark .livq-option {
    background: #333;
    color: #fff;
    border-color: #555;
}

.livq-quiz-container.theme-dark .livq-option:hover {
    background: #444;
}

.livq-quiz-container.theme-minimal {
    background: #fff;
}

.livq-quiz-container.theme-minimal .livq-question {
    border: none;
    border-bottom: 1px solid #eee;
}

.livq-quiz-container.theme-vibrant {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.livq-quiz-container.theme-vibrant .livq-question {
    background: rgba(255, 255, 255, 0.95);
}

/* Progress Indicator */
.livq-progress-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
}

.livq-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.livq-progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .livq-quiz-timer {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 18px;
    }

    .livq-match-pair-container {
        grid-template-columns: 1fr;
    }

    .livq-badges-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .livq-blank-input {
        width: 100px;
    }
}