body {
    font-family: "Montserrat", "Verdana", "Helvetica", sans-serif;
    font-weight: 500;
    margin: 0;
    padding: 20px 80px;
    min-height: 100vh;
    transition: background 0.3s ease;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.all-passed {
    background-image: url('../images/greenfields.jpg?w=1920');
    background-color: #e8f5e9; /* fallback */
}

body.tests-failing {
    background-image: url('../images/fire.jpg?w=1920');
    background-color: #ffebee; /* fallback */
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
}

.page-header h1 {
    margin: 0;
    font-size: 32px;
    color: #333;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.tests-failing .page-header h1 {
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.page-header a {
    background: rgb(82, 39, 158);
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
}

.page-header a:hover {
    background: rgb(65, 31, 126);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 2px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    line-height: 1.4;
}

th {
    background: #201240;
    color: white;
    padding: 6px 12px;
}

tr:hover {
    background: #f5f5f5;
}

tbody tr:hover {
    background: #f5f5f5;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 150px;
}

.badge-passed {
    background: rgb(109, 185, 122);
    color: white;
}

.badge-failed {
    background: rgb(202, 73, 51);
    color: white;
}

.badge-running {
    background: #ff9800;
    color: white;
}

.badge-pending {
    background: #9e9e9e;
    color: white;
}

.badge-never_run {
    background: #e0e0e0;
    color: #666;
}

/* Spinner animation for RUNNING */
.spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Three dots animation for PENDING */
.dots {
    display: inline-block;
    width: 20px;
    text-align: left;
}

.dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.run-button {
    padding: 4px 8px;
    background: rgb(82, 39, 158);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.run-button:hover {
    background: rgb(65, 31, 126);
}

.run-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}
