/* KAWAI Website Styles */

/* Base Styles */
.hash-text {
    word-break: break-all;
}
.gradient-bg {
    background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
}
.copyable {
    cursor: pointer;
    position: relative;
    padding-right: 24px;
    display: inline-flex;
    align-items: center;
}
.copyable:hover {
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}
.copyable .copy-icon {
    opacity: 0.5;
    margin-left: 4px;
    transition: opacity 0.2s;
}
.copyable:hover .copy-icon {
    opacity: 1;
}
 
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: #4ade80;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
 
.animation-delay-1000 {
    animation-delay: 1s;
}
.animation-delay-2000 {
    animation-delay: 2s;
}

/* Architecture Flow Styles */
.flow-animation {
    stroke-dasharray: 8;
    animation: flow 2s linear infinite;
}

.flow-animation-slow {
    stroke-dasharray: 8;
    animation: flow 3s linear infinite;
}

@keyframes flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 16; }
}

.pulse-node {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.8));
        transform: scale(1.02);
    }
}

.busy-pulse {
    animation: busy-warning 1.5s ease-in-out infinite;
}

@keyframes busy-warning {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
    }
    50% { 
        filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.9));
    }
}

.relay-path {
    stroke-dasharray: 5, 5;
    animation: relay-flow 2.5s linear infinite;
    opacity: 0;
}

.relay-active {
    opacity: 1;
    animation: relay-flow 2.5s linear infinite, fade-in 0.5s ease-in;
}

@keyframes relay-flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 20; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.component-card {
    transition: all 0.3s ease;
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.data-particle {
    animation: particle-flow 3s linear infinite;
}

@keyframes particle-flow {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

.hover-highlight {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hover-highlight:hover {
    filter: brightness(1.2) drop-shadow(0 0 20px currentColor);
}

.metric-card {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: opacity 0.4s;
    opacity: 1;
}
.metric-card.hide {
    opacity: 0;
    pointer-events: none;
}

.tooltip {
    position: fixed;
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    border: 1px solid rgba(75, 85, 99, 0.5);
    max-width: 200px;
}

.tooltip.show {
    opacity: 1;
}

.connection-strength {
    stroke-width: var(--strength, 2);
    opacity: var(--strength-opacity, 0.8);
}

.status-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.step-indicator {
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.video-container {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Background Patterns */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Mobile View */
@media (max-width: 768px) {
    .mobile-vertical {
        transform: scale(0.8) rotate(90deg);
        transform-origin: center center;
        margin: 50px 0;
    }
}

/* Make the wallet section transparent to show particle background */
#wallet {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Override the specific gradient background */
#wallet.bg-gradient-to-b.from-gray-900.to-gray-950 {
    background: none !important;
    background-image: none !important;
}

/* Make internal containers semi-transparent */
#wallet .bg-gradient-to-br,
#wallet .backdrop-blur-lg {
    background: rgba(17, 24, 39, 0.6) !important;
    backdrop-filter: blur(8px);
}

/* Style for inner card backgrounds - more translucent */
#wallet .bg-gradient-to-br.from-gray-700\/30.to-gray-900\/30 {
    background: rgba(17, 24, 39, 0.4) !important;
    backdrop-filter: blur(5px);
}

/* Make sure the floating colored blurs don't block particles */
#wallet .absolute.blur-3xl {
    opacity: 0.5;
    z-index: 0;
}

/* Keep the grid pattern subtle */
#wallet .bg-grid-pattern {
    opacity: 0.1 !important;
}

/* Ensure particles are visible through the wallet section */
#particles-js {
    z-index: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Ensure content stays above particles */
#wallet .relative.z-10 {
    z-index: 5;
}

/* Completely prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Ensure each section's vertical scroll is preserved */
section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Force all direct children of body to respect width */
body > * {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Fix for any absolute positioned elements that might cause overflow */
.absolute, .fixed {
    max-width: 100vw !important;
}

/* Ensure particle background stays contained */
#particles-js {
    width: 100vw !important;
    overflow: hidden !important;
}

/* Ensure the wrapper stays contained */
.wrapper, .container, main, section {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Fix SVG elements that might cause overflow */
svg {
    max-width: 100% !important;
    height: auto !important;
}

/* Fix specific sections that might be causing overflow */
#architecture, 
section:has(h2:contains("Meet Kawai Agent")),
section:has(h1:contains("Meet Kawai Agent")) {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Fix for background network visualizations that might extend beyond viewport */
.network-bg, 
.bg-pattern, 
.bg-grid-pattern,
svg.network,
svg.graph {
    max-width: 100vw !important;
    overflow: hidden !important;
}

/* Ensure modal content can still scroll vertically */
#coinModal .max-h-\[90vh\] {
    overflow-y: auto !important;
    max-height: 90vh !important;
}

/* Fix any elements causing horizontal overflow */
img, svg, video {
    max-width: 100%;
    height: auto;
}

/* Direct and specific fix for wallet section */
section#wallet.py-20.bg-gradient-to-b.from-gray-900.to-gray-950 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    display: block !important;
}

/* Fix the wallet section container */
section#wallet > div.max-w-6xl.mx-auto.px-4.relative.z-10 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Any flex layouts in wallet should not force height */
section#wallet .flex {
    min-height: 0 !important;
    max-height: none !important;
}

/* Make the modal scroll independently */
#coinModal { 
    overflow-y: auto !important;
}

#coinModal .max-h-\[90vh\] {
    overflow-y: auto !important;
    max-height: 90vh !important;
}

/* Remove any viewport height constraints that might cause sectional scrolling */
section#wallet,
section#wallet *,
section#wallet > *,
section#wallet > * > * {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Preserve height for specific elements */
section#wallet img,
section#wallet svg,
section#wallet .h-8,
section#wallet .h-10,
section#wallet .h-12,
section#wallet .h-14,
section#wallet .h-16,
section#wallet .h-20,
section#wallet .h-24 {
    height: auto !important; /* Let images scale naturally */
}

/* Override any viewport height classes */
section#wallet [class*="h-screen"],
section#wallet [class*="min-h-screen"],
section#wallet [class*="max-h-screen"],
section#wallet [class*="vh-"],
section#wallet [style*="height:100vh"],
section#wallet [style*="min-height:100vh"] {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Ensure modal content retains its scrollability */
#coinModal,
#coinModal .max-h-\[90vh\] {
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* Make the entire coin modal transparent including margins */
#coinModal {
    background-color: transparent !important;
}

#coinModal:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: -1;
}

/* Make modal content container semi-transparent */
#coinModal .bg-gray-900, 
#coinModal .max-w-6xl,
#coinModal .rounded-2xl,
#coinModal .w-full {
    background-color: rgba(17, 24, 39, 0.7) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Style individual coin containers */
#coinModal .bg-gray-800 {
    background-color: rgba(31, 41, 55, 0.5) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

#coinModal .bg-gray-800:hover {
    background-color: rgba(31, 41, 55, 0.7) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Style the modal header */
#coinModal .sticky.top-0,
#coinModal .p-6.border-b,
#coinModal .border-gray-800 {
    background-color: rgba(17, 24, 39, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer layout styling - updated to match design */
footer {
    padding: 3rem max(24px, 5%);
    background-color: rgba(3, 7, 18, 0.95);
}

footer .container {
    max-width: 100%;
    padding: 0;
}

footer .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
}

/* Logo and description section */
footer div:first-child {
    display: flex;
    flex-direction: column;
}

footer h3.text-xl {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

footer div:first-child p.mb-4 {
    margin: 0 0 1.5rem 0;
    padding: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: rgba(156, 163, 175, 1);
}

/* Social icons styling */
footer .flex.space-x-4 {
    display: flex;
    gap: 1rem;
}

footer .flex.space-x-4 a {
    color: rgba(156, 163, 175, 1);
    transition: color 0.2s;
}

footer .flex.space-x-4 a:hover {
    color: white;
}

/* Section headers */
footer h3.text-lg {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: white;
}

/* Link lists */
footer ul.space-y-2 {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

footer ul.space-y-2 li {
    list-style: none;
}

footer ul.space-y-2 li a {
    color: rgba(156, 163, 175, 1);
    font-size: 0.9375rem;
    transition: color 0.2s;
    text-decoration: none;
}

footer ul.space-y-2 li a:hover {
    color: white;
}

/* Copyright section */
footer .border-t {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-color: rgba(55, 65, 81, 0.5);
    text-align: center;
}

footer .border-t p {
    color: rgba(156, 163, 175, 1);
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    footer .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    footer .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 480px) {
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}