/* Custom styles for DocuChain Offline Demo */
:root {
    --primary-color: #195de6;
    --primary-hover: #154cbd;
    --success-color: #34c759;
    --bg-color: #fbfbfd;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --nav-bg-rgb: 255, 255, 255;
}

[data-bs-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --nav-bg-rgb: 30, 30, 30;
}

body {
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hash-text {
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
    background: var(--bs-secondary-bg, #e9ecef);
    border-radius: 4px;
}

.mismatch {
    background-color: #ffe3e3 !important;
    color: #c92a2a;
    border: 1px solid #ffc9c9;
}

.hash-text.mismatch {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    border: 1px solid var(--bs-danger-border-subtle);
}

/* Interactive Dashboard Links */
.interactive-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: block;
}

.interactive-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15) !important;
    text-decoration: none;
    color: inherit;
}

.interactive-card:hover .card {
    border-color: var(--primary-color) !important;
}

.match {
    background-color: var(--bs-success-bg-subtle, #d3f9d8) !important;
    color: var(--bs-success-text-emphasis, #2b8a3e);
    border: 1px solid var(--bs-success-border-subtle, #b2f2bb);
}

.feature-box {
    padding: 3rem 2rem;
    border-radius: 1.25rem;
    background: var(--card-bg);
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 86, 219, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color) !important;
}

.feature-box:hover::before {
    opacity: 1;
}

.card {
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1.5rem;
    padding-top: 0.5rem;
    border-radius: 1.25rem !important;
}

/* Navbar Enhancements */
.navbar {
    background: rgba(var(--nav-bg-rgb), 0.8) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.05));
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme Utilities */
.theme-text {
    color: var(--text-main) !important;
    transition: color 0.3s ease;
}

[data-bs-theme="dark"] .dark-mode-adaptive-bg {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

/* Force specific utility classes to adapt to dark mode */
[data-bs-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2b2b2b !important;
}

[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: var(--card-bg) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--text-main) !important;
}

[data-bs-theme="dark"] .bg-success-subtle,
[data-bs-theme="dark"] .bg-info-subtle,
[data-bs-theme="dark"] .bg-danger-subtle {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

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

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

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

/* Hero Section */
.hero-wrapper {
    position: relative;
    padding: 4rem 0 6rem 0;
    background: linear-gradient(180deg, rgba(var(--nav-bg-rgb), 0) 0%, rgba(var(--nav-bg-rgb), 1) 100%);
    border-radius: 2rem;
    margin-bottom: 3rem;
    box-shadow: inset 0 0 100px rgba(26, 86, 219, 0.03);
}

.hero-title {
    font-size: 5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.status-badge-verified {
    animation: pulseGlow 2s infinite;
}