/* RESET & BASE STYLES */
body {
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* TOOL CONTAINER */
.wpex-bench-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin: 20px;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    overflow: hidden;
    color: #333;
}

/* HEADER SECTION */
.wpex-bench-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.wpex-bench-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.wpex-bench-desc {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* GRID LAYOUT */
.wpex-bench-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    padding: 30px;
    gap: 15px;
}

/* METRIC CARDS */
.wpex-bench-card {
    background: #fff;
    border: 1px solid #eef2f5;
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.wpex-bench-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: #007bff;
}

.wpex-bench-icon {
    font-size: 20px;
    margin-bottom: 10px;
    display: inline-block;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
}

.wpex-bench-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #adb5bd;
    font-weight: 700;
    margin-bottom: 5px;
}

.wpex-bench-value {
    font-size: 22px;
    font-weight: 800;
    color: #2c3e50;
    min-height: 28px;
}

.wpex-bench-unit {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    display: block;
    margin-top: 2px;
}

/* ACTION AREA - COMPACT ROW */
.wpex-bench-actions {
    padding: 0 30px 30px;
    text-align: center;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px; /* Compact gap */
    align-items: center;
}

/* Full width containers inside flex actions */
.wpex-bench-log, .wpex-bench-status, .wpex-bench-verdict {
    width: 100%;
    flex-basis: 100%;
}

/* LOG & STATUS */
.wpex-bench-log {
    margin-bottom: 15px;
    font-size: 13px;
    color: #6c757d;
    font-family: monospace;
    min-height: 18px;
}

.wpex-bench-status {
    margin: 0 auto 20px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

.wpex-bench-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #007bff, #00d2ff);
    transition: width 0.3s ease;
}

/* COMPACT BUTTONS */
.wpex-bench-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 18px; /* Compact Padding */
    font-size: 13px;    /* Compact Font */
    font-weight: 700;
    border-radius: 4px; /* Slightly squarer for compact look */
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
    outline: none;
    display: inline-block;
    text-decoration: none;
    white-space: nowrap; /* Prevent text wrap */
    flex-grow: 0;
}

.wpex-bench-btn:hover {
    background: #0069d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.wpex-bench-btn:disabled {
    background: #d6d8db;
    color: #fff;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Variants */
.wpex-bench-btn-buy {
    background: #28a745;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
    display: none; 
}
.wpex-bench-btn-buy:hover {
    background: #218838;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.wpex-bench-btn-secondary {
    background: #6c757d;
    box-shadow: 0 2px 5px rgba(108, 117, 125, 0.2);
}
.wpex-bench-btn-secondary:hover { background: #5a6268; }

.wpex-bench-btn-cloud {
    background: #6610f2;
    box-shadow: 0 2px 5px rgba(102, 16, 242, 0.2);
}
.wpex-bench-btn-cloud:hover { background: #520dc2; }

/* VERDICT BOX */
.wpex-bench-verdict {
    display: none;
    margin: 0 auto 20px;
    padding: 15px;
    background: #e3fcef;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    font-size: 14px;
    animation: wpexFadeIn 0.5s ease;
}

.wpex-verdict-title {
    font-weight: 800;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

/* COMPARISON SECTION */
.wpex-compare-area {
    background: #fafbfc;
    padding: 30px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.wpex-compare-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.wpex-compare-input-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.wpex-compare-input {
    padding: 9px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 300px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
    color: #333;
}

.wpex-compare-input:focus { border-color: #007bff; }

.wpex-compare-result-box {
    display: none;
    margin-top: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Table Style Comparison */
.wpex-comp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 13px;
}
.wpex-comp-table th, .wpex-comp-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.wpex-comp-table th { color: #666; font-weight: 600; }
.wpex-comp-table td { color: #333; font-weight: 500; }
.wpex-comp-table tr:last-child td { border-bottom: none; }
.wpex-comp-table .wpex-highlight { color: #28a745; font-weight: 800; }
.wpex-comp-table .wpex-bad { color: #dc3545; }

.wpex-winner-badge {
    margin-top: 10px;
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}
.wpex-loser-badge {
    background: #dc3545;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

.wpex-bg-green { background: #28a745; }

@keyframes wpexFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* DYNAMIC COLORS */
.wpex-text-green { color: #28a745 !important; }
.wpex-text-orange { color: #fd7e14 !important; }
.wpex-text-red { color: #dc3545 !important; }
.wpex-text-blue { color: #007bff !important; }

/* MOBILE RESPONSIVE */
@media (max-width: 600px) {
    .wpex-bench-wrapper { margin: 0; border-radius: 0; border: none; min-height: 100vh; }
    .wpex-bench-header { padding: 25px 20px; }
    .wpex-bench-grid { padding: 20px; }
    .wpex-bench-actions { padding: 0 20px 30px; gap: 5px; }
    .wpex-bench-btn { 
        padding: 10px 12px; 
        font-size: 12px; 
        flex-grow: 1; /* Expand to fill row on mobile */
        max-width: 48%; /* 2 per row */
    }
    .wpex-compare-input { max-width: 100%; box-sizing: border-box; }
    .wpex-compare-area { padding: 20px; }
}