/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.hint {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* 选项样式 */
.options {
    margin-top: 10px;
}

.option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.option:hover {
    background-color: #f8f9fa;
}

.option input {
    margin-right: 10px;
}

.option label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
    color: white;
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-link {
    background-color: transparent;
    color: #007bff;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    background-color: transparent;
    color: #0056b3;
    text-decoration: underline;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

/* 验证码页面样式 */
.verification-code-container {
    text-align: center;
    margin-bottom: 30px;
}

.verification-code {
    font-size: 3rem;
    font-weight: bold;
    color: #007bff;
    padding: 20px;
    background-color: #f8f9fa;
    border: 2px dashed #007bff;
    border-radius: 8px;
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.code-note {
    font-size: 14px;
    color: #6c757d;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.back-home {
    text-align: center;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.qr-code-container {
    text-align: center;
    margin: 20px 0;
}

.qr-code {
    max-width: 100%;
    height: auto;
}

.modal-actions {
    text-align: center;
    margin-top: 20px;
}

/* 提示消息样式 */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

/* 警告框样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 表格样式 */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .verification-code {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .verification-code {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 10px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container > header,
.container > main,
.container > footer {
    animation: fadeIn 0.6s ease-out;
}

.container > main {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.container > footer {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}