/* SEO Analyzer Pro - Modern Frontend Styles */

/* CSS Variables */
:root {
    --sap-primary: #6259a6;
    --sap-secondary: #667eea;
    --sap-tertiary: #9f7aea;
    --sap-success: #28a745;
    --sap-warning: #ffc107;
    --sap-danger: #dc3545;
    --sap-info: #17a2b8;
    --sap-gradient: linear-gradient(135deg, #667eea 0%, #6259a6 50%, #9f7aea 100%);
    --sap-gradient-success: linear-gradient(135deg, #28a745, #20c557);
    --sap-gradient-warning: linear-gradient(135deg, #ffc107, #ffb300);
    --sap-gradient-danger: linear-gradient(135deg, #dc3545, #c82333);
    --sap-white: #ffffff;
    --sap-light: #f8f9fa;
    --sap-gray: #6c757d;
    --sap-dark: #343a40;
    --sap-radius: 12px;
    --sap-radius-lg: 20px;
    --sap-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --sap-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --sap-shadow-xl: 0 20px 50px rgba(98, 89, 166, 0.2);
    --sap-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Container with Gradient Background */
.sap-analyzer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    background: var(--sap-gradient);
    border-radius: var(--sap-radius-lg);
    min-height: 500px;
}

/* Global minimum font-size enforcement */
.sap-analyzer-container * {
    font-size: max(12px, 1em);
}

.sap-analyzer-container *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    font-size: max(12px, inherit);
}

/* Header Section */
.sap-header {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--sap-radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--sap-shadow-xl);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.sap-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--sap-gradient);
}

.sap-title {
    color: var(--sap-dark);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: var(--sap-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sap-subtitle {
    color: var(--sap-gray);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
}

/* Form Container */
.sap-form-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--sap-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--sap-shadow-xl);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

/* Input Group */
.sap-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.sap-input {
    flex: 1;
    min-width: 300px;
    padding: 1.2rem 1.5rem;
    font-size: 12px;
    border: 2px solid #e2e8f0;
    border-radius: var(--sap-radius);
    transition: var(--sap-transition);
    background: var(--sap-white);
}

.sap-input:focus {
    outline: none;
    border-color: var(--sap-primary);
    box-shadow: 0 0 0 4px rgba(98, 89, 166, 0.1);
}

/* Primary Button */
.sap-button-primary {
    padding: 1.2rem 3rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--sap-white);
    background: var(--sap-gradient);
    border: none;
    border-radius: var(--sap-radius);
    cursor: pointer;
    transition: var(--sap-transition);
    box-shadow: 0 4px 15px rgba(98, 89, 166, 0.3);
}

.sap-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 89, 166, 0.4);
}

/* Progress Bar */
.sap-progress {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--sap-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: var(--sap-shadow-xl);
}

.sap-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.sap-progress-fill {
    height: 100%;
    background: var(--sap-gradient);
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.sap-progress-text {
    color: var(--sap-gray);
    font-size: 12px;
}

/* Results Container */
.sap-results {
    animation: fadeIn 0.5s ease;
}

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

/* Results Header */
.sap-results-header {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--sap-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--sap-shadow-xl);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

/* Score Circle */
.sap-score-container {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.sap-score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.sap-score-circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 12;
}

.sap-score-circle-fill {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sap-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.sap-score-value {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--sap-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sap-score-percent {
    font-size: 1.1rem;
    color: var(--sap-gray);
}

/* Results Info */
.sap-results-info {
    flex: 1;
}

.sap-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sap-dark);
    margin: 0 0 0.5rem 0;
}

.sap-results-url {
    color: var(--sap-primary);
    font-size: 12px;
}

.sap-results-date {
    color: var(--sap-gray);
    font-size: 12px;
    margin-top: 0.5rem;
}

/* One Column Category Cards */
.sap-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sap-category-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--sap-radius-lg);
    box-shadow: var(--sap-shadow-xl);
    transition: var(--sap-transition);
    overflow: hidden;
}

.sap-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(98, 89, 166, 0.2);
}

.sap-category-header {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 249, 250, 1));
    border-bottom: 1px solid #e2e8f0;
}

/* Category Icons */
.sap-icon {
    width: 50px;
    height: 50px;
    background: var(--sap-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(98, 89, 166, 0.2);
}

.sap-icon::before {
    content: '📊';
}

.sap-icon-title::before {
    content: '📝';
}

.sap-icon-content::before {
    content: '📄';
}

.sap-icon-technical::before {
    content: '⚙️';
}

.sap-icon-mobile::before {
    content: '📱';
}

.sap-icon-security::before {
    content: '🔒';
}

.sap-icon-performance::before {
    content: '⚡';
}

.sap-category-header h4 {
    flex: 1;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--sap-dark);
}

.sap-category-score {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--sap-radius);
    border: 2px solid #e2e8f0;
}

.sap-category-score[data-category] {
    color: var(--sap-primary);
}

/* Category Content */
.sap-category-content {
    padding: 0 2rem;
    display: none; /* Použít display místo max-height pro jQuery slideDown/Up */
}

.sap-category-card.expanded .sap-category-content {
    display: block;
    padding: 1.5rem 2rem 2rem;
}

/* Score Items */
.sap-score-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--sap-radius);
    background: #f8f9fa;
    transition: var(--sap-transition);
}

.sap-score-item:last-child {
    margin-bottom: 0;
}

.sap-score-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sap-score-item-status {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.sap-score-item-status.success {
    background: var(--sap-gradient-success);
}

.sap-score-item-status.warning {
    background: var(--sap-gradient-warning);
}

.sap-score-item-status.error {
    background: var(--sap-gradient-danger);
}

.sap-score-item-title {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--sap-dark);
}

.sap-score-item-score {
    font-size: 12px;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: white;
    color: var(--sap-primary);
    border: 2px solid #e2e8f0;
}

.sap-score-item-message {
    font-size: 12px;
    color: var(--sap-gray);
    line-height: 1.7;
    margin-left: 3rem;
}

/* Clickable items */
.sap-item-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.sap-item-clickable:hover {
    background: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(98, 89, 166, 0.1);
}

.sap-click-indicator {
    display: inline-block;
    margin-top: 0.75rem;
    margin-left: 3rem;
    color: #6259a6;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sap-item-clickable:hover .sap-click-indicator {
    opacity: 1;
}

/* Detailed Results Sections */
.sap-detailed-results {
    margin-top: 3rem;
}

.sap-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sap-detail-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--sap-radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--sap-shadow-xl);
}

.sap-detail-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--sap-dark);
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.sap-detail-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sap-dark);
    margin: 1.5rem 0 1rem;
}

/* Detailed Analysis Styling */
.sap-headings-tree,
.sap-images-analysis,
.sap-links-analysis,
.sap-keywords-analysis {
    padding: 1.5rem;
}

.sap-headings-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.sap-headings-list li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: var(--sap-radius);
    font-size: 12px;
    border-left: 4px solid var(--sap-primary);
}

.sap-headings-list li.sap-h1 {
    font-weight: 600;
    background: linear-gradient(90deg, rgba(98, 89, 166, 0.1) 0%, transparent 100%);
    border-left-color: var(--sap-secondary);
}

.sap-meta {
    color: var(--sap-gray);
    font-size: 12px;
    margin-left: 0.5rem;
}

.sap-issues-list,
.sap-recommendations-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.sap-issues-list li,
.sap-recommendations-list li {
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: var(--sap-radius);
    font-size: 12px;
    line-height: 1.7;
}

.sap-error-icon {
    background: #fff5f5;
    border-left: 4px solid var(--sap-danger);
    color: #721c24;
}

.sap-warning-icon {
    background: #fff3cd;
    border-left: 4px solid var(--sap-warning);
    color: #856404;
}

.sap-recommendations-list li {
    background: #d1ecf1;
    border-left: 4px solid var(--sap-info);
    color: #0c5460;
}

/* Analysis Info Box */
.sap-analysis-info {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05) 0%, rgba(104, 174, 256, 0.05) 100%);
    border-left: 3px solid var(--sap-primary);
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 12px;
    line-height: 1.6;
}

/* SEO Tips Box */
.sap-seo-tips {
    background: linear-gradient(135deg, rgba(92, 184, 92, 0.05) 0%, rgba(122, 214, 122, 0.05) 100%);
    border: 1px solid rgba(92, 184, 92, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sap-seo-tips h5 {
    color: var(--sap-green);
    font-size: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sap-seo-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sap-seo-tips li {
    padding: 0.75rem 0;
    font-size: 12px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(92, 184, 92, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.sap-seo-tips li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--sap-green);
    font-weight: bold;
}

.sap-seo-tips li:last-child {
    border-bottom: none;
}

.sap-seo-tips li strong {
    color: var(--sap-dark);
    font-weight: 600;
}

/* Keywords Table */
.sap-keywords-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 12px;
}

.sap-keywords-table thead {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.sap-keywords-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--sap-dark);
    border-bottom: 2px solid #e2e8f0;
}

.sap-keywords-table td {
    padding: 1rem;
    font-size: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.sap-keywords-table tbody tr:hover {
    background: #f8f9fa;
}

/* Structure Status */
.sap-structure-status {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
}

.sap-status-success {
    background: rgba(92, 184, 92, 0.1);
    border: 1px solid rgba(92, 184, 92, 0.3);
    color: var(--sap-green);
}

.sap-status-warning {
    background: rgba(240, 173, 78, 0.1);
    border: 1px solid rgba(240, 173, 78, 0.3);
    color: var(--sap-yellow);
}

.sap-status-error {
    background: rgba(217, 83, 79, 0.1);
    border: 1px solid rgba(217, 83, 79, 0.3);
    color: var(--sap-red);
}

/* Stats Row */
.sap-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--sap-radius);
}

.sap-stat {
    font-size: 12px;
    color: var(--sap-gray);
}

.sap-stat strong {
    color: var(--sap-primary);
    font-size: 1.2rem;
}

/* Link Recommendations */
.sap-links-recommendations {
    margin-top: 1rem;
}

.sap-link-recommendation {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--sap-radius);
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.sap-link-recommendation.sap-link-error {
    background: #fff5f5;
    border-left-color: var(--sap-danger);
}

.sap-link-recommendation.sap-link-warning {
    background: #fff3cd;
    border-left-color: var(--sap-warning);
}

.sap-link-rec-header {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.sap-link-rec-solution {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #dee2e6;
}

/* Actions */
.sap-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.sap-button {
    padding: 1rem 2rem;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: var(--sap-radius);
    cursor: pointer;
    transition: var(--sap-transition);
}

.sap-button-secondary {
    background: white;
    color: var(--sap-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sap-button-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Error Message */
.sap-error {
    background: white;
    border: 2px solid #fcc;
    border-radius: var(--sap-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: var(--sap-shadow-xl);
}

.sap-error-icon {
    font-size: 1.8rem;
    color: var(--sap-danger);
    margin-bottom: 1rem;
}

.sap-error-message {
    color: var(--sap-danger);
    font-size: 12px;
}

/* Resource Details Styles */
.sap-resource-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.sap-resource-title {
    font-size: 1.1rem;
    color: var(--sap-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--sap-primary);
}

.sap-resource-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

.sap-resource-section h5 {
    font-size: 12px;
    color: var(--sap-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sap-resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sap-resource-list li {
    padding: 0.75rem 0;
    font-size: 12px;
    color: var(--sap-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    word-break: break-all;
}

.sap-resource-list li:last-child {
    border-bottom: none;
}

.sap-resource-link,
.sap-image-link {
    color: var(--sap-primary);
    text-decoration: none;
    transition: color 0.2s;
    flex: 1;
}

.sap-resource-link:hover,
.sap-image-link:hover {
    color: var(--sap-primary-dark);
    text-decoration: underline;
}

.sap-attr-tag {
    background: rgba(74, 144, 226, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 12px;
    color: var(--sap-primary);
    margin-left: 0.5rem;
}

.sap-lazy-tag {
    background: rgba(92, 184, 92, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 12px;
    color: var(--sap-green);
    margin-left: 0.5rem;
}

.sap-lazy-info {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: rgba(92, 184, 92, 0.05);
    border-left: 3px solid var(--sap-green);
    font-size: 12px;
}

.sap-biggest-images {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    font-size: 12px;
}

.sap-biggest-images strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 13px;
}

.sap-biggest-images ol {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.sap-biggest-images li {
    margin: 0.3rem 0;
    color: #6c5803;
    font-size: 12px;
}

.sap-images-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.sap-images-list::-webkit-scrollbar {
    width: 6px;
}

.sap-images-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.sap-images-list::-webkit-scrollbar-thumb {
    background: var(--sap-primary);
    border-radius: 3px;
}

.sap-alt-status {
    margin-left: auto;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.sap-alt-status.success {
    color: var(--sap-green);
    background: rgba(92, 184, 92, 0.1);
}

.sap-alt-status.error {
    color: var(--sap-red);
    background: rgba(217, 83, 79, 0.1);
}

/* File size display */
.sap-file-size {
    color: var(--sap-gray);
    font-size: 12px;
    font-weight: 600;
    margin-left: 0.5rem;
    padding: 0.2rem 0.4rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* Savings info */
.sap-savings-info {
    display: inline-block;
    margin-left: 0.75rem;
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    color: #856404;
    font-size: 12px;
    font-weight: 500;
    cursor: help;
}

.sap-savings-info:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.1));
}

.sap-format-ok {
    display: inline-block;
    margin-left: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    color: var(--sap-green);
    font-size: 12px;
    font-weight: 500;
}

.sap-more-items {
    font-style: italic;
    color: var(--sap-text-muted);
    padding-top: 0.75rem !important;
}

.sap-resource-summary {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05) 0%, rgba(104, 174, 256, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.sap-resource-summary h5 {
    font-size: 12px;
    color: var(--sap-primary);
    margin-bottom: 1rem;
}

.sap-resource-summary .sap-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.sap-resource-summary .sap-stat {
    font-size: 12px;
    color: var(--sap-text);
}

.sap-resource-summary .sap-stat strong {
    color: var(--sap-primary);
    font-size: 12px;
}

.sap-resource-recommendation {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(240, 173, 78, 0.1);
    border-left: 3px solid var(--sap-yellow);
    border-radius: 4px;
    font-size: 12px;
    color: var(--sap-text);
}

.sap-total-savings {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.05));
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    font-size: 14px;
    color: #856404;
    text-align: center;
}

.sap-total-savings strong {
    color: #724004;
    font-size: 14px;
}

/* Scroll Containers */
.sap-resource-scroll {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.sap-resource-scroll-images {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

/* Custom Scrollbar Styles for Scroll Containers */
.sap-resource-scroll::-webkit-scrollbar,
.sap-resource-scroll-images::-webkit-scrollbar {
    width: 8px;
}

.sap-resource-scroll::-webkit-scrollbar-track,
.sap-resource-scroll-images::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.sap-resource-scroll::-webkit-scrollbar-thumb,
.sap-resource-scroll-images::-webkit-scrollbar-thumb {
    background: var(--sap-primary);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sap-resource-scroll::-webkit-scrollbar-thumb:hover,
.sap-resource-scroll-images::-webkit-scrollbar-thumb:hover {
    background: var(--sap-secondary);
}

/* Firefox scrollbar styling */
.sap-resource-scroll,
.sap-resource-scroll-images {
    scrollbar-width: thin;
    scrollbar-color: var(--sap-primary) rgba(0, 0, 0, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sap-analyzer-container {
        padding: 1rem;
    }

    .sap-title {
        font-size: 1.5rem;
    }

    .sap-subtitle {
        font-size: 12px;
    }

    .sap-input-group {
        flex-direction: column;
    }

    .sap-input,
    .sap-button-primary {
        width: 100%;
    }

    .sap-results-header {
        flex-direction: column;
        text-align: center;
    }

    .sap-actions {
        flex-direction: column;
    }

    .sap-button {
        width: 100%;
    }
}

/* Performance Metrics Styles */
.sap-performance-metrics {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.sap-performance-metrics h5 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1e40af;
}

.sap-load-time-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sap-metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sap-metric-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.sap-metric-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.sap-load-time-recommendation {
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.sap-load-time-recommendation.success {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.sap-load-time-recommendation.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.sap-load-time-recommendation.error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.sap-performance-metrics .sap-seo-tips {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.sap-performance-metrics .sap-seo-tips h6 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #374151;
}

.sap-performance-metrics .sap-seo-tips ul {
    margin: 0;
    padding-left: 20px;
}

.sap-performance-metrics .sap-seo-tips li {
    margin-bottom: 10px;
    color: #4b5563;
    line-height: 1.6;
}

.sap-performance-metrics .sap-seo-tips strong {
    color: #1f2937;
    font-weight: 600;
}

/* PSI Badge Styles */
.sap-psi-badge {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.sap-psi-icon {
    font-size: 24px;
}

.sap-psi-badge strong {
    font-size: 16px;
    flex: 1;
}

.sap-psi-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
}

.sap-estimated-badge {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    color: #856404;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    border: 1px solid #ffc107;
}

.sap-estimated-icon {
    font-size: 24px;
}

.sap-estimated-badge strong {
    font-size: 16px;
    flex: 1;
}

.sap-estimated-note {
    font-size: 12px;
    opacity: 0.8;
}

/* PSI Device Toggle */
.sap-psi-device-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.sap-psi-device-btn {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sap-psi-device-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.sap-psi-device-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* PSI Main Scores */
.sap-psi-main-scores {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.sap-psi-main-score {
    text-align: center;
}

.sap-psi-main-score .sap-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 8px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 0 auto;
    transform: none !important;  /* Zrušit rotaci pro PSI skóre */
}

.sap-psi-main-score .sap-score-number {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.sap-psi-main-score .sap-score-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Web Vitals Metrics Styles */
.sap-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.sap-metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sap-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #4a90e2;
}

.sap-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sap-metric-abbr {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.sap-metric-score {
    font-size: 12px;
    font-weight: 600;
}

.sap-metric-value-wrapper {
    margin: 15px 0;
}

.sap-metric-card .sap-metric-value {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    display: block;
}

.sap-metric-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.sap-metric-description {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    line-height: 1.4;
}

.sap-metric-thresholds {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 8px;
    margin: 10px 0;
    font-size: 11px;
}

.threshold-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3px 0;
}

.threshold-item.optimal {
    color: #0cce6b;
    font-weight: 600;
}

.threshold-item.acceptable {
    color: #ffa400;
}

.threshold-item.poor {
    color: #ff4e42;
}

.sap-metric-rating {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.sap-metric-rating.good {
    background: #d4edda;
    color: #155724;
}

.sap-metric-rating.needs {
    background: #fff3cd;
    color: #856404;
}

.sap-metric-rating.poor {
    background: #f8d7da;
    color: #721c24;
}

.sap-metrics-recommendations {
    margin-top: 30px;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e0e0e0;
}

.sap-metrics-recommendations h5 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.sap-metrics-recommendations h6 {
    color: #34495e;
    font-size: 15px;
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.sap-metrics-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sap-psi-scores {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.sap-psi-scores h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.sap-psi-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.sap-psi-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sap-psi-device {
    font-weight: 600;
    color: #34495e;
}

.sap-metrics-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sap-metric-summary-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #4a90e2;
}

.sap-metric-summary-item .metric-name {
    font-weight: 600;
    min-width: 50px;
    color: #2c3e50;
}

.sap-metric-summary-item .metric-value {
    font-weight: bold;
    font-size: 16px;
    margin: 0 15px;
    min-width: 80px;
}

.sap-metric-summary-item .metric-status {
    font-size: 13px;
    margin-right: 15px;
}

.sap-metric-summary-item .metric-optimal {
    font-size: 12px;
    color: #666;
    margin-left: auto;
}

.sap-recommendation-item {
    background: white;
    border-left: 4px solid #ffa400;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sap-recommendation-item h6 {
    color: #333;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.sap-recommendation-item .metric-detail {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
}

.sap-recommendation-item ul {
    margin: 0;
    padding-left: 20px;
}

.sap-recommendation-item li {
    font-size: 13px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 5px;
}

.sap-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* Mixed Content Details Styles */
.sap-mixed-content-details {
    margin-top: 1rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, #fff5f5, #ffebee);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
}

.sap-mixed-content-details h6 {
    color: #721c24;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sap-mixed-content-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.sap-mixed-content-list li {
    background: white;
    padding: 0.8rem;
    margin-bottom: 0.6rem;
    border-radius: 6px;
    border-left: 3px solid #dc3545;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sap-mixed-content-list li strong {
    color: #495057;
    font-size: 13px;
    display: block;
    margin-bottom: 0.3rem;
}

.sap-mixed-content-list code.sap-url-truncate {
    display: block;
    font-size: 11px;
    color: #dc3545;
    background: #f8f9fa;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    word-break: break-all;
    max-width: 100%;
    overflow-wrap: break-word;
}

.sap-mixed-content-fix {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.sap-mixed-content-fix h6 {
    color: #004085;
    background: linear-gradient(135deg, #cce5ff, #e7f3ff);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    margin: -1rem -1rem 1rem -1rem;
}

.sap-mixed-content-fix ol {
    margin: 0;
    padding-left: 1.5rem;
}

.sap-mixed-content-fix ol li {
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.sap-mixed-content-fix ol li:last-child {
    margin-bottom: 0;
}

.sap-mixed-content-fix ol li strong {
    color: #212529;
    font-weight: 600;
}

/* Top Results Shortcode Styles - Enhanced */
.sap-top-results {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border-radius: var(--sap-radius-lg);
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(98, 89, 166, 0.15);
    backdrop-filter: blur(10px);
    margin: 3rem auto;
    max-width: 1200px;
    position: relative;
}

.sap-top-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sap-gradient);
    border-radius: var(--sap-radius-lg) var(--sap-radius-lg) 0 0;
}

.sap-top-results .sap-widget-title {
    color: var(--sap-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 3rem 0;
    text-align: center;
    background: var(--sap-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.sap-top-results .sap-widget-title::after {
    content: '👑 TOP SEO SKÓRE';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--sap-gray);
    font-weight: 500;
    -webkit-text-fill-color: var(--sap-gray);
}

.sap-top-results .sap-results-grid {
    display: grid;
    gap: 1.8rem;
}

.sap-top-results .sap-top-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 2rem 1.8rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.sap-top-results .sap-top-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--sap-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sap-top-results .sap-top-item:nth-child(1) {
    background: linear-gradient(135deg, #fffef5, #fff9e6);
    border-color: rgba(255, 215, 0, 0.2);
}

.sap-top-results .sap-top-item:nth-child(2) {
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
    border-color: rgba(192, 192, 192, 0.2);
}

.sap-top-results .sap-top-item:nth-child(3) {
    background: linear-gradient(135deg, #fffbf7, #fff5ed);
    border-color: rgba(205, 127, 50, 0.2);
}

.sap-top-results .sap-top-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(98, 89, 166, 0.15);
    border-color: rgba(98, 89, 166, 0.3);
}

.sap-top-results .sap-top-item:hover::before {
    opacity: 1;
}

.sap-top-results .sap-top-position {
    flex-shrink: 0;
    margin-right: 2rem;
    text-align: center;
    min-width: 70px;
}

.sap-top-results .sap-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: pulse 2s infinite;
}

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

.sap-top-results .sap-medal-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.5);
}

.sap-top-results .sap-medal-1::after {
    content: '🥇';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 1.2rem;
}

.sap-top-results .sap-medal-2 {
    background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
    color: #616161;
    box-shadow: 0 5px 25px rgba(192, 192, 192, 0.5);
}

.sap-top-results .sap-medal-2::after {
    content: '🥈';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 1.2rem;
}

.sap-top-results .sap-medal-3 {
    background: linear-gradient(135deg, #cd7f32, #e5a570);
    color: #8b4513;
    box-shadow: 0 5px 25px rgba(205, 127, 50, 0.5);
}

.sap-top-results .sap-medal-3::after {
    content: '🥉';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 1.2rem;
}

.sap-top-results .sap-position-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--sap-light), #ffffff);
    border: 2px solid var(--sap-secondary);
    border-radius: 50%;
    font-weight: 700;
    color: var(--sap-secondary);
    font-size: 1.3rem;
}

.sap-top-results .sap-top-details {
    flex: 1;
    min-width: 0;
}

.sap-top-results .sap-top-domain {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sap-dark);
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sap-top-results .sap-top-score-bar {
    position: relative;
    height: 32px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.08);
}

.sap-top-results .sap-score-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 16px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--sap-gradient);
    box-shadow: 0 3px 12px rgba(98, 89, 166, 0.4);
}

.sap-top-results .sap-top-item:nth-child(1) .sap-score-bar-fill {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    box-shadow: 0 3px 12px rgba(255, 215, 0, 0.4);
}

.sap-top-results .sap-top-item:nth-child(2) .sap-score-bar-fill {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    box-shadow: 0 3px 12px rgba(192, 192, 192, 0.4);
}

.sap-top-results .sap-top-item:nth-child(3) .sap-score-bar-fill {
    background: linear-gradient(135deg, #cd7f32, #e5a570);
    box-shadow: 0 3px 12px rgba(205, 127, 50, 0.4);
}

.sap-top-results .sap-score-label {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 1rem;
    color: var(--sap-dark);
    z-index: 1;
}

.sap-top-results .sap-top-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1rem;
    color: var(--sap-gray);
}

.sap-top-results .sap-meta-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.sap-top-results .sap-meta-date::before {
    content: '🗓️';
    font-size: 1.1rem;
}

.sap-top-results .sap-meta-link {
    color: var(--sap-secondary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(159, 122, 234, 0.1));
    border-radius: 20px;
    transition: all 0.3s ease;
}

.sap-top-results .sap-meta-link::after {
    content: '↗';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.sap-top-results .sap-meta-link:hover {
    color: white;
    background: var(--sap-gradient);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(98, 89, 166, 0.3);
}

.sap-top-results .sap-meta-link:hover::after {
    transform: translate(2px, -2px);
}

.sap-top-results .sap-no-results {
    text-align: center;
    color: var(--sap-gray);
    padding: 4rem 2rem;
    font-size: 1.2rem;
    background: var(--sap-light);
    border-radius: var(--sap-radius);
    margin: 0;
}

/* Responsive design for Top Results */
@media (max-width: 768px) {
    .sap-top-results {
        padding: 2rem 1.5rem;
    }

    .sap-top-results .sap-widget-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .sap-top-results .sap-top-item {
        padding: 1.5rem 1rem;
    }

    .sap-top-results .sap-top-position {
        margin-right: 1.2rem;
        min-width: 55px;
    }

    .sap-top-results .sap-medal {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .sap-top-results .sap-position-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .sap-top-results .sap-top-domain {
        font-size: 1.2rem;
    }

    .sap-top-results .sap-top-score-bar {
        height: 28px;
    }

    .sap-top-results .sap-top-meta {
        flex-wrap: wrap;
        font-size: 0.9rem;
        gap: 1rem;
    }

    .sap-top-results .sap-meta-link {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Recent Results Shortcode Styles - Enhanced */
.sap-recent-results {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border-radius: var(--sap-radius-lg);
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(98, 89, 166, 0.15);
    backdrop-filter: blur(10px);
    margin: 3rem auto;
    max-width: 1200px;
    position: relative;
}

.sap-recent-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sap-gradient);
    border-radius: var(--sap-radius-lg) var(--sap-radius-lg) 0 0;
}

.sap-recent-results .sap-widget-title {
    color: var(--sap-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 3rem 0;
    text-align: center;
    background: var(--sap-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.sap-recent-results .sap-widget-title::after {
    content: '📊 POSLEDNÍ ANALÝZY';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--sap-gray);
    font-weight: 500;
    -webkit-text-fill-color: var(--sap-gray);
}

.sap-recent-results .sap-results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.sap-recent-results .sap-result-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.sap-recent-results .sap-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--sap-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.sap-recent-results .sap-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(98, 89, 166, 0.15);
    border-color: rgba(98, 89, 166, 0.2);
}

.sap-recent-results .sap-result-item:hover::before {
    transform: scaleX(1);
}

.sap-recent-results .sap-result-score {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-right: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sap-recent-results .sap-result-score::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--sap-secondary) 0deg,
        var(--sap-tertiary) calc(var(--score) * 3.6deg),
        #e0e0e0 calc(var(--score) * 3.6deg)
    );
    animation: rotate 1s ease-out;
    box-shadow: 0 4px 15px rgba(98, 89, 166, 0.2);
}

.sap-recent-results .sap-result-score::after {
    content: '';
    position: absolute;
    inset: 5px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sap-recent-results .sap-result-score span {
    position: relative;
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--sap-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 1;
}

.sap-recent-results .sap-result-score[data-score="100"] span,
.sap-recent-results .sap-result-score[data-score="99"] span,
.sap-recent-results .sap-result-score[data-score="98"] span,
.sap-recent-results .sap-result-score[data-score="97"] span,
.sap-recent-results .sap-result-score[data-score="96"] span,
.sap-recent-results .sap-result-score[data-score="95"] span,
.sap-recent-results .sap-result-score[data-score="94"] span,
.sap-recent-results .sap-result-score[data-score="93"] span,
.sap-recent-results .sap-result-score[data-score="92"] span,
.sap-recent-results .sap-result-score[data-score="91"] span,
.sap-recent-results .sap-result-score[data-score="90"] span {
    background: linear-gradient(135deg, #28a745, #20c557);
    -webkit-background-clip: text;
}

.sap-recent-results .sap-result-score[data-score="89"] span,
.sap-recent-results .sap-result-score[data-score="88"] span,
.sap-recent-results .sap-result-score[data-score="87"] span,
.sap-recent-results .sap-result-score[data-score="86"] span,
.sap-recent-results .sap-result-score[data-score="85"] span,
.sap-recent-results .sap-result-score[data-score="84"] span,
.sap-recent-results .sap-result-score[data-score="83"] span,
.sap-recent-results .sap-result-score[data-score="82"] span,
.sap-recent-results .sap-result-score[data-score="81"] span,
.sap-recent-results .sap-result-score[data-score="80"] span,
.sap-recent-results .sap-result-score[data-score="79"] span,
.sap-recent-results .sap-result-score[data-score="78"] span,
.sap-recent-results .sap-result-score[data-score="77"] span,
.sap-recent-results .sap-result-score[data-score="76"] span,
.sap-recent-results .sap-result-score[data-score="75"] span,
.sap-recent-results .sap-result-score[data-score="74"] span,
.sap-recent-results .sap-result-score[data-score="73"] span,
.sap-recent-results .sap-result-score[data-score="72"] span,
.sap-recent-results .sap-result-score[data-score="71"] span,
.sap-recent-results .sap-result-score[data-score="70"] span {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    -webkit-background-clip: text;
}

.sap-recent-results .sap-result-info {
    flex: 1;
    min-width: 0;
}

.sap-recent-results .sap-result-url {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--sap-dark);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sap-recent-results .sap-result-date {
    font-size: 0.95rem;
    color: var(--sap-gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.sap-recent-results .sap-result-date::before {
    content: '⏰';
    font-size: 1rem;
}

.sap-recent-results .sap-result-link {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sap-gradient);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(98, 89, 166, 0.2);
}

.sap-recent-results .sap-result-link svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
}

.sap-recent-results .sap-result-link .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: white;
    transition: transform 0.3s ease;
}

/* Fallback arrow if no icon loads */
.sap-recent-results .sap-result-link:empty::after {
    content: "↗";
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.sap-recent-results .sap-result-link:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 20px rgba(98, 89, 166, 0.4);
}

.sap-recent-results .sap-result-link:hover .dashicons {
    transform: translate(2px, -2px);
}

.sap-recent-results .sap-no-results {
    text-align: center;
    color: var(--sap-gray);
    padding: 4rem 2rem;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--sap-radius);
    margin: 0;
    border: 2px dashed rgba(98, 89, 166, 0.2);
}

.sap-recent-results .sap-no-results::before {
    content: '📭';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive design for Recent Results */
@media (max-width: 768px) {
    .sap-recent-results {
        padding: 2rem 1.5rem;
    }

    .sap-recent-results .sap-widget-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .sap-recent-results .sap-results-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sap-recent-results .sap-result-item {
        padding: 1.5rem;
    }

    .sap-recent-results .sap-result-score {
        width: 70px;
        height: 70px;
        margin-right: 1.2rem;
    }

    .sap-recent-results .sap-result-score span {
        font-size: 1.2rem;
    }

    .sap-recent-results .sap-result-url {
        font-size: 1.1rem;
    }

    .sap-recent-results .sap-result-date {
        font-size: 0.85rem;
    }

    .sap-recent-results .sap-result-link {
        width: 40px;
        height: 40px;
    }

    .sap-recent-results .sap-result-link .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}