#quorlyx-dashboard-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.quorlyx-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.quorlyx-page-header .quorlyx-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.quorlyx-page-header .quorlyx-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.quorlyx-page-header .quorlyx-brand:hover img {
    transform: scale(1.05) rotate(-2deg);
}

.quorlyx-page-header .quorlyx-titles {
    min-width: 0;
}

.quorlyx-page-header .quorlyx-titles h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.quorlyx-page-header .quorlyx-titles .subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.quorlyx-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ab-test-stats-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
}

.ab-test-stat-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    flex: 1;
    min-width: 260px;
    max-width: 340px;
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ab-test-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed, #3b82f6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ab-test-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.ab-test-stat-card:hover::before {
    opacity: 1;
}

.ab-test-stat-card h3 {
    margin: 0 0 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    text-align: center;
    font-size: 1.25em;
    font-weight: 600;
    color: #1e293b;
}

.ab-test-stat-card .stat-rate {
    font-size: 2.5em;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.ab-test-stat-card .stat-desc,
.ab-test-stat-card .stat-views,
.ab-test-stat-card .stat-conversions {
    margin: 8px 0;
    text-align: center;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.ab-test-stat-card .conversation-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
    padding-top: 16px;
    font-size: 13px;
    color: #475569;
}

.winner-card .stat-winner {
    font-size: 1.25em;
    font-weight: 700;
    color: #0ea5e9;
    text-align: center;
    margin-top: 12px;
}

.quorlyx-dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.quorlyx-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 24px;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    height: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quorlyx-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.quorlyx-card h2,
.quorlyx-card h3,
.quorlyx-card h4 {
    text-align: center !important;
    margin: 0 0 16px;
    font-size: 1.3em;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.quorlyx-card:has(.stats-list:not(:has(li))),
.quorlyx-card:has(.stat-rate) {
    aspect-ratio: 1/1;
}

.quorlyx-card:has(.stats-list li),
.quorlyx-card:has(.quorlyx-list li) {
    aspect-ratio: auto;
}

.stats-list,
.quorlyx-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stats-list li,
.quorlyx-list li {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    border-radius: 6px;
}

.stats-list li:hover,
.quorlyx-list li:hover {
    background-color: #f8fafc;
}

.stats-list li:last-child,
.quorlyx-list li:last-child {
    border-bottom: 0;
}

.quorlyx-post-generation-status {
    margin-top: 12px;
    padding: 12px 16px;
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #1e3a8a;
}

.quorlyx-post-generation-status.notice-error {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

#quorlyx-dashboard-page .spinner {
    float: none !important;
    display: inline-block !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
}

.quorlyx-tour-highlight {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 9999 !important;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .ab-test-stats-grid {
        flex-direction: column !important;
        align-items: center;
    }
    .ab-test-stat-card {
        max-width: 100%;
        min-width: 0;
    }
    .quorlyx-dashboard-grid {
        flex-direction: column;
    }
    .quorlyx-card {
        aspect-ratio: auto;
    }
    #quorlyx-dashboard-page {
        padding: 12px;
    }
}
