/* ===== ICLICP 统一样式表 ===== */

/* 1. 全局样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background: linear-gradient(180deg, #eef5ff 0%, #f5f7fb 100%);
}

html {
    scroll-behavior: smooth;
}

/* 2. 文本样式 */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: #0f172a;
}

h1 { font-size: 32px; margin-bottom: 20px; }
h2 { font-size: 28px; margin-bottom: 18px; }
h3 { font-size: 22px; margin-bottom: 15px; }
h4 { font-size: 18px; margin-bottom: 12px; }

p { margin: 0 0 12px; }

a {
    color: #007BFF;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* 3. 头部导航栏 */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 0 auto 20px;
    max-width: 980px;
}

.topbar.page-shell {
    max-width: 980px;
    margin: 0 auto 20px;
}

.brand-link {
    color: #007BFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.brand-link:hover {
    color: #0056b3;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

/* 4. 语言切换器 */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    overflow: hidden;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lang-option {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    text-decoration: none;
    color: #555;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: #e9f2ff;
    color: #0056b3;
}

.lang-option.active {
    background: #007BFF;
    color: #fff;
    font-weight: 600;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #555;
    font-size: 15px;
}

nav a:hover {
    color: #007BFF;
}

/* 5. 英雄区段 */
.hero {
    background: linear-gradient(135deg, #007BFF 0%, #0056b3 100%);
    color: #fff;
    padding: 80px 5%;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: 36px;
    color: #fff;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin: 20px 0 30px;
}

.site-footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 30px 5%;
    font-size: 14px;
}

.site-footer p {
    margin: 0 auto;
    text-align: center;
}

.site-footer-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 6. 按钮样式 */
.btn-main,
button,
.primary-btn {
    background: linear-gradient(135deg, #007BFF 0%, #0056b3 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-main {
    background: #ffc107;
    color: #333;
    padding: 12px 30px;
    border-radius: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-main:hover {
    background: #e0a800;
}

button:hover,
.primary-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.btn-pay {
    display: block;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #fff;
    border: none;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.btn-pay:hover {
    background: #218838;
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

/* 7. 部分样式 */
.section {
    padding: 60px 5%;
    text-align: center;
}

.section-grey {
    background: #f9f9f9;
}

.section h2 {
    font-size: 28px;
    margin-bottom: 40px;
    position: relative;
}

.section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: #007BFF;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* 8. 课程卡片 */
.course-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.course-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    width: 280px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.course-card:hover {
    border-color: #007BFF;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.15);
    transform: translateY(-5px);
}

.course-card h3 {
    margin-top: 0;
    color: #222;
}

.course-meta {
    font-size: 14px;
    color: #777;
    margin: 10px 0;
}

.course-price {
    font-size: 20px;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 15px;
}

/* 9. 表单样式 */
.form-container,
.pay-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 22px;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.pay-container {
    max-width: 450px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #475569;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: 2px solid rgba(0, 123, 255, 0.15);
    border-color: #007BFF;
}

input[type="file"] {
    display: block;
    margin: 12px 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

input[type="radio"] {
    margin-right: 8px;
}

/* 10. 表格样式 */
table {
    width: 100%;
    max-width: 980px;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 14px 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

th {
    background: #eef5ff;
    color: #1e3a5f;
    font-weight: 600;
}

tr:hover {
    background: #f8fafc;
}

/* 11. 容器和布局 */
.container,
.page-shell,
.lesson-shell {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.lesson-shell {
    border: 1px solid #e6e6e6;
}

.page-shell {
    max-width: 980px;
    margin: 0 auto;
}

/* 12. 内容区域 */
.content {
    background: #f9fafb;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 18px;
    line-height: 1.8;
    margin: 20px 0;
}

.quiz-box {
    margin-top: 20px;
    border-top: 1px solid #dfeaf7;
    padding-top: 18px;
}

.quiz-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.quiz-card p {
    margin: 0 0 12px;
    font-weight: 600;
}

.option-row {
    display: block;
    margin: 8px 0;
    color: #2f3b52;
}

/* 13. 结果盒子 */
.result-box {
    padding: 14px 16px;
    border-radius: 10px;
    margin: 16px 0;
    border: 1px solid;
}

.result-box.success {
    background: #ebfdf4;
    color: #166534;
    border-color: #a7f3d0;
}

.result-box.warning {
    background: #fff7ed;
    color: #9a5b00;
    border-color: #fed7aa;
}

/* 14. 证书样式 */
.certificate-display {
    position: relative;
    max-width: 1000px;
    margin: 32px auto;
    border: 4px solid #d4af37;
    border-radius: 2px;
    padding: 48px 40px;
    background: linear-gradient(135deg, #fffef7 0%, #fffbf0 100%);
    text-align: center;
    box-shadow: 0 16px 40px rgba(212, 175, 55, 0.22), 
                inset 0 0 0 1px rgba(212, 175, 55, 0.3),
                0 0 0 12px #fffef7;
}

.pdf-download-status {
    min-height: 1.25em;
    margin: 10px 0 0;
    color: #475569;
    font-size: 13px;
    text-align: center;
}

.certificate-display::before,
.certificate-display::after {
    content: "";
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 0;
    pointer-events: none;
}

.certificate-seal {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.seal-emblem {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.1), transparent);
    border: 3px solid #d4af37;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.08),
                0 0 0 12px rgba(212, 175, 55, 0.05),
                inset 0 0 20px rgba(212, 175, 55, 0.1),
                0 8px 24px rgba(0, 0, 0, 0.15);
}

.seal-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.certificate-header {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.certificate-org-name {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #0f172a;
    text-transform: uppercase;
    font-family: Georgia, serif;
    line-height: 1.1;
    margin-bottom: 6px;
}

.certificate-program-line {
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #4b5563;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.5;
}

.certificate-divider {
    position: relative;
    z-index: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 20px 0;
}

.certificate-body {
    position: relative;
    z-index: 1;
    margin: 24px 0 28px;
}

.certificate-title {
    font-size: 32px;
    font-weight: bold;
    color: #c41e3a;
    margin: 0 0 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: Georgia, serif;
}

.certificate-subtitle {
    font-size: 16px;
    color: #5a6670;
    margin: 0 0 20px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.certificate-preamble {
    font-size: 14px;
    color: #333;
    margin: 16px 0 12px;
    font-style: italic;
}

.certificate-highlight {
    margin: 14px 0;
    padding: 8px 0;
    border-top: 2px solid #d4af37;
    border-bottom: 2px solid #d4af37;
}

.certificate-name {
    font-size: 28px;
    font-weight: bold;
    color: #0f172a;
    margin: 8px 0;
    letter-spacing: 1px;
    font-family: Georgia, serif;
}

.certificate-course {
    font-size: 20px;
    font-weight: bold;
    color: #c41e3a;
    margin: 6px 0;
    letter-spacing: 0.5px;
}

.certificate-text {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    margin: 12px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.certificate-footer-info {
    position: relative;
    z-index: 1;
    margin: 24px 0;
    display: flex;
    justify-content: center;
    gap: 48px;
    font-size: 13px;
}

.cert-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-label {
    font-weight: 600;
    color: #0f172a;
}

.cert-value {
    color: #007BFF;
    font-weight: 600;
}

.cert-value-mono {
    color: #c41e3a;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 1px;
}

.certificate-signatures {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.signature-block {
    text-align: center;
    flex: 1;
    max-width: 200px;
}

.signature-mark-area {
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.director-signature {
    position: relative;
    z-index: 1;
    max-width: 130px;
    max-height: 48px;
    object-fit: contain;
    margin-bottom: -10px;
}

.signature-date {
    padding-bottom: 4px;
    color: #333;
    font-family: Georgia, serif;
    font-size: 14px;
    font-style: italic;
    white-space: nowrap;
}

.signature-line {
    height: 2px;
    background: #333;
    margin: 0 auto 8px;
    width: 120px;
}

.seal-stamp {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: opacity(0.7);
    margin-bottom: 8px;
}

.signature-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certificate-verification-note {
    position: relative;
    z-index: 1;
    color: #666;
    font-size: 11px;
    margin-top: 20px;
    line-height: 1.6;
}

.cert-number-large {
    font-size: 18px;
    margin: 16px 0;
    letter-spacing: 2px;
    color: #c41e3a;
}

.cert-number-small {
    color: #007BFF;
    font-family: monospace;
    font-size: 12px;
    margin: 8px 0;
}

.certificates-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.cert-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background: #f8fafc;
    transition: all 0.3s;
}

.cert-item:hover {
    border-color: #007BFF;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    background: #f0f7ff;
}

.cert-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cert-course-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 16px;
}

.cert-date {
    color: #666;
    font-size: 14px;
}

/* 15. 消息提示 */
.error {
    color: #dc2626;
}

.success {
    color: #15803d;
}

.error-message {
    background: #fff7ed;
    color: #9a5b00;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 16px 0;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.empty-message {
    text-align: center;
    color: #666;
    padding: 32px;
    font-size: 16px;
}

/* 16. 用户栏 */
.user-bar {
    text-align: right;
    color: #475569;
}

.back-link {
    color: #007BFF;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

.foot-link {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #475569;
}

.foot-link a {
    color: #007BFF;
    text-decoration: none;
}

/* 17. 特殊元素 */
.course-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #007BFF;
}

.price-tag {
    font-size: 32px;
    color: #dc3545;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
}

h2 {
    margin: 0 0 20px;
    font-size: 28px;
    text-align: center;
    color: #0f172a;
}

/* 18. 响应式设计 */
@media (max-width: 768px) {
    .course-grid {
        flex-direction: column;
        align-items: center;
    }

    .course-card {
        width: 100%;
        max-width: 280px;
    }

    .form-container,
    .pay-container {
        width: 90%;
        max-width: 100%;
    }

    header {
        flex-direction: column;
        gap: 10px;
    }

    nav a {
        margin-left: 10px;
    }

    .topbar {
        flex-direction: column;
        gap: 10px;
    }

    .hero {
        padding: 40px 5%;
    }

    .hero h1 {
        font-size: 24px;
    }

    .section {
        padding: 40px 5%;
    }
}

/* 19. 打印样式 */
@media print {
    @page {
        size: letter portrait;
        margin: 8mm;
    }

    html, body {
        background: #fff;
        margin: 0;
        padding: 0;
    }

    .topbar,
    .lang-switcher,
    .action-buttons,
    .back-link,
    .container > p,
    .container > a {
        display: none;
    }

    .container {
        padding: 0;
        max-width: 100%;
    }

    .certificate-display {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin: 0;
        page-break-inside: avoid;
        page-break-after: avoid;
        border: 3px solid #000;
        max-width: 100%;
        box-sizing: border-box;
    }

    .certificate-display::before,
    .certificate-display::after {
        box-shadow: none;
    }

    .seal-emblem {
        box-shadow: none;
    }

    .certificate-verification-note {
        page-break-inside: avoid;
    }
}
