/* Modern Custom Styling & Aesthetics for Informatics Olympiad Solver */

:root {
    --bg-primary: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.45);
    --border-color: rgba(255, 255, 255, 0.05);
    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.15);
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --tokyo-night-blue: #1a1b26;
    --tokyo-night-text: #a9b1d6;
}

/* Glassmorphism Panel styles */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* Code Syntax Highlighting styles */
pre code {
    display: block;
    font-family: 'Fira Code', monospace;
}

.keyword { color: #bb9af3; font-weight: 600; }
.type { color: #0db9d7; }
.function { color: #7aa2f7; }
.string { color: #9ece6a; }
.number { color: #ff9e64; }
.comment { color: #565f89; font-style: italic; }
.operator { color: #89ddff; }

/* Interactive Simulator Node Pin */
.sim-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    z-index: 10;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-node.in-window {
    background: var(--accent-indigo);
    border-color: #818cf8;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.sim-node.is-hub {
    background: #f43f5e;
    border-color: #fb7185;
    color: white;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.7);
    transform: translateY(-6px) scale(1.15);
    animation: hub-pulse 1.5s infinite;
}

/* Animations */
@keyframes hub-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(244, 63, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 30px rgba(244, 63, 94, 0.9), 0 0 0 6px rgba(244, 63, 94, 0.2);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style for drag and drop active state */
.drag-active {
    border-color: var(--accent-indigo) !important;
    background-color: rgba(99, 102, 241, 0.08) !important;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.15) !important;
}

/* Extra decorative animations and subtle details */
header button:hover svg {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

#pdf-canvas-container canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}
