:root {
    --accent: 0, 190, 200; /* Teal/Cyan accent */
    --shadow: hsl(0 0% 0% / 0.7);
    --text-primary: hsl(0, 0%, 100%);
    --text-secondary: hsl(210, 10%, 75%); /* Cooler, neutral gray */
    --bg-card: rgba(22, 27, 34, 0.75); /* Dark blue-gray, slightly more opaque */
    --border-color: rgba(var(--accent), 0.25); /* Accent-based border */
}

/* --- GLOBAL & RESET STYLES --- */
*,
*:after,
*:before {
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-size: 16px; /* Define root font size for consistent rem units */
    overflow-x: hidden; /* Crucial for preventing any horizontal scrollbar */
    -webkit-overflow-scrolling: touch; /* Smoother scrolling on iOS */
}

body {
    background: linear-gradient(135deg, #0D1117 0%, #161B22 100%); /* Dark neutral/blue gradient */
    display: flex;
    flex-direction: column; /* Stack cards vertically */
    align-items: center; /* Horizontally center cards */
    justify-content: flex-start; /* Align cards to the top */
    min-height: 100vh;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    position: relative;
    gap: 2rem; /* Space between cards */
    padding: 2rem 1rem; /* Consistent padding around the main content area */
}

/* --- CUSTOM SCROLLBAR STYLING --- */
::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(var(--accent), 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(var(--accent));
}

/* --- GRID BACKGROUND --- */
body::before {
    --size: 45px;
    --line: rgba(var(--accent), 0.1); /* Accent-based grid lines, more subtle */
    content: "";
    height: 100vh; /* Using vh to ensure it covers viewport */
    width: 100vw; /* Takes full viewport width */
    position: fixed;
    background:
        linear-gradient(90deg, var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size),
        linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size);
    mask: linear-gradient(145deg, transparent 30%, black);
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

/* --- CARD STRUCTURE --- */
.card {
    width: 100%;
    max-width: 1100px;
    min-width: 300px;
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.content {
    background: rgba(15, 15, 20, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- HEADER STYLES --- */
.heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(var(--accent), 0.5);
}

.heading svg {
    width: 16px;
}

.heading .badge {
    margin-left: auto;
    border: 1px solid rgba(var(--accent), 0.3);
    background: rgba(var(--accent), 0.1);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgb(var(--accent));
}

.heading .badge svg {
    width: 14px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    font-family: system-ui, -apple-system, sans-serif;
}

/* --- INFO LIST (DL) STYLES --- */
dl {
    display: grid;
    grid-template-columns: minmax(min-content, max(100px, 25%)) 1fr;
    gap: 2rem 2rem;
    margin: 0;
    font-family: monospace;
    font-size: 1rem;
    margin-top: 1rem;
    width: 100%;
    overflow: hidden;
}

dt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    white-space: normal;
    text-align: left;
    flex-shrink: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

dt svg {
    width: 16px;
    flex-shrink: 0;
}

dd {
    margin: 0;
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

/* Align links in the bottom card to the right */
.card:last-of-type dd {
    text-align: right;
}

@media (max-width: 500px) {
    dl {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    dd, .card:last-of-type dd {
        text-align: left;
        padding-left: calc(16px + 1rem);
    }
}

/* --- UTILITY & LINK STYLES --- */
.prepaid {
    color: rgb(var(--accent));
    background: rgba(var(--accent), 0.1);
    padding: 0.2em 0.6em;
    border-radius: 4px;
    text-decoration: none !important;
    border-bottom: none !important;
}

a, a:link, a:visited, a:hover, a:active {
    color: rgb(var(--accent));
    transition: color 0.2s ease;
    text-decoration: none !important;
    border-bottom: none !important;
}

a:hover {
    color: #fff;
}

/* --- TEST-SPECIFIC STYLES --- */
.test-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.test-result:last-child {
    border-bottom: none;
}

.test-result svg {
    width: 20px;
    height: 20px;
}

.test-passed {
    color: #4CAF50; /* Green */
}

.test-failed {
    color: #F44336; /* Red */
}

.test-warning {
    color: #FFEB3B; /* Yellow */
}

.test-error {
    color: #ff9800; /* Orange */
}