/* Subtle background grid pattern for modern feel */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
}

body {
    background-color: #F8FAFC;
    color: #334155;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.dark body,
html.dark body {
    background-color: #030712;
    color: #CBD5E1;
}

/* Hide scrollbar for clean look */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Glow animations */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

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

/* Custom button active state */
.active-scale:active {
    transform: scale(0.95);
}

/* Dashboard-style input focus */
.dashboard-input:focus {
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

/* Scroll-triggered fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Smooth section transitions */
section {
    position: relative;
}

/* Image container enhancements */
.rounded-3xl img {
    transition: transform 0.5s ease;
}

.rounded-3xl:hover img {
    transform: scale(1.02);
}

/* Use-case card grid responsive fine-tuning */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Steps number badge pulse on hover */
.group:hover .w-14 {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
}

/* Soft text selection */
::selection {
    background-color: #E2E8F0;
    color: #1E293B;
}

.dark ::selection {
    background-color: #334155;
    color: #F1F5F9;
}

/* FAQ Accordion Styles */
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-content {
    max-height: 200px;
    padding-bottom: 0;
}

.faq-item:hover {
    border-color: #CBD5E1;
}

.dark .faq-item:hover {
    border-color: #475569;
}

/* Dark mode transition for smooth toggling */
*, *::before, *::after {
    transition-property: background-color, border-color;
    transition-duration: 200ms;
    transition-timing-function: ease;
}

/* Override transition for elements that should animate differently */
.transition-all,
.transition-colors,
.transition-transform,
.transition-opacity {
    transition-property: all;
}

/* Theme toggle button animation */
#theme-toggle:hover,
#theme-toggle-mobile:hover {
    transform: rotate(15deg);
}

#theme-toggle:active,
#theme-toggle-mobile:active {
    transform: rotate(15deg) scale(0.95);
}

/* Premium Ultra Plan Styling */
.ultra-shimmer {
    position: relative;
    overflow: visible; /* Allow floating badges */
}

/* Internal shimmer layer to prevent clipping badges */
.ultra-shimmer-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.ultra-shimmer-layer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent
    );
    transform: rotate(-45deg);
    animation: shimmer-premium 3s infinite linear;
}

.dark .ultra-shimmer-layer::after {
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.01) 45%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.01) 55%,
        transparent
    );
}

@keyframes shimmer-premium {
    0% { transform: translateX(-100%) rotate(-45deg); }
    100% { transform: translateX(100%) rotate(-45deg); }
}

.premium-gradient-border {
    position: relative;
    background: #fff;
    background-clip: padding-box;
    border: 2px solid transparent;
}

.premium-gradient-border::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(to right, #0F172A, #3B82F6, #0F172A);
    animation: border-rotate 4s linear infinite;
}

.dark .premium-gradient-border {
    background: #0F172A;
}

.dark .premium-gradient-border::before {
    background: linear-gradient(to right, #0F172A, #3B82F6, #0F172A);
}

@keyframes border-rotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(-50%); }
    50% { transform: translateY(-5px) translateX(-50%); }
}

/* Force Light Text on Dark Cards */
.card-dark-force {
    background: #0F172A !important;
    background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 70%) !important;
    color: #FFFFFF !important;
}

.card-dark-force h3, 
.card-dark-force .pricing-val,
.card-dark-force p,
.card-dark-force li {
    color: #FFFFFF !important;
}

.card-dark-force .billing-period {
    color: #FFFFFF !important;
    opacity: 0.8;
}

.card-dark-force li i.ph-check {
    color: #34D399 !important; /* emerald-400 for better contrast */
}

.card-dark-force li i.ph-check {
    color: #34D399 !important; /* emerald-400 for better contrast */
}


/* --- Global JS Tooltip --- */
#tooltip-surface {
 position: fixed;
 z-index: 9999;
 padding: 8px 12px;
 background: rgba(15, 23, 42, 0.9);
 backdrop-filter: blur(8px);
 color: white;
 border-radius: 8px;
 font-size: 12px;
 font-weight: 600;
 pointer-events: none;
 opacity: 0;
 transform: translateY(4px);
 transition: opacity 0.2s ease, transform 0.2s ease;
 box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
 border: 1px solid rgba(255, 255, 255, 0.1);
 max-width: 250px;
}

.dark #tooltip-surface {
 background: rgba(30, 41, 59, 0.95);
 border-color: rgba(255, 255, 255, 0.05);
}

#tooltip-surface.visible {
 opacity: 1;
 transform: translateY(0);
}

