.peiq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.peiq-loading {
    text-align: center;
    padding: 60px 20px;
}

.peiq-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    animation: peiq-spin 1s linear infinite;
}

@keyframes peiq-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error handling styles */
.peiq-error-container {
    text-align: center;
    padding: 60px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 20px 0;
}

/* No quizzes message */
.peiq-no-quizzes {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.peiq-no-quizzes p {
    color: #6b7280;
    margin: 0 0 20px 0;
    font-size: 16px;
}

.peiq-error-message {
    color: #dc2626;
}

.peiq-error-message h3 {
    color: #dc2626;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.peiq-error-message p {
    color: #7f1d1d;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.peiq-retry-button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.peiq-retry-button:hover {
    background: #b91c1c;
}

.peiq-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.peiq-category-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.peiq-category-card:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
}

.peiq-category-card h3 {
    margin: 0 0 12px 0;
    color: #111827;
    font-size: 20px;
}

.peiq-category-card p {
    color: #6b7280;
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.peiq-quiz-count {
    color: #22c55e;
    font-weight: 600;
    font-size: 14px;
}

.peiq-quiz-list {
    margin-top: 20px;
}

.peiq-quiz-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.peiq-quiz-item:hover {
    border-color: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.peiq-quiz-item h4 {
    margin: 0 0 8px 0;
    color: #111827;
    font-size: 18px;
}

.peiq-quiz-item p {
    margin: 0 0 10px 0;
    color: #6b7280;
    font-size: 14px;
}

.peiq-quiz-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 13px;
    color: #9ca3af;
}

.peiq-quiz-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.peiq-quiz-meta .peiq-question-count:before {
    content: "❓";
    font-size: 11px;
}

.peiq-quiz-meta .peiq-estimated-time:before {
    content: "⏱️";
    font-size: 11px;
}

.peiq-back-button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.peiq-back-button:hover {
    color: #374151;
}

.peiq-quiz-welcome {
    text-align: center;
    padding: 40px 20px;
}

.peiq-quiz-title {
    font-size: 32px;
    margin: 0 0 20px 0;
    color: #111827;
}

.peiq-welcome-content {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.peiq-quiz-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.peiq-info-item {
    text-align: center;
}

.peiq-info-label {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 4px;
}

.peiq-info-item span:last-child {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.peiq-quiz-button {
    background: #22c55e;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.peiq-quiz-button:hover {
    background: #16a34a;
}

.peiq-quiz-header {
    margin-bottom: 30px;
}

.peiq-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 20px;
}

.peiq-progress {
    margin-bottom: 20px;
}

.peiq-progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.peiq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669 0%, #10b981 50%, #047857 100%);
    width: 0;
    transition: width 0.5s ease;
    position: relative;
    border-radius: 5px;
}

.peiq-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.peiq-progress-text {
    text-align: center;
    display: block;
    color: #6b7280;
    font-size: 14px;
}

.peiq-question-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    animation: questionSlideIn 0.5s ease-out;
}

@keyframes questionSlideIn {
    0% { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.peiq-question-text {
    font-size: 20px;
    color: #111827;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.peiq-question-media {
    margin-bottom: 24px;
}

.peiq-question-chart-container {
    margin: 20px 0;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#peiq-question-chart {
    max-width: 100%;
    height: 300px !important;
}

/* Media Attachments Styling */
.peiq-media-attachments {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.peiq-media-title {
    margin: 0 0 15px 0;
    color: #059669;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.peiq-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.peiq-media-item-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.peiq-media-item-card:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
    transform: translateY(-2px);
}

.peiq-media-link {
    display: flex;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

.peiq-media-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.peiq-media-info {
    flex: 1;
    min-width: 0;
}

.peiq-media-filename {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-word;
}

.peiq-media-description {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.peiq-media-size {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
}

.peiq-media-download {
    font-size: 20px;
    color: #059669;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.peiq-media-link:hover .peiq-media-download {
    opacity: 1;
}

.peiq-media-link:hover .peiq-media-filename {
    color: #059669;
}

/* Legacy media item support */
.peiq-media-item {
    display: inline-block;
    margin: 5px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.peiq-media-item:hover {
    border-color: #22c55e;
    color: #22c55e;
}

/* Responsive media grid */
@media (max-width: 768px) {
    .peiq-media-grid {
        grid-template-columns: 1fr;
    }
    
    .peiq-media-attachments {
        padding: 15px;
    }
    
    .peiq-media-link {
        padding: 10px;
    }
}

.peiq-answers {
    margin-bottom: 24px;
}

.peiq-answer-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #374151;
    position: relative;
    overflow: hidden;
}

.peiq-answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.1), transparent);
    transition: left 0.6s ease;
}

.peiq-answer-option:hover {
    border-color: #059669;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.peiq-answer-option:hover::before {
    left: 100%;
}

.peiq-answer-option.selected {
    border-color: #059669;
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
    transform: translateY(-1px);
}

/* Removed checkmark - no ::after content for selected answers */

.peiq-answer-option.correct {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    animation: correctPulse 0.6s ease;
}

.peiq-answer-option.incorrect {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    animation: incorrectShake 0.6s ease;
}

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

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.peiq-answer-option input[type="checkbox"],
.peiq-answer-option input[type="radio"] {
    margin-right: 12px;
}

.peiq-text-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.peiq-text-input:focus {
    outline: none;
    border-color: #22c55e;
}

.peiq-explanation {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 16px;
    margin-top: 20px;
}

.peiq-explanation h4 {
    margin: 0 0 8px 0;
    color: #92400e;
    font-size: 16px;
}

.peiq-explanation-text {
    margin: 0;
    color: #78350f;
    font-size: 14px;
    line-height: 1.5;
}

.peiq-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.peiq-nav-button {
    background: #22c55e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.peiq-nav-button:hover {
    background: #16a34a;
}

.peiq-nav-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.peiq-quiz-results {
    text-align: center;
    padding: 40px 20px;
}

.peiq-quiz-results h2 {
    font-size: 32px;
    color: #111827;
    margin: 0 0 40px 0;
}

.peiq-score-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.peiq-score-chart {
    max-width: 300px;
    margin: 0 auto;
}

.peiq-score-details {
    text-align: left;
}

.peiq-score-details h3 {
    margin: 0 0 16px 0;
    color: #374151;
}

.peiq-score-percentage {
    font-size: 48px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 20px;
}

.peiq-score-info p {
    margin: 8px 0;
    color: #6b7280;
}

.peiq-pass-fail {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.peiq-pass-fail.pass {
    background: #dcfce7;
    color: #14532d;
}

.peiq-pass-fail.fail {
    background: #fee2e2;
    color: #7f1d1d;
}

.peiq-review-section {
    margin: 40px 0;
    text-align: left;
}

.peiq-review-section h3 {
    margin-bottom: 20px;
    color: #111827;
}

.peiq-category-analysis {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 30px 0;
}

.peiq-category-analysis h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 20px;
}

.peiq-category-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.peiq-category-result:last-child {
    border-bottom: none;
}

.peiq-category-name {
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.peiq-category-score {
    font-weight: 500;
    margin: 0 20px;
    min-width: 80px;
    text-align: center;
}

.peiq-category-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.peiq-category-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.peiq-category-result.strong .peiq-category-fill {
    background: #22c55e;
}

.peiq-category-result.strong .peiq-category-score {
    color: #059669;
}

.peiq-category-result.moderate .peiq-category-fill {
    background: #f59e0b;
}

.peiq-category-result.moderate .peiq-category-score {
    color: #d97706;
}

.peiq-category-result.weak .peiq-category-fill {
    background: #ef4444;
}

.peiq-category-result.weak .peiq-category-score {
    color: #dc2626;
}

.peiq-improvement-suggestions {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 24px;
    margin: 30px 0;
}

.peiq-improvement-suggestions h3 {
    margin: 0 0 16px 0;
    color: #92400e;
    font-size: 18px;
}

.peiq-suggestions-list {
    margin: 0;
    padding-left: 20px;
}

.peiq-suggestions-list li {
    margin-bottom: 16px;
    color: #78350f;
    line-height: 1.5;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.peiq-advice {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
    line-height: 1.4;
}

.peiq-focus-areas h4,
.peiq-strengths-section h4 {
    color: #059669;
    margin: 0 0 12px 0;
    font-size: 16px;
}

.peiq-strengths-section {
    margin-top: 20px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 8px;
}

.peiq-strengths-section ul {
    margin: 0;
    padding-left: 20px;
}

.peiq-strengths-section li {
    color: #059669;
    margin-bottom: 8px;
}

.peiq-action-plan {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    line-height: 1.6;
}

.peiq-excellent {
    color: #059669;
    font-weight: 500;
    margin: 0;
}

.peiq-overall-suggestion {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 16px;
    margin-top: 20px;
    color: #0c4a6e;
    font-size: 14px;
}

.peiq-review-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.peiq-review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.peiq-review-item.peiq-review-correct {
    border-left: 4px solid #22c55e;
}

.peiq-review-item.peiq-review-incorrect {
    border-left: 4px solid #ef4444;
}

.peiq-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.peiq-review-number {
    font-weight: 700;
    color: #374151;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.peiq-review-status {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.peiq-review-correct .peiq-review-status {
    background: #dcfce7;
    color: #059669;
}

.peiq-review-incorrect .peiq-review-status {
    background: #fee2e2;
    color: #dc2626;
}

.peiq-review-question {
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.5;
}

.peiq-review-answers {
    margin-bottom: 16px;
}

.peiq-user-answer,
.peiq-correct-answer {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.peiq-user-answer {
    background: #f1f5f9;
    color: #475569;
}

.peiq-correct-answer {
    background: #f0fdf4;
    color: #166534;
}

.peiq-review-explanation {
    background: #fefce8;
    border: 1px solid #facc15;
    border-radius: 6px;
    padding: 12px;
    color: #713f12;
    font-size: 14px;
    line-height: 1.5;
}

.peiq-result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.peiq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.peiq-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.peiq-modal-content h2 {
    margin: 0 0 16px 0;
    color: #111827;
}

.peiq-modal-content p {
    color: #6b7280;
    margin-bottom: 24px;
}

.peiq-subscription-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.peiq-subscription-benefits li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: #374151;
}

.peiq-subscription-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.peiq-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
}

.peiq-modal-close:hover {
    color: #374151;
}

.peiq-blurred-content {
    filter: blur(10px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    position: relative;
}

.peiq-partial-blur {
    position: relative;
}

.peiq-partial-blur::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(3px);
    pointer-events: none;
}

.peiq-premium-content-wrapper {
    position: relative;
    margin-top: 30px;
}

.peiq-subscription-overlay {
    position: relative;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
}

.peiq-subscription-content h3 {
    font-size: 28px;
    margin: 0 0 16px 0;
    font-weight: 700;
}

.peiq-subscription-content p {
    font-size: 16px;
    margin: 0 0 24px 0;
    opacity: 0.9;
    line-height: 1.6;
}

.peiq-subscription-icon {
    font-size: 48px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.peiq-premium-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.peiq-premium-features li {
    padding: 8px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    opacity: 0.95;
}

.peiq-premium-features li:before {
    content: "✓";
    margin-right: 12px;
    font-weight: bold;
    color: #60a5fa;
    font-size: 16px;
}

.peiq-unlock-button {
    background: white !important;
    color: #059669 !important;
    font-weight: 700;
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.peiq-unlock-button:hover {
    background: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.peiq-celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 150, 105, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    animation: celebrationFadeIn 0.5s ease;
}

.peiq-celebration-content {
    text-align: center;
    color: white;
    animation: celebrationBounce 0.8s ease;
}

.peiq-celebration-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: celebrationSpin 1s ease;
}

.peiq-celebration-content h2 {
    font-size: 32px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.peiq-celebration-content p {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

@keyframes celebrationFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes celebrationBounce {
    0% { transform: scale(0.3) translateY(50px); opacity: 0; }
    50% { transform: scale(1.05) translateY(-10px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes celebrationSpin {
    0% { transform: rotate(0deg) scale(0.5); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.peiq-results-placeholder {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 16px;
    margin: 20px 0;
}

.peiq-subscription-overlay-robust {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin: 30px auto;
    text-align: center;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
    max-width: 600px;
}

.peiq-subscription-overlay-robust .peiq-subscription-content h3 {
    font-size: 28px;
    margin: 0 0 16px 0;
    font-weight: 700;
    color: white;
}

.peiq-subscription-overlay-robust .peiq-subscription-content p {
    font-size: 16px;
    margin: 0 0 30px 0;
    opacity: 0.95;
    line-height: 1.6;
    color: white;
}

.peiq-subscription-overlay-robust .peiq-premium-features {
    margin: 30px 0;
    text-align: left;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.peiq-feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 15px;
    color: white;
}

.peiq-feature-icon {
    font-size: 24px;
    margin-right: 16px;
    flex-shrink: 0;
}

/* Preview sections for non-logged users */
.peiq-preview-section {
    position: relative;
    margin: 30px 0;
}

.peiq-preview-section h3 {
    color: #059669;
    margin-bottom: 20px;
    font-size: 20px;
    position: relative;
    z-index: 1;
    background: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.peiq-preview-content {
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
    position: relative;
}

.peiq-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.peiq-preview-overlay-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.peiq-unlock-header {
    margin-bottom: 30px;
}

.peiq-unlock-header h3 {
    font-size: 24px;
    color: #059669;
    margin: 16px 0;
    font-weight: 700;
}

.peiq-unlock-header p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.peiq-preview-features {
    margin: 30px 0;
    text-align: left;
}

.peiq-feature {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #374151;
    font-size: 15px;
}

.peiq-unlock-analysis-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    color: white !important;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.peiq-unlock-analysis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.peiq-more-questions {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #6b7280;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 16px;
}

/* Fullscreen Styles */
.peiq-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.peiq-fullscreen-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.peiq-fullscreen-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.peiq-fullscreen-controls {
    display: flex;
    gap: 10px;
}

.peiq-control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.peiq-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.peiq-control-btn:active {
    transform: translateY(0);
}

.peiq-fullscreen-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f8fafc;
}

.peiq-fullscreen-content .peiq-container {
    max-width: none;
    margin: 0;
    padding: 20px;
    height: 100%;
}

/* Minimized state */
.peiq-fullscreen-overlay.peiq-minimized {
    transform: scale(0.1);
    opacity: 0;
    pointer-events: none;
    transform-origin: bottom right;
}

.peiq-minimized-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
    z-index: 1000000;
    cursor: pointer;
    animation: minimizedPulse 2s infinite;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.peiq-minimized-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(5, 150, 105, 0.6);
}

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

/* Attention pulse animation */
.peiq-attention-pulse {
    animation: attentionPulse 1s ease-in-out 3;
}

@keyframes attentionPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 6px 30px rgba(5, 150, 105, 0.8);
    }
}

.peiq-minimized-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.peiq-minimized-icon {
    font-size: 20px;
    line-height: 1;
}

.peiq-minimized-info {
    flex: 1;
    min-width: 0;
}

.peiq-minimized-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.peiq-minimized-progress {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1;
}

.peiq-restore-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.peiq-restore-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.peiq-restore-btn:active {
    transform: scale(0.95);
}

/* Body class when in fullscreen mode */
body.peiq-fullscreen-mode {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Ensure normal scrolling when not in fullscreen */
body:not(.peiq-fullscreen-mode) {
    overflow: auto !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
}

body.peiq-fullscreen-mode .peiq-fullscreen-overlay .peiq-container {
    background: transparent;
}

/* Icons for fullscreen controls */
.peiq-icon-minimize:before {
    content: "−";
    font-weight: bold;
    font-size: 16px;
}

.peiq-icon-close:before {
    content: "×";
    font-weight: bold;
    font-size: 18px;
}

/* Enhanced fullscreen quiz styles */
.peiq-fullscreen-overlay .peiq-question-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.peiq-fullscreen-overlay .peiq-quiz-header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.peiq-fullscreen-overlay .peiq-progress-bar {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.peiq-fullscreen-overlay .peiq-progress-fill {
    background: linear-gradient(90deg, #059669 0%, #10b981 50%, #047857 100%);
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
}

/* Loading state in fullscreen */
.peiq-fullscreen-content .peiq-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8fafc;
}

.peiq-fullscreen-content .peiq-loading .peiq-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #059669;
    border-radius: 50%;
    animation: peiq-spin 1s linear infinite;
    margin-bottom: 20px;
}

.peiq-fullscreen-content .peiq-loading p {
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

/* Responsive fullscreen */
@media (max-width: 768px) {
    .peiq-fullscreen-header {
        padding: 12px 20px;
    }
    
    .peiq-fullscreen-title {
        font-size: 16px;
    }
    
    .peiq-fullscreen-controls {
        gap: 8px;
    }
    
    .peiq-control-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .peiq-minimized-indicator {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
    }
    
    .peiq-minimized-title {
        font-size: 13px;
    }
    
    .peiq-minimized-progress {
        font-size: 11px;
    }
    
    .peiq-minimized-icon {
        font-size: 18px;
    }
    
    .peiq-minimized-content {
        gap: 10px;
    }
    
    .peiq-fullscreen-content .peiq-container {
        padding: 15px;
    }
}

/* Accessibility improvements */
.peiq-control-btn:focus,
.peiq-restore-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Animation for entering fullscreen */
.peiq-fullscreen-overlay {
    animation: fullscreenSlideIn 0.3s ease-out;
}

@keyframes fullscreenSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Override some quiz styles in fullscreen */
.peiq-fullscreen-overlay .peiq-category-grid {
    margin-top: 20px;
}

.peiq-fullscreen-overlay .peiq-category-card {
    transition: all 0.2s ease;
    transform: none;
}

.peiq-fullscreen-overlay .peiq-category-card:hover {
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .peiq-container {
        padding: 10px;
    }
    
    .peiq-category-grid {
        grid-template-columns: 1fr;
    }
    
    .peiq-quiz-info {
        flex-direction: column;
        gap: 16px;
    }
    
    .peiq-score-display {
        grid-template-columns: 1fr;
    }
    
    .peiq-navigation {
        flex-direction: column;
    }
    
    .peiq-nav-button {
        width: 100%;
    }
    
    .peiq-result-actions {
        flex-direction: column;
    }
    
    .peiq-quiz-button {
        width: 100%;
    }
}

/* Analysis Modal Styles */
.peiq-analysis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: peiq-modal-slide-up 0.4s ease-out;
}

/* Prevent body scrolling when modal is open */
.peiq-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

@keyframes peiq-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.peiq-analysis-modal-content {
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    position: relative;
}

.peiq-analysis-header {
    text-align: center;
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.peiq-analysis-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.peiq-analysis-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.peiq-analysis-header .peiq-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.peiq-analysis-header .peiq-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.peiq-analysis-preview {
    padding: 30px;
}

.peiq-preview-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.peiq-preview-section:last-child {
    margin-bottom: 0;
}

.peiq-preview-section h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
}

.peiq-preview-content {
    color: #475569;
    line-height: 1.6;
}

.peiq-preview-chart {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.peiq-chart-placeholder {
    display: flex;
    align-items: end;
    justify-content: space-around;
    height: 80px;
    gap: 8px;
}

.peiq-chart-bar {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 4px 4px 0 0;
    flex: 1;
    max-width: 20px;
    opacity: 0.8;
    animation: peiq-chart-grow 1s ease-out;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes peiq-chart-grow {
    from { height: 0; }
    to { height: var(--height); }
}

.peiq-recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.peiq-recommendation-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding-left: 25px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.peiq-recommendation-list li:hover {
    padding-left: 30px;
    color: white;
}

.peiq-recommendation-list li:before {
    content: "✅";
    position: absolute;
    left: 0;
    top: 12px;
}

.peiq-recommendation-list li:last-child {
    border-bottom: none;
}

.peiq-recommendation-list li.peiq-blurred {
    filter: blur(2px);
    opacity: 0.6;
}

.peiq-study-materials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.peiq-material-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.peiq-material-item:hover {
    transform: translateY(-3px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.peiq-material-item.peiq-blurred {
    filter: blur(1px);
    opacity: 0.6;
}

.peiq-analysis-cta {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 35px 30px;
    border-radius: 0 0 20px 20px;
    text-align: center;
    color: white;
}

.peiq-cta-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.peiq-cta-content p {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: white;
    opacity: 0.95;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.peiq-pricing-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.peiq-price-old {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 18px;
}

.peiq-price-new {
    font-size: 32px;
    font-weight: 700;
    color: #10b981;
}

.peiq-price-save {
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.peiq-cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.peiq-cta-button {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transform: translateY(0);
}

.peiq-cta-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.peiq-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.5);
    color: white;
    text-decoration: none;
}

.peiq-cta-secondary {
    background: transparent;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.4);
    opacity: 0.9;
}

.peiq-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    color: white !important;
    transform: translateY(-2px);
    opacity: 1;
}

/* Mobile responsive for analysis modal */
@media (max-width: 768px) {
    .peiq-analysis-modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 95vh;
    }
    
    .peiq-analysis-header {
        padding: 25px 20px 15px;
    }
    
    .peiq-analysis-header h2 {
        font-size: 24px;
    }
    
    .peiq-analysis-preview {
        padding: 20px;
    }
    
    .peiq-preview-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .peiq-analysis-cta {
        padding: 25px 20px;
    }
    
    .peiq-cta-content h3 {
        font-size: 20px;
    }
    
    .peiq-cta-buttons {
        flex-direction: column;
    }
    
    .peiq-cta-button {
        width: 100%;
        min-width: auto;
    }
    
    .peiq-pricing-highlight {
        flex-direction: column;
        gap: 8px;
    }
    
    .peiq-study-materials {
        grid-template-columns: 1fr;
    }
}

/* Interactive modal effects */
.peiq-section-clicked {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease;
}

.peiq-section-hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.peiq-item-visible {
    animation: itemSlideIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes itemSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced modal close button */
.peiq-analysis-header .peiq-modal-close:hover {
    transform: rotate(90deg) !important;
    background: rgba(255, 255, 255, 0.4) !important;
}

/* Interactive chart bars */
.peiq-chart-bar {
    transition: all 0.3s ease;
    cursor: pointer;
}

.peiq-preview-chart:hover .peiq-chart-bar {
    transform: scaleY(1.1);
}

.peiq-preview-chart:hover .peiq-chart-bar:nth-child(1) { animation-delay: 0s; }
.peiq-preview-chart:hover .peiq-chart-bar:nth-child(2) { animation-delay: 0.1s; }
.peiq-preview-chart:hover .peiq-chart-bar:nth-child(3) { animation-delay: 0.2s; }
.peiq-preview-chart:hover .peiq-chart-bar:nth-child(4) { animation-delay: 0.3s; }

/* Floating effect for analysis icon */
.peiq-analysis-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Pulse animation for save badge */
@keyframes modalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.peiq-price-save {
    animation: modalPulse 2s infinite;
}
