/* Global Styles for Inference Server Website */

/* Custom color variables */
:root {
    --primary-blue: #0C4EAD;
    --secondary-blue: #12a0ff;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation styles */
.nav-link {
    @apply text-gray-300 hover:text-secondary-blue transition-colors duration-300 px-3 py-2 rounded-md text-sm font-medium relative;
}

.nav-link.active {
    @apply text-secondary-blue;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Button styles */
.btn-primary {
    @apply bg-gradient-to-r from-primary-blue to-secondary-blue text-white px-8 py-3 rounded-lg font-semibold hover:shadow-lg hover:shadow-secondary-blue/25 transition-all duration-300 transform hover:-translate-y-1;
}

.btn-secondary {
    @apply border-2 border-secondary-blue text-secondary-blue px-8 py-3 rounded-lg font-semibold hover:bg-secondary-blue hover:text-white transition-all duration-300 transform hover:-translate-y-1;
}

/* Hero section background */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(18, 160, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(12, 78, 173, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Server visual animation */
.server-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.server-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.server-unit {
    width: 200px;
    height: 60px;
    background: linear-gradient(135deg, #374151, #4b5563);
    border-radius: 8px;
    position: relative;
    border: 1px solid #6b7280;
    transition: all 0.3s ease;
}

.server-unit.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    box-shadow: 0 0 20px rgba(18, 160, 255, 0.3);
}

.server-unit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.server-unit::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 60px;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #6b7280 0px,
        #6b7280 8px,
        transparent 8px,
        transparent 12px
    );
    transform: translateY(-50%);
}

/* Floating particles animation */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--secondary-blue);
    border-radius: 50%;
    opacity: 0.6;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation: float 8s ease-in-out infinite reverse;
}

.particle:nth-child(3) {
    top: 80%;
    left: 30%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Feature cards */
.feature-card {
    @apply bg-gray-800/50 backdrop-blur-sm border border-gray-700 rounded-xl p-6 hover:border-secondary-blue transition-all duration-300 hover:shadow-lg hover:shadow-secondary-blue/10 hover:transform hover:-translate-y-2;
}

.feature-icon {
    @apply mb-4;
}

/* Comparison table styles */
.comparison-table {
    @apply overflow-hidden rounded-xl border border-gray-700;
}

.comparison-table table {
    @apply w-full;
}

.comparison-table th {
    @apply bg-gradient-to-r from-primary-blue to-secondary-blue text-white p-4 text-left font-semibold;
}

.comparison-table td {
    @apply p-4 border-b border-gray-700 text-gray-300;
}

.comparison-table tr:hover {
    @apply bg-gray-800/50;
}

/* Product cards */
.product-card {
    @apply bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 rounded-xl p-6 hover:border-secondary-blue transition-all duration-300 hover:shadow-xl hover:shadow-secondary-blue/20 hover:transform hover:-translate-y-2 relative overflow-hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-card .content {
    position: relative;
    z-index: 2;
}

.product-card h3 {
    @apply text-xl font-bold text-secondary-blue mb-3;
}

.product-specs {
    @apply space-y-2 my-4;
}

.product-specs li {
    @apply flex items-center text-gray-300;
}

.product-specs li::before {
    content: '→';
    @apply text-secondary-blue mr-3 font-bold;
}

/* FAQ styles */
.faq-item {
    @apply bg-gray-800/50 border border-gray-700 rounded-lg mb-4 overflow-hidden;
}

.faq-question {
    @apply w-full text-left p-4 bg-transparent text-white hover:text-secondary-blue transition-colors duration-300 cursor-pointer flex justify-between items-center;
}

.faq-answer {
    @apply max-h-0 overflow-hidden transition-all duration-300 ease-out;
}

.faq-answer.active {
    @apply max-h-96;
}

.faq-answer p {
    @apply p-4 text-gray-300 border-t border-gray-700;
}

/* Form styles */
.form-group label {
    @apply block text-sm font-medium text-gray-300 mb-2;
}

.form-group input,
.form-group textarea,
.form-group select {
    @apply w-full px-3 py-2 bg-gray-800 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-secondary-blue focus:border-transparent transition-colors duration-300;
}

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

/* Loading animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        @apply text-4xl;
    }
    
    .server-visual {
        @apply h-80;
    }
    
    .server-unit {
        @apply w-40 h-12;
    }
    
    .feature-card {
        @apply text-center;
    }
}

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

/* Section spacing */
.section-padding {
    @apply py-16 lg:py-24;
}

/* Text shadows for better readability */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Backdrop blur utility */
.backdrop-blur-custom {
    backdrop-filter: blur(12px);
}