/* Custom Styles for Stock-Vis Website */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
}

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

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, #10b981, #3b82f6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom Button Hover Effects */
button, a.button {
    position: relative;
    overflow: hidden;
}

button::before, a.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before, a.button:hover::before {
    width: 300px;
    height: 300px;
}

/* Form Styles */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

input::placeholder, textarea::placeholder {
    color: #6b7280;
}

/* Card Hover Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Stats Counter Animation */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Video Card Styles */
.video-card {
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: scale(1.05);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    nav .hidden {
        display: none;
    }
}

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

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

/* Section Divider */
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* Pricing Card Highlight */
.pricing-popular {
    position: relative;
}

.pricing-popular::after {
    content: 'BEST';
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

/* Timeline Styles */
.timeline-line {
    position: absolute;
    left: 32px;
    top: 80px;
    bottom: 80px;
    width: 2px;
    background: linear-gradient(180deg, #10b981, transparent);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    nav, footer, button, .cta {
        display: none;
    }
}

/* Accessibility */
.focus-visible:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    ::selection {
        background: #10b981;
        color: white;
    }
}

/* Performance Optimization */
.will-change-transform {
    will-change: transform;
}

/* Custom Grid Patterns */
.grid-pattern {
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.glow:hover {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
}

/* Text Shadow for Better Readability */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur {
        backdrop-filter: blur(10px);
    }
}

@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur {
        background: rgba(17, 24, 39, 0.95);
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

a, button {
    transition: all 0.3s ease;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #10b981;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

/* Enhanced Mobile Menu (if added later) */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Icon Animations */
@keyframes bounce-subtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.icon-bounce {
    animation: bounce-subtle 2s ease-in-out infinite;
}

/* Video Aspect Ratio Helper */
.aspect-9-16 {
    aspect-ratio: 9 / 16;
}

/* Gradient Borders */
.gradient-border {
    position: relative;
    background: linear-gradient(#111827, #111827) padding-box,
                linear-gradient(90deg, #10b981, #3b82f6) border-box;
    border: 2px solid transparent;
    border-radius: 1rem;
}

/* Performance: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Container */
.container {
    max-width: 1280px;
}

/* Enhanced Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #10b981;
    outline-offset: 3px;
}

/* Utility: Hide on Mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

/* Utility: Show on Mobile Only */
@media (min-width: 769px) {
    .show-mobile {
        display: none;
    }
}
