/* ===== Global Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8f9fa; /* soft light background */
    color: #333; /* readable text color */
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

header h1 {
    font-size: 2rem;
    color: #0166ff; /* main soft blue accent */
    margin-bottom: 0.5rem;
}

header p {
    color: #666;
    font-weight: 400;
}

/* ===== Main ===== */
main {
    flex: 1;
    width: 100%;
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===== Mode Selector ===== */
.mode-selector {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.mode-selector label {
    font-weight: 600;
    color: #555;
    cursor: pointer;
}

.mode-selector input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #0166ff;
}

/* ===== Inputs ===== */
textarea, input[type="url"] {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s ease;
}

textarea:focus, input[type="url"]:focus {
    outline: none;
    border-color: #0166ff;
    box-shadow: 0 0 10px rgba(1, 102, 255, 0.2);
}

/* ===== Button ===== */
button {
    display: block;
    width: 100%;
    max-width: 250px;
    margin: 1.5rem auto;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #0166ff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #0052cc;
    transform: translateY(-2px);
}

/* ===== Progress Bar ===== */
#progressBar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
    height: 12px;
}

#progress {
    width: 0;
    height: 100%;
    background-color: #0166ff;
    transition: width 0.3s ease;
}

/* ===== Result Section ===== */
#result {
    margin-top: 2rem;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0166ff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #666;
    font-size: 0.9rem;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

footer a {
    color: #0166ff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== Utility ===== */
.hidden {
    display: none;
}

/* ===== Result Table ===== */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(1, 102, 255, 0.05);
}

.result-table thead {
    background-color: #f1f5ff; /* soft blue tint for header */
}

.result-table th, .result-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.result-table th {
    color: #0166ff;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.result-table td {
    color: #333;
    font-size: 0.95rem;
}

.result-table tr:last-child td {
    border-bottom: none;
}

.result-table tr:hover {
    background-color: #f9fbff;
    transition: background 0.2s ease;
}

/* subtle highlight for numeric score cells */
.result-table td:nth-child(2) {
    text-align: right;
    font-weight: 500;
    color: #0052cc;
}
