/* 证书核验系统样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.navbar {
    background-color: #3498db;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.navbar li {
    margin: 0;
}

.navbar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 15px 25px;
    transition: background-color 0.3s;
    border-radius: 8px;
}

.navbar a:hover {
    background-color: #2980b9;
}

.navbar a.active {
    background-color: #2c3e50;
    font-weight: bold;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
}

/* 主要内容样式 */
main {
    margin-bottom: 30px;
}

section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

section h4 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.2em;
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 结果显示样式 */
.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
}

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

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

/* 证书信息样式 */
.cert-info {
    margin-top: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.cert-info p {
    margin-bottom: 10px;
}

.cert-info p:last-child {
    margin-bottom: 0;
}

/* QR码样式 */
.qr-section {
    text-align: center;
}

.qrcode {
    margin: 20px 0;
}

.qr-cert {
    margin-top: 20px;
    text-align: center;
}

/* 管理界面样式 */
.admin-section {
    animation: fadeIn 0.5s ease-in;
}

/* 管理员头部样式增强 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background-color: #3498db;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.admin-header h2 {
    margin: 0;
    padding: 0;
    border-bottom: none;
    color: #fff;
    font-size: 2em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 管理区域卡片样式增强 */
.admin-section section {
    margin-bottom: 35px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #e1e8ed;
}

.admin-section section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 管理面板标题样式 */
.admin-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.6em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 12px;
    font-weight: 600;
}

.admin-section h4 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 500;
    margin-top: 30px;
}

/* 证书列表表格增强 */
.cert-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.cert-table:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.cert-table th {
    background-color: #3498db;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 18px;
    text-align: left;
}

.cert-table td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
    font-size: 15px;
    color: #34495e;
}

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

.cert-table tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-header h2 {
    margin: 0;
    padding: 0;
    border-bottom: none;
    color: #fff;
}

.login-section {
    max-width: 500px;
    margin: 50px auto;
    padding: 50px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 证书列表样式 */
.cert-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cert-table th, .cert-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cert-table th {
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.cert-table tr {
    transition: background-color 0.3s, transform 0.1s;
}

.cert-table tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

/* 按钮样式增强 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 表单样式增强 */
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 区域卡片样式 */
section {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* 扫码核验区域样式 */
.qr-reader {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 2px dashed #3498db;
    margin-bottom: 20px;
}

.qr-reader video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 20px;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    section {
        padding: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #logoutBtn {
        margin-top: 10px;
    }
    
    .cert-table {
        font-size: 14px;
    }
    
    .cert-table th, .cert-table td {
        padding: 8px;
    }
}