/* 中国结等级证书查询系统 - 样式表 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(to bottom, #fef2f2, #fff7ed);
    min-height: 100vh;
}

/* 顶部导航 */
.header {
    background: linear-gradient(to right, #b91c1c, #dc2626, #b91c1c);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.header .subtitle {
    color: #fef3c7;
    font-size: 1.125rem;
}

/* 主容器 */
.container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 2px solid #fecaca;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 1.125rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #dc2626;
}

.form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    background: white;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(to right, #dc2626, #b91c1c);
    color: white;
    width: 100%;
    font-size: 1.25rem;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(to right, #b91c1c, #991b1b);
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: linear-gradient(to right, #059669, #047857);
    color: white;
}

.btn-danger {
    background: linear-gradient(to right, #dc2626, #b91c1c);
    color: white;
}

/* 证书卡片 */
.certificate-card {
    margin-top: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 4px solid #dc2626;
    overflow: hidden;
}

.certificate-header {
    background: linear-gradient(to right, #b91c1c, #dc2626, #b91c1c);
    padding: 1.25rem;
    text-align: center;
}

.certificate-header h2 {
    color: #fef3c7;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.certificate-body {
    padding: 1.5rem;
}

.certificate-title {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #fecaca;
}

.certificate-title h3 {
    color: #b91c1c;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.certificate-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.75rem;
}

.certificate-item label {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.certificate-item span {
    font-weight: 600;
    color: #1f2937;
}

.certificate-item .highlight {
    color: #dc2626;
    font-size: 1.125rem;
}

.certificate-item .status-valid {
    color: #059669;
    font-size: 1.125rem;
}

.certificate-org {
    background: #fef2f2;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid #fecaca;
    margin-top: 1rem;
}

.certificate-footer {
    background: linear-gradient(to right, #b91c1c, #dc2626, #b91c1c);
    padding: 0.75rem;
    text-align: center;
    color: #fef3c7;
    font-size: 0.875rem;
}

/* 使用说明 */
.help-section {
    margin-top: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.help-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.help-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.help-number {
    width: 2.5rem;
    height: 2.5rem;
    background: #fee2e2;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-weight: 700;
    flex-shrink: 0;
}

.help-content h4 {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.help-content p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 等级说明 */
.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.level-item {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
}

.level-item h4 {
    color: #dc2626;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.level-item p {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.technique-link {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9999px;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.technique-link:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: scale(1.05);
}

/* 错误提示 */
.alert-error {
    background: #fef2f2;
    border: 2px solid #fecaca;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    color: #dc2626;
    font-weight: 500;
    margin-top: 1rem;
}

/* 成功提示 */
.alert-success {
    background: #d1fae5;
    border: 2px solid #6ee7b7;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    color: #059669;
    font-weight: 500;
    margin-top: 1rem;
}

/* 底部链接 */
.footer-links {
    margin-top: 2rem;
    text-align: center;
    color: #6b7280;
}

.footer-links a {
    color: #dc2626;
    text-decoration: underline;
}

/* 证书补录链接 */
.supplement-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff7ed;
    border: 2px solid #fed7aa;
    border-radius: 0.75rem;
    color: #c2410c;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.supplement-link:hover {
    background: #ffedd5;
    border-color: #fb923c;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.supplement-link svg {
    color: #ea580c;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: #374151;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-red {
    background: #fee2e2;
    color: #dc2626;
}

.badge-green {
    background: #d1fae5;
    color: #059669;
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .certificate-grid {
        grid-template-columns: 1fr;
    }

    .level-grid {
        grid-template-columns: 1fr;
    }
}
