/* Easy Quiz Frontend */

* {
    box-sizing: border-box;
}

.eq-quiz {
    max-width: 650px;
    margin: 40px auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Header */
.eq-header {
    text-align: center;
    margin-bottom: 35px;
}

.eq-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #1a202c;
    letter-spacing: -0.5px;
}

/* Progress */
.eq-progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.eq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.eq-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* Questions */
.eq-q {
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.eq-q-image {
    margin-bottom: 25px;
    text-align: center;
}

.eq-q-image img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

.eq-q-text {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 30px;
    line-height: 1.5;
    text-align: center;
}

/* Options */
.eq-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.eq-opt {
    position: relative;
    display: block;
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #334155;
    overflow: hidden;
}

.eq-opt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.eq-opt span,
.eq-opt {
    position: relative;
    z-index: 1;
}

.eq-opt:hover {
    border-color: #6366f1;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.eq-opt:active {
    transform: translateY(-1px);
}

.eq-opt.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

/* Likert specific */
.eq-likert-opt {
    text-align: center;
    font-weight: 600;
}

/* Results */
.eq-result {
    text-align: center;
    animation: fadeScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeScale {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.eq-result-content {
    padding: 40px 30px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.eq-result-img {
    margin-bottom: 25px;
}

.eq-result-img img {
    max-width: 200px;
    max-height: 180px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.eq-result-score {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.eq-result-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
    letter-spacing: -0.3px;
}

.eq-result-desc {
    font-size: 17px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Radar */
.eq-radar-box {
    max-width: 450px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.eq-radar-box canvas {
    max-height: 350px !important;
}

/* Category scores */
.eq-cat-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.eq-cat-score {
    padding: 20px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eq-cat-score:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.eq-cat-name {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eq-cat-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.eq-cat-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.eq-cat-val {
    font-size: 28px;
    font-weight: 800;
}

/* Restart button */
.eq-restart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    color: #6366f1;
    background: #ffffff;
    border: 2px solid #6366f1;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
}

.eq-restart:hover {
    background: #6366f1;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.eq-restart:active {
    transform: translateY(0);
}

/* Results page */
.eq-results-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
}

.eq-loading {
    text-align: center;
    padding: 60px;
    color: #64748b;
    font-size: 16px;
}

.eq-no-results {
    text-align: center;
    padding: 60px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    color: #64748b;
    font-size: 16px;
    border: 1px solid #e2e8f0;
}

/* Related */
.eq-related {
    margin-top: 50px;
    padding-top: 35px;
    border-top: 2px solid #e2e8f0;
}

.eq-related h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 25px;
}

.eq-related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.eq-related-item {
    display: block;
    padding: 22px 18px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: #334155;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.eq-related-item:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.eq-related-item h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

/* Error */
.eq-error {
    padding: 25px;
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    border-radius: 14px;
    color: #dc2626;
    text-align: center;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 640px) {
    .eq-quiz {
        margin: 20px 15px;
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .eq-title { 
        font-size: 26px; 
    }
    
    .eq-q-text { 
        font-size: 20px; 
    }
    
    .eq-opt { 
        padding: 16px 20px; 
        font-size: 15px;
        border-radius: 12px;
    }
    
    .eq-result-score { 
        font-size: 44px; 
    }
    
    .eq-result-title { 
        font-size: 24px; 
    }
    
    .eq-result-content {
        padding: 30px 20px;
    }
    
    .eq-cat-scores {
        grid-template-columns: 1fr 1fr;
    }
}
