/* RISHANG COB LED Strip - Main Styles */

/* Custom global styles */
body {
    font-family: 'Inter', sans-serif;
    @apply bg-white text-slate-900 dark:bg-slate-800 dark:text-slate-100 transition-colors duration-300;
}

/* Animation for content fade-in */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Interactive element styling */
.interactive-card {
    @apply transition-all duration-300 ease-in-out;
}
.interactive-card:hover {
    @apply shadow-xl ring-2 ring-sky-500 dark:ring-sky-400 transform -translate-y-1;
}

.interactive-button {
    @apply transition-all duration-300 ease-in-out transform;
}
.interactive-button:hover {
    @apply scale-105 shadow-lg;
}

.poster-image {
    @apply transition-all duration-300 ease-in-out transform rounded-lg overflow-hidden;
}
.poster-image:hover {
    @apply scale-105 shadow-2xl ring-2 ring-offset-2 ring-sky-500 dark:ring-sky-400;
}
.poster-image img {
    @apply w-full h-full object-cover;
}

/* Hero Background Animation */
#p5-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden; 
}

.hero-content-container {
    position: relative;
    z-index: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    @apply bg-slate-200 dark:bg-slate-700;
}
::-webkit-scrollbar-thumb {
    @apply bg-sky-500 dark:bg-sky-400 rounded-full;
}
::-webkit-scrollbar-thumb:hover {
    @apply bg-sky-600 dark:bg-sky-500;
}

/* Table styling */
.comparison-table th, .comparison-table td {
    @apply px-4 py-4 text-left border-b border-slate-200 dark:border-slate-600;
}

.comparison-table th {
    @apply bg-slate-100 dark:bg-slate-700 font-semibold text-slate-800 dark:text-slate-200 text-sm uppercase tracking-wider;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table tr:nth-child(even) {
    @apply bg-slate-50 dark:bg-slate-750;
}

.comparison-table {
    @apply shadow-xl rounded-xl overflow-hidden border border-slate-200 dark:border-slate-600;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
}

.comparison-table td {
    @apply transition-all duration-200 hover:bg-slate-100 dark:hover:bg-slate-700;
    font-weight: 500;
}

.comparison-table th:first-child {
    @apply rounded-tl-xl;
}

.comparison-table th:last-child {
    @apply rounded-tr-xl;
}

.comparison-table tbody tr:last-child td:first-child {
    @apply rounded-bl-xl;
}

.comparison-table tbody tr:last-child td:last-child {
    @apply rounded-br-xl;
}

.rishang-highlight {
    @apply bg-gradient-to-r from-sky-500 to-cyan-400 text-white font-bold relative;
    position: relative;
}

.rishang-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(6, 182, 212, 0.9));
    border-radius: 0.375rem;
    margin: 0.125rem;
    z-index: -1;
}

.comparison-table .rishang-highlight {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Logo styling */
.logo-placeholder {
    @apply w-32 h-10 bg-slate-200 dark:bg-slate-600 flex items-center justify-center text-slate-700 dark:text-slate-300 rounded-md text-sm;
}
.footer-logo-placeholder {
    @apply w-24 h-8 bg-slate-200 dark:bg-slate-600 flex items-center justify-center text-slate-700 dark:text-slate-300 rounded-md text-xs;
}

/* Header styling */
header {
    @apply sticky top-0 z-50 bg-white/90 dark:bg-slate-800/90 backdrop-blur-md shadow-md;
}

/* Card backgrounds */
.interactive-card, .bg-white.dark\:bg-slate-800 {
    @apply bg-slate-50 dark:bg-slate-700;
}

/* Specific section backgrounds */
#width-comparison .bg-white {
    @apply bg-slate-50 dark:bg-slate-700;
}

/* Promo section gradient */
#promo {
    @apply bg-gradient-to-r from-sky-500 to-cyan-400 dark:from-sky-600 dark:to-cyan-500;
}

/* Footer background */
footer {
    @apply bg-slate-100 dark:bg-slate-700;
}

/* New additions for enhanced functionality */

/* Product gallery */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Enhanced forms */
.inquiry-form {
    @apply bg-white dark:bg-slate-800 p-6 rounded-lg shadow-lg;
}

.form-group {
    @apply mb-4;
}

.form-label {
    @apply block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2;
}

.form-input {
    @apply w-full px-3 py-2 border border-slate-300 dark:border-slate-600 rounded-md 
           focus:outline-none focus:ring-2 focus:ring-sky-500 dark:focus:ring-sky-400
           bg-white dark:bg-slate-700 text-slate-900 dark:text-slate-100;
}

.form-textarea {
    @apply form-input resize-vertical min-h-[100px];
}

.form-button {
    @apply interactive-button bg-sky-600 hover:bg-sky-700 dark:bg-sky-500 dark:hover:bg-sky-600 
           text-white font-semibold py-2 px-4 rounded-md;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.dark .modal-content {
    background: rgb(51 65 85);
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #000;
}

.dark .modal-close {
    color: #ccc;
}

.dark .modal-close:hover {
    color: #fff;
}

/* Feature icons */
.feature-icon {
    @apply w-16 h-16 mx-auto mb-4 text-sky-500 dark:text-sky-400;
}

/* Enhanced animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-content-container h1 {
        font-size: 2.5rem;
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ========== 核心动画效果 Phase 1 ========== */

/* 1. 狭窄空间穿越动画 */
.narrow-space-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.light-beam-container {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: containerActivate 1s ease-in-out 0.5s forwards;
}

.narrow-light-beam {
    position: absolute;
    width: 3px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(59, 130, 246, 0.6) 20%,
        rgba(6, 182, 212, 0.9) 50%,
        rgba(59, 130, 246, 0.6) 80%,
        transparent 100%
    );
    border-radius: 1.5px;
    animation: beamFlow 6s ease-in-out infinite;
    box-shadow: 
        0 0 8px rgba(59, 130, 246, 0.4),
        0 0 16px rgba(6, 182, 212, 0.3),
        0 0 24px rgba(59, 130, 246, 0.2);
}

.beam-1 { left: 15%; animation-delay: 0s; }
.beam-2 { left: 35%; animation-delay: 1.5s; }
.beam-3 { left: 55%; animation-delay: 3s; }
.beam-4 { left: 75%; animation-delay: 4.5s; }

@keyframes containerActivate {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes beamFlow {
    0% { 
        transform: translateY(100%) scaleY(0);
        opacity: 0;
    }
    15% { 
        transform: translateY(0) scaleY(1);
        opacity: 1;
    }
    85% { 
        transform: translateY(0) scaleY(1);
        opacity: 0.8;
    }
    100% { 
        transform: translateY(-100%) scaleY(0);
        opacity: 0;
    }
}

/* 2. 微观放大镜效果 */
.magnify-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.magnify-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(59, 130, 246, 0.05) 70%,
        rgba(59, 130, 246, 0.2) 100%
    );
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(1px);
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.magnify-container:hover .magnify-lens {
    opacity: 1;
    transform: scale(1);
}

.magnify-detail {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
    backdrop-filter: blur(10px);
}

.magnify-container:hover .magnify-detail {
    transform: translateY(0);
    opacity: 1;
}

/* 3. 增强对比表格动效 */
.enhanced-comparison-table {
    position: relative;
    overflow: hidden;
}

.table-glow-effect {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(59, 130, 246, 0.3) 50%,
        transparent 70%
    );
    border-radius: inherit;
    animation: tableGlow 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes tableGlow {
    0%, 100% { 
        background-position: -200% center;
        opacity: 0.5;
    }
    50% { 
        background-position: 200% center;
        opacity: 1;
    }
}

.comparison-table .rishang-highlight {
    position: relative;
    animation: highlightPulse 2s ease-in-out infinite alternate;
}

@keyframes highlightPulse {
    from {
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.1), 
            0 2px 4px -1px rgba(0, 0, 0, 0.06),
            0 0 0 rgba(59, 130, 246, 0);
    }
    to {
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.1), 
            0 2px 4px -1px rgba(0, 0, 0, 0.06),
            0 0 15px rgba(59, 130, 246, 0.4);
    }
}

/* ========== 视觉系统升级 Phase 2 ========== */

/* 1. 增强色彩系统 */
.accent-warm {
    color: rgb(245, 158, 11); /* amber-500 */
}

.bg-accent-warm {
    background-color: rgba(245, 158, 11, 0.1);
}

.text-emphasis {
    background: linear-gradient(135deg, rgb(59, 130, 246), rgb(6, 182, 212));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.number-highlight {
    font-family: 'Inter', monospace;
    font-weight: 800;
    font-size: 1.2em;
    background: linear-gradient(135deg, rgb(59, 130, 246), rgb(6, 182, 212));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* 2. 增强微交互 */
.enhanced-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.enhanced-button:hover::before {
    width: 300px;
    height: 300px;
}

.enhanced-button:active {
    transform: scale(0.98);
}

/* 3. 改进卡片效果 */
.premium-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 20px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

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

/* 4. 滚动指示器 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        rgb(59, 130, 246) 0%,
        rgb(6, 182, 212) 100%
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.1s ease;
    z-index: 1000;
}

/* 5. 暗色模式优化 */
.dark .narrow-light-beam {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(56, 189, 248, 0.7) 20%,
        rgba(34, 211, 238, 1) 50%,
        rgba(56, 189, 248, 0.7) 80%,
        transparent 100%
    );
    box-shadow: 
        0 0 12px rgba(56, 189, 248, 0.5),
        0 0 20px rgba(34, 211, 238, 0.4),
        0 0 30px rgba(56, 189, 248, 0.3);
}

.dark .magnify-lens {
    border-color: rgba(56, 189, 248, 0.8);
    background: radial-gradient(
        circle,
        rgba(15, 23, 42, 0.1) 0%,
        rgba(56, 189, 248, 0.05) 70%,
        rgba(56, 189, 248, 0.2) 100%
    );
    box-shadow: 
        0 0 25px rgba(56, 189, 248, 0.4),
        inset 0 0 25px rgba(255, 255, 255, 0.05);
}

.dark .premium-card {
    background: rgba(15, 23, 42, 0.3);
    border-color: rgba(56, 189, 248, 0.1);
}

.dark .premium-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(56, 189, 248, 0.1);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .narrow-light-beam {
        width: 2px;
        animation-duration: 4s;
    }
    
    .magnify-lens {
        width: 80px;
        height: 80px;
    }
    
    .number-highlight {
        font-size: 1.1em;
    }
} 