/* 全局样式 */
body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h4 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    padding: 10px 0;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-left-color: white;
    font-weight: 600;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
}

/* 主内容区 */
.main-content {
    padding: 30px;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header p {
    margin: 0;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* 表单样式 */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 171, 47, 0.4);
}

/* 生成的卡密显示 */
.keys-display {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.key-item-display {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.key-item-display:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.key-value-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
    font-size: 1.1em;
}

.key-copy-btn {
    padding: 5px 10px;
    font-size: 0.9em;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.status-used {
    background-color: #fff3cd;
    color: #856404;
}

.status-disabled {
    background-color: #e2e3e5;
    color: #41464b;
}

/* 验证结果样式 */
.validate-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3d5b8 100%);
    border-left: 4px solid #198754;
    padding: 20px;
    border-radius: 8px;
}

.validate-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    border-left: 4px solid #dc3545;
    padding: 20px;
    border-radius: 8px;
}

.validate-info {
    background: linear-gradient(135deg, #cfe2ff 0%, #9ec5fe 100%);
    border-left: 4px solid #0d6efd;
    padding: 20px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    color: #6c757d;
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Toast 样式 */
.toast {
    min-width: 300px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }

    .main-content {
        padding: 15px;
    }

    .nav-item {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .section-header h2 {
        font-size: 1.5em;
    }
}

/* 滚动条样式 */
.keys-display::-webkit-scrollbar {
    width: 8px;
}

.keys-display::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.keys-display::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.keys-display::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

