body {
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow-x: hidden;
}
.smooth-scroll {
    scroll-behavior: smooth;
}
.navbar {
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.92);
    box-shadow: 0 2px 12px 0 rgba(80,80,110,0.08);
}
#balls-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    display: block;
}
#follower-ball {
    position: fixed;
    z-index: 2;
    pointer-events: none;
    transition: background 0.4s;
    will-change: transform;
}
main, nav, footer {
    position: relative;
    z-index: 1;
}
.tree-node {
    border-left: 2px solid #a78bfa;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}
.tree-toggle {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.tree-toggle:hover {
    color: #a78bfa;
}
.tree-project {
    background: #18181b;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 4px 32px 0 rgba(80,80,110,0.10);
}
html.light body {
    background-color: #f6f7fb;
    color: #232946;
}
html.light .tree-project {
    background: #fff;
    color: #232946;
}
html.light .tree-node {
    border-left: 2px solid #6366f1;
}
html.light .navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
}
html.light footer {
    background: #e5e7eb;
    color: #232946;
}
html.light .bg-gray-900,
html.light .bg-gray-800 {
    background: #fff !important;
}
html.light .bg-gray-700 {
    background: #e5e7eb !important;
}
html.light .text-white {
    color: #232946 !important;
}
html.light .text-gray-200,
html.light .text-gray-300 {
    color: #4b5563 !important;
}
html.light .focus\:ring-indigo-600:focus {
    --tw-ring-color: #6366f1 !important;
}
html.light .border-indigo-500 {
    border-color: #6366f1 !important;
}
html.light .bg-indigo-600, html.light .hover\:bg-indigo-700:hover {
    background-color: #6366f1 !important;
}
html.light .bg-indigo-100, html.light .hover\:bg-indigo-100:hover {
    background-color: #dbeafe !important;
}
.transition-colors {
    transition: background 0.4s, color 0.4s;
}
body::-webkit-scrollbar {
    width: 0 !important;
}
section, footer {
    border-radius: 1rem;
}
.card {
    background: rgba(255,255,255,0.01);
    border-radius: 1rem;
    box-shadow: 0 2px 24px 0 rgba(80,80,110,0.10);
}
html.light .card {
    background: #fff;
    box-shadow: 0 2px 24px 0 rgba(120,120,140,0.07);
}
.navbar .active {
    color: #a78bfa;
    font-weight: 600;
}
@media (max-width: 640px) {
    section, footer {
        border-radius: 0;
    }
    .navbar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}
/* Follower Ball Responsive */
#follower-ball {
    pointer-events: none;
    transition: box-shadow 0.25s;
}
@media (max-width: 640px) {
    #follower-ball {
        width: 24px !important;
        height: 24px !important;
    }
}
/* Toggle Switch Styles */
.mode-switch {
    width: 54px;
    height: 28px;
    background: #232946;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    border: 2px solid #a78bfa;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: background 0.3s, border-color 0.3s;
}
.mode-switch.light {
    background: #fff;
    border-color: #6366f1;
}
.mode-switch .switch-handle {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.35s cubic-bezier(.68,-0.55,.27,1.55), background 0.3s;
    color: #232946;
    font-size: 1rem;
}
.mode-switch.light .switch-handle {
    background: #232946;
    color: #fff;
}
.mode-switch.active .switch-handle {
    left: 28px;
}
.mode-switch .icon-sun,
.mode-switch .icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    transition: color 0.3s;
    pointer-events: none;
}
.mode-switch .icon-sun {
    left: 7px;
    color: #facc15;
}
.mode-switch .icon-moon {
    right: 7px;
    color: #818cf8;
}
.mode-switch.light .icon-sun {
    color: #facc15;
}
.mode-switch.light .icon-moon {
    color: #6366f1;
}
