/* ========================================
   产品版本快讯页面样式
   ======================================== */

/* 版本类型标签颜色 */
.version-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-tag.major {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
}

.version-tag.feature {
    background: linear-gradient(135deg, #4ecdc4 0%, #3db9b0 100%);
    color: #fff;
}

.version-tag.bugfix {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: #fff;
}

.version-tag.security {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: #fff;
}

/* 版本快讯页面特定样式 */
.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-hero h1 i {
    font-size: 2rem;
}

.page-hero .hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
}

/* 筛选栏 */
.filter-bar {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-bar .filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.filter-bar .filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 版本卡片 */
.version-list {
    padding: 40px 0;
}

.version-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.version-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.version-card.featured {
    border: 2px solid #667eea;
}

.version-card.featured::before {
    content: '精选';
    position: absolute;
    top: 20px;
    right: -30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 40px;
    font-size: 12px;
    font-weight: 600;
    transform: rotate(45deg);
}

.version-card {
    position: relative;
}

.version-card-header {
    padding: 24px 28px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.version-info {
    flex: 1;
}

.version-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
    line-height: 1.4;
}

.version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #6c757d;
}

.version-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.version-meta-item i {
    color: #adb5bd;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.version-badge .version-number {
    color: #667eea;
    font-size: 16px;
}

.version-card-body {
    padding: 28px;
}

.version-summary {
    font-size: 1rem;
    color: #495057;
    line-height: 1.7;
    margin-bottom: 20px;
}

.version-content {
    display: none;
    padding-top: 20px;
    border-top: 1px solid #f1f3f5;
}

.version-content.expanded {
    display: block;
}

.version-content h3 {
    font-size: 1.1rem;
    color: #212529;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-content h3:first-child {
    margin-top: 0;
}

.version-content ul {
    margin: 0;
    padding-left: 20px;
}

.version-content li {
    margin-bottom: 8px;
    color: #495057;
    line-height: 1.6;
}

.version-content li strong {
    color: #212529;
}

.version-card-footer {
    padding: 16px 28px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-images {
    display: flex;
    gap: 12px;
}

.version-image-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #dee2e6;
}

.version-actions {
    display: flex;
    gap: 8px;
}

.version-actions button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-expand {
    background: #e9ecef;
    color: #495057;
}

.btn-expand:hover {
    background: #dee2e6;
}

.btn-expand i {
    transition: transform 0.3s ease;
}

.btn-expand.expanded i {
    transform: rotate(180deg);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 12px;
}

.empty-state p {
    color: #6c757d;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 0;
}

.pagination button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

/* ========================================
   管理员面板样式
   ======================================== */

.admin-panel {
    background: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 60px;
}

.admin-header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #fff;
    padding: 24px 0;
    margin-bottom: 0;
}

.admin-header h1 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header h1 i {
    color: #667eea;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-stats {
    display: flex;
    gap: 24px;
}

.admin-stat {
    text-align: center;
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.admin-stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
}

/* 管理员表格 */
.admin-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f8f9fa;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-bottom: 2px solid #dee2e6;
}

.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table .title-cell {
    max-width: 300px;
}

.admin-table .title-cell .title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-table .title-cell .version {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.published {
    background: #d4edda;
    color: #155724;
}

.status-badge.draft {
    background: #fff3cd;
    color: #856404;
}

.status-badge.archived {
    background: #e9ecef;
    color: #6c757d;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-edit:hover {
    background: #1976d2;
    color: #fff;
}

.btn-delete {
    background: #fde8e8;
    color: #d32f2f;
}

.btn-delete:hover {
    background: #d32f2f;
    color: #fff;
}

/* ========================================
   模态框样式
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label .required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

textarea.form-control.content-editor {
    min-height: 200px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.form-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.modal-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========================================
   Toast通知样式
   ======================================== */

.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: #d4edda;
    color: #28a745;
}

.toast.error .toast-icon {
    background: #f8d7da;
    color: #dc3545;
}

.toast.warning .toast-icon {
    background: #fff3cd;
    color: #ffc107;
}

.toast.info .toast-icon {
    background: #d1ecf1;
    color: #17a2b8;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.toast-close {
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #495057;
}

/* ========================================
   确认对话框
   ======================================== */

.confirm-dialog {
    text-align: center;
    padding: 20px;
}

.confirm-dialog-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff3cd;
    color: #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.confirm-dialog h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #212529;
}

.confirm-dialog p {
    color: #6c757d;
    margin-bottom: 24px;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ========================================
   登录模态框
   ======================================== */

.login-modal .modal {
    max-width: 400px;
}

.login-form {
    text-align: center;
}

.login-form .form-group {
    text-align: left;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.login-form h3 {
    margin-bottom: 8px;
    color: #212529;
}

.login-form > p {
    color: #6c757d;
    margin-bottom: 24px;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .page-hero {
        padding: 60px 0 40px;
    }
    
    .page-hero h1 {
        font-size: 1.75rem;
    }
    
    .filter-bar {
        top: 60px;
    }
    
    .filter-bar .filter-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }
    
    .version-card-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .version-card-body {
        padding: 20px;
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 10px;
    }
    
    .modal {
        width: 95%;
        margin: 10px;
    }
}
