/* Reset styles for #pagecache_stats */
#pagecache_stats, #pagecache_stats *, #pagecache_stats a:hover, #pagecache_stats a:visited, #pagecache_stats a:active {
    background: none;
    border: none;
    bottom: auto;
    clear: none;
    cursor: default;
    /* didn't really know what the default for display should be*/
    /*display:inline;*/
    float: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-style: normal;
    height: auto;
    left: auto;
    letter-spacing: normal;
    line-height: normal;
    max-height: none;
    max-width: none;
    min-height: 0;
    min-width: 0;
    overflow: visible;
    position: static;
    right: auto;
    text-align: left;
    text-decoration: none;
    text-indent: 0;
    text-transform: none;
    top: auto;
    visibility: visible;
    white-space: normal;
    width: auto;
    z-index: auto;
}

#pagecache_stats td, #pagecache_stats th {
    padding: 5px 5px;
    border-bottom: 1px dashed #333;
}

#pagecache_stats td, #pagecache_stats th, #pagecache_stats b, #pagecache_stats i {
    color: white;
}

#pagecache_stats td:first-child {
    font-weight: bold;
    color: #777;
    width: 30%;
}

#pagecache_stats thead th {
    color: black;
    padding: 3px;
    text-align: left;
    font-size: 17px;
    font-weight: bold;
    background-color: #777;
    line-height: 24px;
}

#pagecache_stats {
    width: 100%;
    color: white;
    padding: 10px;
}

#pagecache_stats pre {
    color: white;
}

#pagecache_stats tr:hover {
    background-color: #222;
}

#pagecache_stats .cache-title {
    font-weight: bold;
    font-size: 1.4em;
    margin: 0.5rem 0;
}

#pagecache_stats .cache-desc {
    font-size: 1.1em;
    margin: 0.5rem 0;
}

/* Gauge container */
#jprestaGaugeContainer {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    cursor: move;
    transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 30px rgba(0, 0, 0, 0.8));
}

#jprestaGaugeContainer.visible {
    bottom: 0;
}

#jprestaGaugeContainer.elevated {
    bottom: 250px;
}

/* Glass overlay effects */
#glassOverlay {
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Subtle shimmer animation on glass */
@keyframes glassShimmer {
    0%,
    100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

#glassOverlay ellipse:first-of-type {
    animation: glassShimmer 4s ease-in-out infinite;
}

/* Context info area */
#jprestaContextsInfos {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 250px;
    background: #131313;
    border-radius: 10px 10px 0 0;
    z-index: 1000000;
    display: none;
    overflow: auto;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease-out;
}

#jprestaContextsInfos.visible {
    display: block;
}

/* Loading animation */
.loading-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #131313;
    overflow: hidden;
}

/* Animated shimmer effect */
.loading-reflection::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.1) 25%,
        rgba(102, 126, 234, 0.3) 50%,
        rgba(102, 126, 234, 0.1) 75%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

/* Pulsing dots */
.loading-reflection::after {
    content: "Loading";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

.context-content {
    color: #fff;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeIn 0.5s ease-in;
}

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

.context-content h3 {
    margin-top: 0;
    color: #4caf50;
    font-size: 18px;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.context-item {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    border-left: 3px solid #667eea;
    transition: all 0.3s ease;
}

.context-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #4caf50;
    transform: translateX(5px);
}

.context-label {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.context-value {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
}

/* Add a progress bar animation for visual interest */
.stat-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #4caf50);
    border-radius: 2px;
    animation: fillBar 1s ease-out forwards;
}

@keyframes fillBar {
    from {
        width: 0%;
    }
    to {
        width: var(--fill-width, 100%);
    }
}
