:root {
    --color-bg-primary: #f0f0f1;
    --color-bg-secondary: #ffffff;
    --color-bg-secondary-gradient-bottom: linear-gradient(to bottom, #F6FAFD, #EEF0F6);
    --color-bg-row-odd: #f9f9f9;
    --color-bg-row-even: #ffffff;
    --color-bg-row-hover: rgba(0, 124, 186, .05);
    --color-text-primary: #1d2327;
    --color-text-secondary: #2c3338;
    --color-text-muted: #646970;
    --color-text-accent: #068AC6;
    --border-accent-dark: 1px solid rgba(0, 124, 186, .3);
    --border-standard: 1px solid #CED6DE;
    --border-radius-sm: 3px;
    --border-radius: 4px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, .1);
    --shadow-glow: 0 0 5px rgba(0, 124, 186, .2);
    --space-xs: .5rem;
    --space-sm: .75rem;
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-md: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    --font-size-4xl: 28px;
    --font-size-5xl: 46px;
    --table-height: 65vh;
    --scrollbar-width: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-height: 100vh;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.container {
    height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-lg);
    gap: var(--space-lg);
    display: grid;
}

.header {
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--border-radius);
    border: var(--border-standard);
    box-shadow: var(--shadow-sm);
    background: var(--color-bg-secondary-gradient-bottom);
}

.title {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.title h1 {
    font-size: var(--font-size-2xl);
    color: var(--color-text-primary);
    letter-spacing: -.025em;
    font-weight: 600;
}

.subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.system-info {
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    border: var(--border-standard);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: block;
}

.system-info > * {
    margin-bottom: var(--space-lg);
}

.system-info > *:last-child {
    margin-bottom: 0;
}

.system-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #41C950;
}

.system-info > div:first-child,
.system-info > div:first-child + .grade-container {
    margin-bottom: 0;
}

.system-info > div:first-child + .grade-container + * {
    margin-top: var(--space-lg);
}

.system-info > div:first-child {
    display: inline-block;
    width: 80%;
    vertical-align: top;
    margin-right: 0;
}

.system-info > div:first-child h1 {
    margin: 0;
}

.system-info > div:first-child + .grade-container {
    display: none;
    width: 20%;
    vertical-align: top;
    margin-left: 0;
}

.system-info > div:first-child + .grade-container[style*="flex"] {
    display: inline-flex !important;
}

.system-info {
    font-size: 0;
}

.system-info > * {
    font-size: 1rem;
}

.hosting-info {
    font-size: 1rem;
}

.timer-score {
    font-size: var(--font-size-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: var(--border-standard);
    width: 100%;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    flex: 0 0 80%;
    width: 80%;
}

.grade-container {
    text-align: center;
    display: none;
    align-items: center;
    flex-direction: column;
    gap: var(--space-xs);
    justify-content: center;
}

.grade-display {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    letter-spacing: -.025em;
    transition: color .3s;
    line-height: var(--space-xl);
}
.grade-circle {
    padding: 2.5rem;
    z-index: 1;
    border: 6px currentColor solid;
    background: #FFF;
    border-radius: 100%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.grade-description {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .9;
}

.server-info {
    display: block;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: var(--font-size-2xl);
}

.hosting-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.table-container {
    height: var(--table-height);
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    border: var(--border-standard);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: var(--space-lg);
}

.test-results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--font-size-md);
    border-radius: var(--border-radius);
    background: var(--color-bg-secondary);
    box-shadow: var(--shadow-sm);
    border: var(--border-standard);
}

.test-results-table thead tr:first-child th:first-child {
    border-top-left-radius: var(--border-radius);
}

.test-results-table thead tr:first-child th:last-child {
    border-top-right-radius: var(--border-radius);
}

.test-results-table tfoot tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius);
}

.test-results-table tfoot tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius);
}

.test-results-table tbody {
    display: block;
    overflow-y: auto;
    height: calc(var(--table-height) - 7rem);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 124, 186, 0.2) var(--color-bg-secondary);
    font-size: var(--font-size-md);
}

.test-results-table tfoot,
.test-results-table thead {
    display: table;
    table-layout: fixed;
    width: 100%;
}

.test-results-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
    transition: background-color .2s;
}

.test-results-table td,
.test-results-table th {
    width: 25%;
    padding: var(--space-xs) var(--space-lg);
}

.test-results-table tfoot td {
    padding: var(--space-md) var(--space-lg);
}

.test-results-table th {
    color: var(--color-text-accent);
    font-weight: 600;
    letter-spacing: .05em;
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    background: var(--color-bg-secondary-gradient-bottom);
}

.test-results-table tfoot td {
    color: var(--color-text-secondary);
    font-size: var(--font-size-md);
    font-weight: 600;
}

.test-results-table tbody:last-child {
    border: none;
}

.test-results-table tbody::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

.test-results-table tbody::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
    border-radius: 4px;
}

.test-results-table tbody::-webkit-scrollbar-thumb {
    background: rgba(0, 124, 186, .15);
    border: 2px solid var(--color-bg-secondary);
    border-radius: 4px;
    transition: background-color .2s;
}

.test-results-table tbody::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 124, 186, .3);
}

.test-results-table tbody::-webkit-scrollbar-corner {
    background: var(--color-bg-secondary);
}

.loading {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-text-accent);
    font-size: var(--font-size-base);
}

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(0, 124, 186, .1);
    border-top-color: var(--color-text-accent);
    border-radius: 50%;
    animation: 1s linear infinite spin;
    box-shadow: var(--shadow-glow);
}

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

.test-results-table tbody tr:nth-child(odd) {
    background-color: var(--color-bg-row-odd);
}

.test-results-table tbody tr:nth-child(2n) {
    background-color: var(--color-bg-row-even);
}

.test-results-table tfoot {
    position: sticky;
    bottom: 0;
    background-color: var(--color-bg-secondary) !important;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .05);
    border-bottom-left-radius: var(--border-radius);
}

.test-results-table tbody tr:hover {
    background-color: var(--color-bg-row-hover) !important;
}

.hosting-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.hosting-info-form {
    background: var(--color-bg-secondary);
    border: var(--border-standard);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e5e5;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: var(--color-text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.form-section p {
    margin: 0 0 20px 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.server-hosting-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    border: var(--border-standard);
    box-shadow: var(--shadow-sm);
}

.server-hosting-section h3 {
    color: var(--color-text-primary);
    margin: 0 0 15px 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.server-hosting-section p {
    color: var(--color-text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.section-label {
    display: block;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: var(--font-size-sm);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: var(--color-bg-primary);
}

.radio-option:hover {
    background: var(--color-bg-row-hover);
    border-color: var(--border-accent-dark);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-custom {
    position: relative;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-text-muted);
    border-radius: 50%;
    background: var(--color-bg-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--color-text-accent);
    background: var(--color-text-accent);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.radio-option input[type="radio"]:checked ~ .radio-label {
    color: var(--color-text-accent);
    font-weight: 600;
}

.radio-label {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
    flex: 1;
}

.terms-content {
    margin-bottom: 20px;
    line-height: 1.4;
    margin-top: 20px;
}

.terms-content h3 {
    color: var(--color-text-primary);
    margin: 20px 0 10px;
}

.terms-content ul {
    margin-left: 15px;
    list-style-type: disc;
}

.terms-content li {
    margin-bottom: 6px;
}

.terms-content a {
    color: var(--color-text-accent);
    text-decoration: none;
}

.terms-content a:hover {
    text-decoration: underline;
}

.terms-checkbox {
    margin: 20px 0;
}

.terms-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}

.terms-checkbox input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
}

.button {
    display: inline-block;
    padding: 8px 12px;
    font-size: var(--font-size-base);
    color: #fff;
    background: var(--color-text-accent);
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    min-width: 150px;
    transition: background-color 0.15s ease-in-out;
}

.button:hover {
    background-color: #135e96;
}

.button:focus {
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--color-text-accent);
    outline: none;
}

.benchmark-controls {
    text-align: left;
    margin: 20px 0px;
}

.benchmark-controls .button {
    min-width: 150px;
}

.text-green-900.bg-green-600 {
    color: #14532d;
    background-color: #16a34a;
}

.text-green-900.bg-green-500 {
    color: #14532d;
    background-color: #22c55e;
}

.text-green-900.bg-green-400 {
    color: #14532d;
    background-color: #4ade80;
}

.text-lime-950.bg-lime-500 {
    color: #1a5d1a;
    background-color: #84cc16;
}

.text-lime-950.bg-lime-400 {
    color: #1a5d1a;
    background-color: #a3e635;
}

.text-yellow-900.bg-yellow-500 {
    color: #713f12;
    background-color: #eab308;
}

.text-yellow-900.bg-yellow-400 {
    color: #713f12;
    background-color: #facc15;
}

.text-orange-900.bg-orange-500 {
    color: #7c2d12;
    background-color: #f97316;
}

.text-red-900.bg-red-500 {
    color: #7f1d1d;
    background-color: #ef4444;
}

.text-red-950.bg-red-700 {
    color: #450a0a;
    background-color: #b91c1c;
}

@media screen and (max-width: 768px) {
    .container {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    .system-info > div:first-child {
        display: block;
        width: 100%;
    }
    .system-info > div:first-child h1 {
        width: 100%;
    }
    .system-info > div:first-child + .grade-container {
        display: block !important;
        width: 100%;
    }
    .server-info {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .timer-score {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    .timer-container {
        flex: 1 1 100%;
        width: 100%;
    }
    .grade-container {
        flex: 1 1 100%;
        width: 100%;
    }
    .loading {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
    }
    .timer-container {
        flex-direction: column;
        align-items: center;
        gap: var(--space-xs);
    }
    .grade-display {
        font-size: var(--font-size-3xl);
    }
    .test-results-table {
        font-size: var(--font-size-sm);
    }
    .test-results-table td,
    .test-results-table th {
        padding: var(--space-xs) var(--space-sm);
    }
    .table-container {
        overflow-x: auto;
        height: auto;
        max-height: var(--table-height);
    }
    .test-results-table tbody {
        height: auto;
        max-height: calc(var(--table-height) - 7rem);
    }
    .title {
        font-size: var(--font-size-lg);
    }
    .subtitle {
        font-size: .8rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: var(--space-xs);
    }
    .system-info {
        padding: var(--space-md);
        position: relative;
    }
    .grade-display {
        font-size: var(--font-size-2xl);
    }
    .test-results-table {
        font-size: var(--font-size-xs);
    }
    .test-results-table td,
    .test-results-table th {
        padding: .4rem var(--space-xs);
    }
}

.php-vitals-admin .container,
.php-vitals-admin .timer-main {
    flex-direction: column;
    display: flex;
}

.php-vitals-admin .header,
.php-vitals-admin .test-results-table th {
    background: var(--color-bg-secondary-gradient-bottom);
    border-radius: var(--border-radius);
}

.php-vitals-admin .test-results-table thead {
    border-bottom: var(--border-standard);
}

.php-vitals-admin .test-results-table tfoot {
    padding: 20px;
}

.php-vitals-admin .test-results-table tfoot td {
    border-bottom: var(--border-standard);
}

.php-vitals-admin .test-results-table thead {
    border-bottom: var(--border-standard);
}

.php-vitals-admin body {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

.php-vitals-admin .container {
    height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-lg);
    gap: var(--space-lg);
}

.php-vitals-admin .header {
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--border-radius);
    border: var(--border-standard);
    box-shadow: var(--shadow-sm);
}

.php-vitals-admin .title {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.php-vitals-admin .title h1 {
    font-size: var(--font-size-2xl);
    color: var(--color-text-primary);
    letter-spacing: -.025em;
    font-weight: 600;
}

.php-vitals-admin .subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.php-vitals-admin .grade-display {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    letter-spacing: -.025em;
    transition: color .3s;
}