/* 现代化组件样式 */

/* 高级按钮组件 */
.btn-gradient {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 卡片组件增强 */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.card-hover:hover::before {
    left: 100%;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* 输入框增强样式 */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating input,
.form-floating select,
.form-floating textarea {
    width: 100%;
    padding: 15px 12px 8px 12px;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 16px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.form-floating input:focus,
.form-floating select:focus,
.form-floating textarea:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-floating label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label,
.form-floating select:focus + label,
.form-floating textarea:focus + label,
.form-floating textarea:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 12px;
    color: #4A90E2;
    transform: translateY(0);
}

/* 进度条组件 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E9ECEF;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7ED321, #5CB816);
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* 状态标签组件 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #FFF3CD;
    color: #856404;
}

.status-processing {
    background-color: #D1ECF1;
    color: #0C5460;
}

.status-completed {
    background-color: #D4EDDA;
    color: #155724;
}

.status-cancelled {
    background-color: #F8D7DA;
    color: #721C24;
}

/* 工具提示组件 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 通知消息组件 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10000;
    transform: translateX(450px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #D4EDDA;
    color: #155724;
    border-left: 4px solid #28A745;
}

.notification-error {
    background-color: #F8D7DA;
    color: #721C24;
    border-left: 4px solid #DC3545;
}

.notification-warning {
    background-color: #FFF3CD;
    color: #856404;
    border-left: 4px solid #FFC107;
}

.notification-info {
    background-color: #D1ECF1;
    color: #0C5460;
    border-left: 4px solid #17A2B8;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

/* 加载动画组件 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E9ECEF;
    border-top: 4px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { color: rgba(0,0,0,0); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    40% { color: black; text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    60% { text-shadow: .25em 0 0 black, .5em 0 0 rgba(0,0,0,0); }
    80%, 100% { text-shadow: .25em 0 0 black, .5em 0 0 black; }
}

/* 数字计数器动画 */
.counter {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 标签云组件 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #E9ECEF;
    color: #495057;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background-color: #4A90E2;
    color: white;
    transform: translateY(-2px);
}

.tag.active {
    background-color: #7ED321;
    color: white;
}

/* 评分星级组件 */
.rating {
    display: inline-flex;
    gap: 2px;
}

.star {
    color: #DDD;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star.filled {
    color: #FFD700;
}

.star:hover {
    color: #FFD700;
}

/* 时间轴组件 */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #E9ECEF;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4A90E2;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #E9ECEF;
}

.timeline-time {
    font-size: 12px;
    color: #666;
    margin-bottom: 0.5rem;
}

.timeline-content {
    color: #333;
} 