:root {
    /* Primary colors - refined Apple blue */
    --agenticwp-primary: #0071e3;
    --agenticwp-primary-hover: #0077ed;
    --agenticwp-primary-dark: #0066cc;
    --agenticwp-primary-light: rgba(0, 113, 227, 0.1);

    /* Semantic colors - Apple HIG palette */
    --agenticwp-danger: #ff3b30;
    --agenticwp-success: #34c759;
    --agenticwp-warning: #ff9500;
    --agenticwp-info: #5ac8fa;

    /* Achievement accent colors */
    --agenticwp-bronze: #cd7f32;
    --agenticwp-silver: #a8a9ad;
    --agenticwp-gold: #ffd700;
    --agenticwp-platinum: #e5e4e2;

    /* Text colors - cool neutrals */
    --agenticwp-text-primary: #1d1d1f;
    --agenticwp-text-secondary: #86868b;
    --agenticwp-text-muted: #aeaeb2;

    /* Background colors - subtle grays */
    --agenticwp-bg-white: #ffffff;
    --agenticwp-bg-light: #f5f5f7;
    --agenticwp-bg-gray: #fbfbfd;
    --agenticwp-bg-elevated: rgba(255, 255, 255, 0.8);

    /* Border colors */
    --agenticwp-border: #d2d2d7;
    --agenticwp-border-light: #e8e8ed;
    --agenticwp-border-dark: #c6c6c8;
    /* Spacing - 4px base unit */
    --agenticwp-space-xs: 4px;
    --agenticwp-space-sm: 8px;
    --agenticwp-space-md: 12px;
    --agenticwp-space-lg: 16px;
    --agenticwp-space-xl: 24px;
    --agenticwp-space-2xl: 32px;
    --agenticwp-space-3xl: 48px;
    --agenticwp-space-4xl: 64px;

    /* Border radius - Apple-style rounded corners */
    --agenticwp-radius-sm: 8px;
    --agenticwp-radius: 12px;
    --agenticwp-radius-lg: 16px;
    --agenticwp-radius-xl: 20px;
    --agenticwp-radius-full: 9999px;
    /* Shadows - subtle depth hierarchy */
    --agenticwp-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --agenticwp-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --agenticwp-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --agenticwp-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
    --agenticwp-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(0, 0, 0, 0.08);

    /* Colored shadows for interactive elements */
    --agenticwp-shadow-primary: 0 4px 14px rgba(0, 113, 227, 0.25);
    --agenticwp-shadow-success: 0 4px 14px rgba(52, 199, 89, 0.25);
    --agenticwp-shadow-warning: 0 4px 14px rgba(255, 149, 0, 0.25);
    --agenticwp-shadow-danger: 0 4px 14px rgba(255, 59, 48, 0.25);

    /* Transition timing */
    --agenticwp-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --agenticwp-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --agenticwp-transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --agenticwp-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --agenticwp-font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, monospace;

    /* Font sizes */
    --agenticwp-text-xs: 11px;
    --agenticwp-text-sm: 13px;
    --agenticwp-text-base: 15px;
    --agenticwp-text-lg: 17px;
    --agenticwp-text-xl: 20px;
    --agenticwp-text-2xl: 24px;
    --agenticwp-text-3xl: 32px;
    --agenticwp-text-4xl: 40px;

    /* Font weights */
    --agenticwp-font-normal: 400;
    --agenticwp-font-medium: 500;
    --agenticwp-font-semibold: 600;
    --agenticwp-font-bold: 700;

    /* Line heights */
    --agenticwp-leading-tight: 1.2;
    --agenticwp-leading-normal: 1.5;
    --agenticwp-leading-relaxed: 1.75;
}

.agenticwp-mb-0 {
    margin-bottom: 0 !important;
}

.agenticwp-chat-panel {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body.login .agenticwp-chat-toggle,
body.login .agenticwp-chat-panel {
    display: none !important;
}

.agenticwp-chat-panel {
    z-index: 999999;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@media screen and (min-width: 783px) {
    .agenticwp-chat-toggle {
        bottom: 40px;
    }

    .agenticwp-chat-panel {
        bottom: 110px;
    }
}

@media screen and (max-width: 782px) {
    .agenticwp-chat-toggle {
        bottom: var(--agenticwp-space-xl);
        right: var(--agenticwp-space-xl);
        width: 50px;
        height: 50px;
    }

    .agenticwp-chat-panel {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        height: calc(100vh - 120px);
    }
}

/* Micro-interaction animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 113, 227, 0);
    }
}

@keyframes streak-fire {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

/* Apply animations - GPU accelerated with fill-mode */
.agenticwp-stat-card {
    animation: fadeIn 0.3s ease-out both;
}

.agenticwp-stat-card:nth-child(2) { animation-delay: 0.04s; }
.agenticwp-stat-card:nth-child(3) { animation-delay: 0.08s; }
.agenticwp-stat-card:nth-child(4) { animation-delay: 0.12s; }
.agenticwp-stat-card:nth-child(5) { animation-delay: 0.16s; }
.agenticwp-stat-card:nth-child(6) { animation-delay: 0.2s; }

.agenticwp-stat-card--streak .agenticwp-stat-card-icon {
    animation: streak-fire 2.5s ease-in-out infinite;
    will-change: transform, opacity;
}

.agenticwp-level-banner {
    animation: scaleIn 0.4s ease-out;
}

.agenticwp-achievement-badge-icon {
    animation: scaleIn 0.3s ease-out;
}