/* Artseecraft Admin Panel CSS */

/* ===== Base Reset for Admin Panel ===== */
html {
    font-size: 100% !important; /* Override any global font-size */
}

/* ===== Base Layout Styles ===== */

/* 主布局容器 */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    overflow: hidden !important;
}

body {
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* 主flex容器 */
body > .d-flex {
    height: 100vh;
    width: 100%;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    min-width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #212529 !important;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #495057;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.sidebar-header p {
    margin: 0.5rem 0 0 0;
    color: #adb5bd;
}

/* 侧边栏链接样式 */
.sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
    border-left: 3px solid #0d6efd;
}

.sidebar-link {
    color: #adb5bd !important;
}

.sidebar-link:hover {
    color: #fff !important;
}

.sidebar-link.active {
    color: #fff !important;
}

/* 内容区域 */
.content-wrapper {
    margin-left: 250px;
    width: calc(100% - 250px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-wrapper header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.content-wrapper main {
    flex: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.content-wrapper footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

/* Container styles */
.container-fluid {
    max-width: 100%;
    padding: 0 1rem;
}

/* Custom Alert Styles */
.custom-alert {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s;
}

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

.custom-alert .alert-dismissible .alert-message {
    display: flex;
    align-items: center;
    text-align: center;
}

/* ===== Login & Initialize Form Styles ===== */

/* Login card styles */
.login-card {
    max-width: 400px;
    margin: 0 auto;
}

.login-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.login-card .card-body {
    padding: 2rem;
}

/* Initialize card styles */
.init-card {
    max-width: 500px;
    margin: 0 auto;
}

.init-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.init-card .card-body {
    padding: 2rem;
}

/* Form common styles */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    height: 45px;
    font-size: 16px;
    padding: 0.75rem 1rem;
}

.btn-login,
.btn-create {
    height: 45px;
    font-size: 16px;
    font-weight: 500;
}

/* Init tips styles */
.init-tips {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-top: 1rem;
}

.init-tips li {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .login-card .card-body,
    .init-card .card-body {
        padding: 1.5rem;
    }
}

/* ===== News Management Styles ===== */

/* News card styles */
.news-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Table hover styles */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* News summary styles */
.news-summary {
    max-height: 60px;
    overflow: hidden;
    line-height: 1.4;
}

/* Badge styles */
.badge-image {
    background-color: #e3f2fd;
    color: #1976d2;
    font-size: 0.75rem;
}

/* Button layout optimization */
.action-buttons .btn-sm {
    min-width: 140px;
    white-space: nowrap;
}

.primary-actions .btn {
    min-width: 120px;
}

/* Quick operation card styles */
.card.bg-light {
    background-color: #f8f9fa !important;
}

/* Mobile responsive for news */
@media (max-width: 576px) {
    .action-buttons .btn-sm,
    .primary-actions .btn {
        min-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .action-buttons .btn-sm:last-child,
    .primary-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    .d-flex.flex-column.flex-sm-row.justify-content-between {
        align-items: stretch !important;
    }
}

/* News content view styles */
.news-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 0.25rem;
}

.news-content p {
    margin-bottom: 1.2rem;
}

.news-content h2, 
.news-content h3, 
.news-content h4 {
    margin-top: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

/* ===== Product Management Styles ===== */

/* Select2 dropdown styles */
.select2-container--default .select2-selection--single {
    height: 38px;
    padding: 5px 0;
    border: 1px solid #ced4da;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* ===== UI Appearance Configuration Styles ===== */

/* Configuration image preview */
.config-image-preview {
    width: 100px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
}

.empty-image {
    width: 100px;
    height: 60px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Item hover effects */
.banner-item, 
.series-item, 
.feature-item, 
.social-item {
    transition: all 0.3s;
}

.banner-item:hover, 
.series-item:hover, 
.feature-item:hover, 
.social-item:hover {
    background-color: #f8f9fa;
}