/* 罗普心圈APP自定义样式 */

/* 全局样式 */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* 进度条动画 */
.progress-bar {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    background-size: 200% 100%;
    animation: progressGradient 2s ease infinite;
}

@keyframes progressGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 玻璃态效果增强 */
.glass-effect {
    backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(17, 25, 40, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.125);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-effect:hover {
    background-color: rgba(17, 25, 40, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 卡片悬停效果增强 */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center center;
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-hover:active {
    transform: translateY(-8px) scale(0.98);
}

/* 按钮悬停效果 */
button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* 按钮波纹效果 */
button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s, height 0.3s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

button:active::before {
    width: 300px;
    height: 300px;
}

button > * {
    position: relative;
    z-index: 1;
}

/* 导航栏项目动画 */
.nav-item {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item.active::after {
    width: 24px;
}

.nav-item:hover {
    transform: translateY(-4px) scale(1.1);
}

/* 模态框动画 */
.modal {
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active {
    animation: modalFadeIn 0.4s ease-out;
}

.modal .glass-effect {
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.carousel-container:hover::before {
    transform: translateX(100%);
}

.carousel-slide {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 输入框样式 */
input, textarea {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

input:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* 加载动画 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .glass-effect {
        backdrop-filter: blur(12px);
        margin: 8px;
    }
    
    .card-hover:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .nav-item:hover {
        transform: translateY(-2px) scale(1.05);
    }
    
    .modal .glass-effect {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
}

/* 深色主题渐变背景变化 */
body {
    background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 页面切换动画 */
.page-content {
    animation: fadeInUp 0.6s ease-out;
}

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

/* 图标动画 */
i {
    transition: all 0.3s ease;
}

.card-hover:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* 文字渐变效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 价格标签动画 */
.price-tag {
    position: relative;
    overflow: hidden;
}

.price-tag::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;
}

.price-tag:hover::before {
    left: 100%;
}

/* 自定义标签样式 */
.badge {
    position: relative;
    overflow: hidden;
}

.badge::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent rgba(255, 255, 255, 0.1) transparent transparent;
}

/* 表单验证样式 */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
}

.form-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3) !important;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(17, 25, 40, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.125);
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 320px;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* 无障碍访问改进 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .glass-effect {
        background-color: rgba(0, 0, 0, 0.9);
        border-color: #ffffff;
    }
    
    .card-hover:hover {
        border-color: #ffffff;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass-effect {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .modal, nav, .progress-bar {
        display: none !important;
    }
}