:root {
    --bg-color: #000000;
    --primary-color: #f1c40f;
    --accent-color: #d4ac0d;
    --text-spacing: 0.1em;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --bg-overlay: rgba(0, 0, 0, 0.94);
    --bg-alt: #050505;
    --grid-border: #333333;
    --input-bg: #111111;
    --sidebar-grad: rgba(0, 0, 0, 0.95);
    --nav-bg: rgba(10, 10, 10, 0.4);
    --nav-link: #ffffff;
    --footer-text: #000000;
    --accent: var(--accent-color);
}

canvas#leon-canvas {
    max-width: 100%;
}

body {
    font-family: 'Outfit', 'IBM Plex Sans Arabic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Glassmorphism Refinements */
.backdrop-blur-md {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--bg-alt);
    border: 1px solid var(--grid-border);
    opacity: 0.98;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .nav-glass {
        border-radius: 16px !important;
    }
}

/* Ripple Animation */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-effect 1s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Ripple Background Changer */
.theme-ripple {
    position: fixed;
    border-radius: 50%;
    z-index: 100000;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 2.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-origin: center;
    pointer-events: none;
}

.theme-ripple.active {
    transform: translate(-50%, -50%) scale(300); /* Large enough to cover screen */
}

/* Card Styling */
.font-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.font-card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.font-card:hover {
    transform: translateY(-5px);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* Search Focus Glow */
#font-search:focus {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Sidebar Transition */
#sidebar.open {
    transform: translateX(0);
}

#sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--grid-border) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 320px;
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Split View Transitions & Animations */
#main-content-layout {
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#split-view {
    transition: opacity 0.5s ease;
}

#split-view.active {
    display: flex !important;
    opacity: 1;
    animation: slideInFromRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

#standard-view {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#standard-view.shrunk {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* Mobile Adjustments for Split View */
@media (max-width: 768px) {
    #split-view {
        flex-direction: column !important;
        height: auto !important;
        gap: 2rem;
    }
    
    #api-column, #local-column {
        width: 100% !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        height: 60vh !important; /* Fixed height for scrollable areas on mobile */
    }
    
    #split-divider {
        width: 100% !important;
        height: 1px !important;
        margin: 1rem 0 !important;
    }

    .font-card, .local-card {
        padding: 1rem !important;
    }

    .font-card h3, .local-card h3 {
        font-size: 0.9rem !important;
    }

    .font-card .text-\[2\.2rem\] {
        font-size: 1.5rem !important;
        height: 60px !important;
    }
}

/* Custom Scrollbar for columns */
.custom-scrollbar::-webkit-scrollbar {
    width: 3px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(var(--text-primary-rgb, 0,0,0), 0.1);
    border-radius: 10px;
}

/* Local Card Specifics */
.local-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.local-card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.local-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.local-card img {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.local-card:hover img {
    filter: grayscale(0%);
}

/* Scattered Words & Typography */
.scatter-word { transition: transform 0.3s ease; position: relative; display: inline-block; }
.scatter-word:hover { transform: scale(1.05) rotate(2deg); z-index: 10; }

/* Custom Footer */
.site-footer { padding: 60px 0 40px; text-align: center; border-top: 1px solid var(--grid-border); margin-top: 100px; }
.footer-brand { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.2em; margin-bottom: 20px; font-family: 'Outfit', sans-serif; }
.footer-meta { font-size: 0.75rem; opacity: 0.5; letter-spacing: 0.1em; }
.footer-link { text-decoration: none; transition: opacity 0.3s; border-bottom: 1px solid currentColor; }
.footer-link:hover { opacity: 1; text-decoration: none; }

