/* ============================================
   Quiz System Styles
   Shared styles for all quiz-related pages
   ============================================ */

/* === Card Hover Override === */
.card:hover {
    transform: translateY(0) !important;
    box-shadow: 0 15px 15px rgba(0,0,0,0.1) !important;
}

/* === Common Animations === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes flame {
    0%, 100% {
        transform: scale(1) rotate(-5deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.05) rotate(-3deg);
    }
    75% {
        transform: scale(1.15) rotate(3deg);
    }
}

@keyframes checkMark {
    0% {
        transform: translateY(-50%) scale(0);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

@keyframes enablePulse {
    0% {
        box-shadow: 0 4px 15px rgba(var(--brand-color-rgb), 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(var(--brand-color-rgb), 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(var(--brand-color-rgb), 0.3);
    }
}

@keyframes progressPulse {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

@keyframes selectBounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1.02);
    }
}

/* === Fire Emoji Animation === */
.fire-emoji {
    display: inline-block;
    animation: flame 1.5s ease-in-out infinite;
}

/* === Container Styling === */
.quiz-container,
.quiz-list-container,
.results-container {
    min-height: 100vh;
    padding: 2rem 0;
    margin-top: -1.5rem;
}

/* === Card Styling === */
.quiz-card,
.quiz-list-card,
.results-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    animation: slideUp 0.5s ease-out;
}

/* === Header Styling === */
.quiz-header,
.quiz-list-header,
.results-header {
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 10) 50%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.results-header {
    padding: 2.5rem 2rem;
}

.quiz-header::before,
.quiz-list-header::before,
.results-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(45deg);
}

.quiz-header h1,
.quiz-list-header h1,
.results-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    color: white;
}

.results-header h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.quiz-header p,
.quiz-list-header p,
.results-header p {
    opacity: 0.95;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* === Progress Bar Styling === */
.progress {
    height: 30px;
    border-radius: 15px;
    background-color: #f0f0f0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    background: linear-gradient(90deg, var(--brand-color), rgba(var(--brand-color-rgb), 0.8));
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(var(--brand-color-rgb), 0.4);
}

.progress-animated {
    animation: progressPulse 0.5s ease;
}

/* === Question Block Styling === */
.question-block {
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

.question-block h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.4rem;
}

/* === Answer Options Styling === */
.answer-option {
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.answer-label {
    display: block;
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.answer-label:hover {
    background: #fff;
    border-color: var(--brand-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(var(--brand-color-rgb), 0.2);
}

.answer-radio {
    position: absolute;
    opacity: 0;
}

.answer-radio:checked + .answer-label {
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 0.8) 100%);
    color: white;
    border-color: var(--brand-color);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(var(--brand-color-rgb), 0.3);
}

.answer-radio:checked + .answer-label::before {
    content: '✓';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: checkMark 0.3s ease;
}

.answer-option.selected .answer-label {
    animation: selectBounce 0.3s ease;
}

/* === Button Styling === */
.quiz-btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 0.8) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(var(--brand-color-rgb), 0.3);
}

.quiz-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--brand-color-rgb), 0.4);
}

.quiz-btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.quiz-btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
}

.quiz-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.animated-enable {
    animation: enablePulse 0.5s ease;
}

/* === Email Form Styling === */
#email-form {
    padding: 2rem;
}

#email-form h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 2rem;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-color-rgb), 0.25);
}

/* === Loading Spinner Styling === */
#loading-spinner {
    padding: 4rem 2rem;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.4rem;
}

.spinner-border.text-primary {
    color: var(--brand-color) !important;
}

#loading-spinner p {
    color: #6c757d;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    font-weight: 500;
}

/* === Custom Radio Group === */
.custom-radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.custom-radio {
    flex: 1;
}

.custom-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.custom-radio label {
    display: block;
    padding: 1rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.custom-radio input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 0.8) 100%);
    color: white;
    border-color: var(--brand-color);
}

.custom-radio label:hover {
    border-color: var(--brand-color);
    transform: translateY(-2px);
}

/* === Custom Alert Styling === */
.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 9999;
    transition: transform 0.3s ease;
}

.custom-alert.show {
    transform: translateX(-50%) translateY(0);
}

.custom-alert-content {
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--brand-color);
}

.custom-alert-content i {
    color: var(--brand-color);
    font-size: 1.5rem;
}

.custom-alert-content p {
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
}

/* === Quiz List Specific Styles === */
.quiz-item {
    display: block;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.quiz-item:hover {
    background: white;
    border-color: var(--brand-color);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(var(--brand-color-rgb), 0.2);
    text-decoration: none;
}

.quiz-item::before {
    content: '🔥';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.quiz-item:hover::before {
    right: 20px;
    opacity: 0.2;
}

.quiz-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.quiz-item-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.quiz-item-cta {
    color: var(--brand-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-item-description {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.quiz-item-stats {
    color: #adb5bd;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-item-stats i {
    color: var(--brand-color);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--brand-color);
    margin-bottom: 1rem;
}

.empty-state-message {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* === Quiz Results Specific Styles === */
.spice-level-display {
    background: linear-gradient(135deg, rgba(var(--brand-color-rgb), 0.05) 0%, rgba(var(--brand-color-rgb), 0.1) 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(var(--brand-color-rgb), 0.1);
}

.spice-level-display::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: rgba(var(--brand-color-rgb), 0.1);
    border-radius: 50%;
}

.spice-level-display::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: rgba(var(--brand-color-rgb), 0.08);
    border-radius: 50%;
}

.spice-level-emojis {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.spice-title {
    color: var(--brand-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spice-description {
    color: #6c757d;
    font-size: 1.2rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* === Share Section Styling === */
.share-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

.share-section h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* === Category Cards === */
.category-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
    border: 2px solid transparent;
    background: white;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--brand-color);
}

.category-card .card-body {
    padding: 1.5rem;
}

.category-card .card-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.category-card .btn {
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 0.8) 100%);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.category-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--brand-color-rgb), 0.3);
}

/* === Creator Cards Section === */
.creators-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.creators-section h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

/* === CTA Section === */
.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(var(--brand-color-rgb), 0.03) 0%, rgba(var(--brand-color-rgb), 0.08) 100%);
    border-radius: 20px;
    margin: 2rem 0;
}

.cta-section h4 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.cta-btn-primary {
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 0.8) 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(var(--brand-color-rgb), 0.3);
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--brand-color-rgb), 0.4);
    color: white;
}

.cta-btn-outline {
    background: transparent;
    color: var(--brand-color);
    border: 2px solid var(--brand-color);
}

.cta-btn-outline:hover {
    background: var(--brand-color);
    color: white;
    transform: translateY(-3px);
}

.cta-btn-secondary {
    background: #6c757d;
    color: white;
}

.cta-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
    color: white;
}

/* === Social Media Section === */
.social-section {
    text-align: center;
    padding: 2rem;
    border-top: 2px solid #f0f0f0;
    margin-top: 3rem;
}

.social-section h5 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

/* === Divider Styling === */
.fancy-divider {
    position: relative;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-color), transparent);
    margin: 3rem 0;
}

.fancy-divider::before {
    content: '🔥';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 1rem;
    font-size: 1.5rem;
}

/* === Mobile Responsive === */
@media (max-width: 576px) {
    .hide-mobile {
        display: none;
    }

    .spice-level-emojis {
        font-size: 2.5rem;
    }
}
