/* 更新日志样式 */
.changelog-container {
    padding: 2.5rem 0;
}

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* 服务状态 */
.service-status {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.service-status-item {
    flex: 1;
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.service-status-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.service-status-item:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.service-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    width: 100%;
}

.service-status-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-icon {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.8;
}

.service-status-info > div {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.service-status-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.service-status-domain {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.service-status-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

.status-indicator.online {
    background: #10b981;
    color: #10b981;
}

.status-indicator.offline {
    background: #ef4444;
    color: #ef4444;
}

.status-indicator.unknown {
    background: #f59e0b;
    color: #f59e0b;
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 服务状态详情（可展开） */
.service-status-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.service-status-item.expanded .service-status-details {
    max-height: 300px;
    opacity: 1;
    margin-top: 1.5rem;
}

.service-status-detail-content {
    background: rgba(var(--primary-rgb), 0.03);
    border-radius: 8px;
    padding: 1.2rem;
    border-left: 3px solid var(--primary);
    max-height: 250px;
    overflow-y: auto;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(var(--text-rgb), 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

/* 删除旧的样式 */
.status-detail-card,
.status-detail-title,
.status-detail-info,
.status-detail-url,
.status-detail-status,
.status-details-grid {
    display: none !important;
}

/* 筛选容器 */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 筛选头部 */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(var(--text-rgb), 0.1);
}

.filters-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

/* 筛选分组 */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.filter-group-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group-label::before {
    content: "";
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
}

/* 筛选切换按钮 */
.filter-toggle-btn {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    -webkit-tap-highlight-color: transparent;
}

.filter-toggle-btn:hover {
    background: var(--primary);
    color: white;
}

.filter-toggle-btn.active {
    background: var(--primary);
    color: white;
}

/* 搜索包装器 */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.changelog-search-input {
    width: 100%;
    padding: 0.8rem 3rem 0.8rem 2.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.changelog-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.changelog-search-input::placeholder {
    color: var(--text-secondary);
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.clear-search-btn:hover {
    color: var(--primary);
}

/* 可折叠的筛选内容 */
.filters-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    opacity: 0;
}

.filters-content.expanded {
    max-height: 500px;
    opacity: 1;
    margin-top: 1.2rem;
}

.filters-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.filter-reset-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    -webkit-tap-highlight-color: transparent;
}

.filter-reset-btn:hover {
    background: var(--primary);
    color: white;
}

.filter-reset-btn:active {
    transform: scale(0.98);
}

/* 版本筛选 */
.version-filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.version-filter-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-height: 40px;
    min-width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    -webkit-tap-highlight-color: transparent;
}

.version-filter-btn:active {
    transform: scale(0.98);
}

.version-filter-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}

.version-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* 日志列表 */
.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.changelog-loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.changelog-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.changelog-loading p {
    font-size: 1.1rem;
}

.changelog-card {
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.changelog-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.changelog-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.changelog-card.version-dev::before {
    background: #f59e0b;
}

.changelog-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.changelog-version {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.version-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 500;
}

.version-badge.stable {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.version-badge.dev {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.changelog-date {
    color: var(--text-secondary);
    font-size: 1rem;
}

.changelog-dev-note {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.changelog-dev-note i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

.changelog-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.changelog-section {
    background: rgba(var(--primary-rgb), 0.03);
    border-radius: 12px;
    padding: 1.5rem;
}

.changelog-section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.1);
}

.changelog-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.changelog-section-title i {
    color: var(--primary);
}

.changelog-section-title.added {
    color: #10b981;
}

.changelog-section-title.added i {
    color: #10b981;
}

.changelog-section-title.changed {
    color: #f59e0b;
}

.changelog-section-title.changed i {
    color: #f59e0b;
}

.changelog-section-title.fixed {
    color: #3b82f6;
}

.changelog-section-title.fixed i {
    color: #3b82f6;
}

.changelog-content {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-item {
    padding: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.8;
    color: var(--text-secondary);
}

.changelog-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.changelog-item.contributor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.changelog-item.contributor a {
    color: var(--primary);
    text-decoration: none;
}

.changelog-item.contributor a:hover {
    text-decoration: underline;
}

.changelog-item-text {
    display: block;
    padding-left: 0;
}

.changelog-subitem {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    color: var(--text);
    font-size: 0.95rem;
}

.changelog-subitem::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.changelog-empty {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.changelog-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .changelog-container {
        padding: 1.5rem 0;
    }

    .changelog-header {
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
    }

    /* 筛选容器移动端优化 */
    .filters-container {
        padding: 1.2rem;
        gap: 0.8rem;
    }

    .filters-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding-bottom: 0.6rem;
    }

    .filters-title {
        font-size: 1rem;
    }

    .filter-toggle-btn {
        width: 100%;
    }

    .changelog-search-input {
        padding: 0.7rem 2.8rem 0.7rem 2.6rem;
        font-size: 0.95rem;
    }

    .search-wrapper .search-icon {
        left: 0.9rem;
    }

    .clear-search-btn {
        right: 0.9rem;
    }

    /* 服务状态卡片移动端优化 */
    .service-status {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .service-status-item {
        width: 100%;
        padding: 1.2rem;
    }

    .service-status-header {
        gap: 0.8rem;
    }

    .service-icon {
        font-size: 1.8rem;
        min-width: 1.8rem;
    }

    .service-status-name {
        font-size: 1rem;
    }

    .service-status-domain {
        font-size: 0.8rem;
    }

    .status-text {
        font-size: 0.85rem;
    }

    .service-status-item.expanded .service-status-details {
        max-height: 400px;
    }

    .version-filters {
        flex-wrap: wrap;
    }

    .version-filter-btn {
        flex: 0 0 auto;
        min-width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .filter-group-label {
        font-size: 0.85rem;
    }

    .filters-content.expanded {
        max-height: 600px;
    }

    /* 在小屏幕上,筛选按钮换行 */
    .filter-group .version-filters {
        gap: 0.5rem;
    }

    .version-filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: fit-content;
    }

    .changelog-header-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .changelog-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* 服务状态卡片小屏幕优化 */
    .service-status-item {
        padding: 1rem;
    }

    .service-status-header {
        flex-direction: row;
        justify-content: space-between;
    }

    .service-status-info {
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
    }

    .service-status-info > div {
        gap: 0.2rem;
    }

    .service-icon {
        font-size: 1.5rem;
        min-width: 1.5rem;
    }

    .service-status-name {
        font-size: 0.95rem;
    }

    .service-status-domain {
        font-size: 0.75rem;
    }

    .service-status-wrapper {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.3rem;
    }

    .status-indicator {
        width: 10px;
        height: 10px;
    }

    .status-text {
        font-size: 0.8rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 0.8rem 0;
    }

    .detail-label {
        font-size: 0.85rem;
    }

    .detail-value {
        font-size: 0.85rem;
    }

    .version-filter-btn {
        min-width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .service-status-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .service-status-wrapper {
        align-items: flex-start;
        width: 100%;
        margin-top: 0.5rem;
    }

    .status-indicator {
        align-self: flex-start;
    }

    .changelog-header {
        gap: 1.5rem;
    }
}

/* 动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-indicator.fa-spin {
    animation: pulse 1s ease-in-out infinite;
}

.changelog-card {
    animation: slideIn 0.5s ease-out;
}

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