/* AI播客定制平台 - 现代化样式 */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 卡片悬浮效果 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background: linear-gradient(-45deg, #7c3aed, #3b82f6, #8b5cf6, #6366f1);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Blob动画 */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* 文字截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

/* 脉冲动画 */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid currentColor;
    animation: pulse-ring 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* 骨架屏加载 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 按钮样式 */
.btn-primary {
    @apply bg-gradient-to-r from-purple-600 to-blue-600 text-white px-6 py-3 rounded-full font-semibold 
           hover:shadow-lg hover:shadow-purple-500/25 transition-all transform hover:-translate-y-0.5;
}

.btn-secondary {
    @apply bg-white text-gray-700 px-6 py-3 rounded-full font-semibold border border-gray-200 
           hover:border-purple-300 hover:text-purple-600 transition-all;
}

/* 标签样式 */
.tag {
    @apply inline-flex items-center px-3 py-1 text-xs font-semibold rounded-full;
}

.tag-ai {
    @apply bg-blue-100 text-blue-700;
}

.tag-tech {
    @apply bg-green-100 text-green-700;
}

.tag-finance {
    @apply bg-yellow-100 text-yellow-700;
}

.tag-science {
    @apply bg-purple-100 text-purple-700;
}

/* 输入框样式 */
.input-modern {
    @apply w-full px-4 py-3 border border-gray-200 rounded-xl focus:outline-none focus:border-purple-500 
           focus:ring-2 focus:ring-purple-200 transition-all;
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 导航栏 */
    nav .flex.items-center.space-x-6 {
        @apply space-x-3;
    }
    
    nav a.text-gray-600 {
        @apply text-sm;
    }
    
    /* Hero区域 */
    .hero-title {
        @apply text-4xl;
    }
    
    .hero-subtitle {
        @apply text-lg;
    }
    
    /* 卡片 */
    .grid.grid-cols-2 {
        @apply grid-cols-1;
    }
    
    .grid.grid-cols-3 {
        @apply grid-cols-2;
    }
    
    .grid.grid-cols-4 {
        @apply grid-cols-2;
    }
    
    /* 间距 */
    .py-20 {
        @apply py-12;
    }
    
    .px-4 {
        @apply px-4;
    }
    
    /* 统计数据 */
    .grid.grid-cols-4.gap-8 {
        @apply grid-cols-2 gap-4;
    }
}

/* 小屏幕适配 */
@media (max-width: 640px) {
    /* 导航栏 */
    nav .flex.items-center.space-x-6 {
        @apply space-x-2;
    }
    
    nav a.text-gray-600:not(:first-child):not(:last-child) {
        @apply hidden;
    }
    
    /* 按钮 */
    .btn-primary,
    .btn-secondary {
        @apply w-full text-center;
    }
    
    /* 标题 */
    h1 {
        @apply text-3xl;
    }
    
    h2 {
        @apply text-2xl;
    }
}

/* 打印样式 */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
}


/* ============================================================
   VoicePulse UI Enhancements
   ============================================================ */

/* Mobile menu animation */
.mobile-menu-enter {
    animation: slideDown 0.2s ease-out;
}

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

/* Glass effect for cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth page transitions */
.page-enter {
    animation: pageEnter 0.4s ease-out;
}

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

/* Hover lift effect */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.12);
}

/* Gradient border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Pulse animation for audio playing */
@keyframes audioPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.audio-pulse {
    animation: audioPulse 2s ease-in-out infinite;
}

/* Shimmer loading effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Focus ring for inputs */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Better selection color */
::selection {
    background: rgba(124, 58, 237, 0.2);
    color: #1e1b4b;
}
