/* 组件样式文件 */

/* 卡片组件 */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #00ffff;
    box-shadow: 0 15px 30px rgba(0, 255, 255, 0.2);
}

/* 网格布局组件 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* 响应式网格 */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 徽章组件 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    color: #000000;
}

.badge-success {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000000;
}

.badge-warning {
    background: linear-gradient(45deg, #ff8c00, #ff6600);
    color: #000000;
}

.badge-error {
    background: linear-gradient(45deg, #ff0080, #cc0066);
    color: #ffffff;
}

/* 加载动画组件 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-top: 2px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* 进度条组件 */
.progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0080ff);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 工具提示组件 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before,
.tooltip::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tooltip::before {
    content: attr(data-tooltip);
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-bottom: 5px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.tooltip::after {
    content: '';
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* 模态框组件 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.modal-title {
    font-size: 1.5rem;
    color: #00ffff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00ffff;
}

/* 标签页组件 */
.tabs {
    margin-bottom: 2rem;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    color: #cccccc;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #0080ff);
    transition: width 0.3s ease;
}

.tab-button:hover,
.tab-button.active {
    color: #00ffff;
}

.tab-button.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* 手风琴组件 */
.accordion {
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: rgba(0, 255, 255, 0.1);
}

.accordion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.accordion-icon {
    color: #00ffff;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: 1.5rem;
    color: #cccccc;
    line-height: 1.6;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a,
.breadcrumb span {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #00ffff;
}

.breadcrumb-separator {
    color: #666666;
    margin: 0 0.5rem;
}

/* 分页组件 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    color: #00ffff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 时间轴组件 */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #00ffff, #0080ff);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #00ffff;
    border-radius: 50%;
    border: 3px solid #1a1a1a;
}

.timeline-date {
    color: #00ffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #00ffff;
}

.timeline-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: #cccccc;
    line-height: 1.6;
}

/* 响应式工具类 */
.hidden-mobile {
    display: block;
}

.visible-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none;
    }
    
    .visible-mobile {
        display: block;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        flex-shrink: 0;
        min-width: 120px;
    }
}