/* SkillScoop Certificate - Public Page */

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

body.ssc-cert-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #2d3748;
    min-height: 100vh;
    padding: 0 0 60px;
}

.ssc-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.ssc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    margin-bottom: 28px;
}
.ssc-logo-link { text-decoration: none; }
.ssc-logo-link img { height: 36px; width: auto; max-width: 160px; }
.ssc-site-name { font-size: 18px; font-weight: 700; color: #1a202c; }
.ssc-site-name { font-size: 22px; font-weight: 700; color: #1a202c; }

.ssc-verify-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e6fff3;
    border: 1px solid #a3e6c3;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1a7a4a;
}
.ssc-badge-dot {
    width: 8px; height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: ssc-pulse 1.5s infinite;
}
@keyframes ssc-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
    50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ── Certificate image ───────────────────────────────────────────────── */
.ssc-cert-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,.12);
    overflow: hidden;
    margin-bottom: 24px;
}
.ssc-cert-image {
    display: block;
    width: 100%;
    height: auto;
}
.ssc-no-image {
    padding: 60px;
    text-align: center;
    color: #aaa;
    font-size: 16px;
}

/* ── Details card ───────────────────────────────────────────────────── */
.ssc-details-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    padding: 28px 32px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.ssc-details-left { flex: 1; }

.ssc-student-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}
.ssc-subtitle {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
}

.ssc-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.ssc-info-table td {
    padding: 8px 4px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.ssc-info-table td:first-child {
    width: 130px;
    color: #718096;
    font-weight: 500;
}
.ssc-info-table td:last-child { font-weight: 500; color: #2d3748; }
.ssc-info-table code { font-size: 12px; background: #f7fafc; padding: 2px 6px; border-radius: 3px; }

/* QR */
.ssc-qr-wrap {
    text-align: center;
    flex-shrink: 0;
}
.ssc-qr-img {
    width: 120px;
    height: 120px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: block;
    margin-bottom: 6px;
}
.ssc-qr-label { font-size: 11px; color: #a0aec0; }

/* Buttons */
.ssc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ssc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all .2s;
}
.ssc-btn-primary { background: #4f46e5; color: #fff; }
.ssc-btn-primary:hover { background: #3730a3; color: #fff; }
.ssc-btn-outline { background: transparent; color: #4f46e5; border-color: #4f46e5; }
.ssc-btn-outline:hover { background: #eef2ff; }

/* Verify footer */
.ssc-verify-footer {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.6;
}
.ssc-verify-icon { font-size: 24px; flex-shrink: 0; }
.ssc-verify-footer a { color: #4f46e5; }

/* Error page */
.ssc-error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}
.ssc-error-box {
    background: #fff;
    border-radius: 16px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0,0,0,.1);
    max-width: 400px;
}
.ssc-error-icon { font-size: 48px; margin-bottom: 16px; }
.ssc-error-box h1 { font-size: 24px; margin-bottom: 10px; }
.ssc-error-box p { color: #718096; margin-bottom: 24px; }

/* Print */
@media print {
    .ssc-page-header, .ssc-details-card .ssc-actions, .ssc-verify-footer { display: none !important; }
    body { background: #fff; }
    .ssc-cert-image { box-shadow: none; }
}

/* Mobile */
@media (max-width: 640px) {
    .ssc-details-card { flex-direction: column; padding: 20px; }
    .ssc-qr-wrap { display: flex; align-items: center; gap: 12px; }
    .ssc-student-name { font-size: 22px; }
    .ssc-actions { flex-direction: column; }
    .ssc-btn { justify-content: center; }
}
