/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b 0%, #1e40af 50%, #7c3aed 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hide content initially */
.main-content {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.main-content.loaded {
    opacity: 1;
}

/* Password Modal */
.password-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.password-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.password-modal.active .modal-content {
    transform: translateY(0);
}

/* Enhanced Animations */
.glow-text {
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.2);
}

.glow-card {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1), 0 0 40px rgba(59, 130, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-card:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3), 0 0 60px rgba(59, 130, 246, 0.2), 0 0 90px rgba(59, 130, 246, 0.1);
    transform: translateY(-8px) scale(1.02);
}


.header-glow {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2), 0 2px 10px rgba(139, 92, 246, 0.15);
}

/* Header Styles */
header {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2), 0 2px 10px rgba(139, 92, 246, 0.15);
}

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

@keyframes pulse-glow {
    from {
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.2);
    }
    to {
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(59, 130, 246, 0.5), 0 0 40px rgba(59, 130, 246, 0.3);
    }
}

.footer-glow {
    box-shadow: 0 -5px 30px rgba(59, 130, 246, 0.2);
}

/* Tree List Styles */
.tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
}

.tree-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tree-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.tree-item:hover::before {
    transform: scaleY(1);
}

.tree-item:last-child {
    border-bottom: none;
}

.tree-item:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.tree-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1rem;
    position: relative;
}

.tree-link::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #60a5fa);
    transition: width 0.3s ease;
}

.tree-item:hover .tree-link::after {
    width: 30px;
}

.tree-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
    transition: all 0.3s ease;
}

.tree-item:hover .tree-icon {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.tree-name {
    font-size: 1rem;
    font-weight: 600;
    flex: 0 0 auto;
    min-width: 140px;
    color: #e0e7ff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.tree-item:hover .tree-name {
    color: #93c5fd;
    text-shadow: 0 0 12px rgba(147, 197, 253, 0.5);
}

.tree-description {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
    margin-left: auto;
    font-style: italic;
    transition: color 0.3s ease;
}

.tree-item:hover .tree-description {
    color: rgba(255, 255, 255, 0.85);
}

.tree-arrow {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.tree-item:hover .tree-arrow {
    color: #60a5fa;
    transform: translateX(8px);
    background: rgba(96, 165, 250, 0.2);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

/* Fade in animation for tree items */
.fade-in {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInLeft 0.5s ease forwards;
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive tree list */
@media (max-width: 768px) {
    .tree-link {
        flex-wrap: wrap;
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }
    
    .tree-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .tree-name {
        min-width: 100%;
        margin-bottom: 0.5rem;
        font-size: 1.125rem;
    }
    
    .tree-description {
        font-size: 0.875rem;
        margin-left: 0;
        width: 100%;
        padding-left: 3rem;
    }
    
    .tree-arrow {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .tree-item:hover .tree-arrow {
        transform: translateY(-50%) translateX(5px);
    }
}

@media (max-width: 640px) {
    .tree-description {
        display: none;
    }
    
    .tree-name {
        font-size: 1rem;
    }
    
    .tree-link {
        padding: 1rem 1.25rem;
    }
    
    .tree-icon {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

