/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 导航栏 */
.navbar {
    background-color: #001529;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-icon {
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.nav-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-icon {
    position: relative;
}

.user-menu {
    position: relative;
}

.user-avatar {
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
}

.user-avatar:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-info {
    padding: 1rem;
    background-color: #f8f9fa;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #001529;
}

.login-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.login-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主内容 */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Flash消息 */
.flash-messages {
    margin-bottom: 1rem;
}

.flash-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: opacity 0.5s;
}

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

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

/* 部署预停机全局横幅 */
.maintenance-banner {
    background: #fffbe6;
    color: #614700;
    border-bottom: 1px solid #ffe58f;
    padding: 0.65rem 0;
    box-shadow: none;
}

.maintenance-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.maintenance-banner-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.maintenance-banner-text strong {
    font-weight: 600;
    margin-right: 0.25rem;
}

.maintenance-banner-meta {
    opacity: 0.92;
    font-size: 0.85rem;
}

.maintenance-banner-meta::before {
    content: '|';
    margin-right: 0.75rem;
    opacity: 0.45;
    color: #d4b106;
}

.maintenance-banner-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    border: 1px solid #d4b106;
    border-radius: 4px;
    background: #fff;
    color: #876800;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.maintenance-banner-btn:hover {
    background: #fff1b8;
    border-color: #faad14;
}

/* Hero区域 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: white;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #001529;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.beijing-clock {
    font-size: 1.6rem;
    color: #444;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}
.beijing-clock #beijing-date-time {
    font-variant-numeric: tabular-nums;
    margin-right: 0.5rem;
}
.beijing-clock #beijing-week-day {
    color: #666;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 按钮 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: rgb(0, 128, 255);
    color: white;
}

.btn-primary:hover {
    background-color: rgb(0, 110, 201);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* 功能卡片 */
.features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.feature-row {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.feature-card {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 0; /* 防止flex item溢出 */
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #001529;
}

.feature-card p {
    color: #666;
}

/* API结果 */
.api-result {
    margin-top: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-result pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

/* 页面头部 */
.page-header {
    text-align: center;
    padding: 2rem 0;
    background: white;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header h1 {
    color: #001529;
    font-size: 2.5rem;
}

/* 内容区域 */
.content-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: #001529;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-section h3 {
    color: #34495e;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.content-section ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* 错误页面 */
.error-page {
    text-align: center;
    padding: 4rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-page h1 {
    font-size: 6rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-page h2 {
    color: #001529;
    margin-bottom: 1rem;
}

.error-page p {
    color: #666;
    margin-bottom: 2rem;
}

/* 页脚 */
.footer {
    background-color: #001529;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-left {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu li {
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .actions {
        flex-direction: column;
    }

    .feature-row {
        flex-direction: column;
    }
    
    .user-dropdown {
        right: -1rem;
    }
}

/* Material仓库样式 */
.material-container {
    margin-top: 2rem;
}

.section-header {
    color: white;
    padding: 1.5rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
    flex: 1;
}

.section-header.nexus-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.section-header.oss-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.material-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.material-content {
    padding: 1.5rem;
}

.refresh-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.refresh-btn:hover:not(.loading) {
    background: rgba(255,255,255,0.3);
}

.refresh-btn.loading {
    cursor: not-allowed;
    opacity: 0.7;
}

.refresh-btn.loading .refresh-text {
    opacity: 0;
}

.refresh-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -8px;
    margin-top: -8px;
}

.refresh-btn.loading .refresh-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.table-container {
    overflow-x: auto;
}

.material-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.material-table thead {
    background-color: #f8f9fa;
}

.material-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.material-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.material-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.file-name {
    color: #333;
    word-break: break-all;
}

.file-date {
    color: #666;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-docker {
    background-color: #0db7ed;
    color: white;
}

.badge-raw {
    background-color: #28a745;
    color: white;
}

.badge-oss {
    background-color: #ff6b35;
    color: white;
}

.download-link {
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
}

.download-link:hover {
    text-decoration: underline;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat-item {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.repo-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

.repo-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
}

.repo-tab:hover {
    color: #333;
    background-color: #f8f9fa;
}

.repo-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.repo-content {
    display: none;
}

.repo-content.active {
    display: block;
}

.format-size {
    white-space: nowrap;
}

.nav-links {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links a {
    color: #0066cc;
    text-decoration: none;
    margin-right: 1rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

