/* GXS - QuantumNexus - Modern CSS Styles * A comprehensive styling system for the quantum simulation web interface */ /* ===================== Base Styles ===================== */ :root { /* Light Mode Color Palette */ --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #818cf8; --secondary: #22d3ee; --accent: #f472b6; --success: #10b981; --info: #3b82f6; --warning: #f59e0b; --danger: #ef4444; --dark: #1f2937; --gray-dark: #374151; --gray-medium: #6b7280; --gray-light: #e5e7eb; --light: #f9fafb; --background: #ffffff; --surface: #f9fafb; --text-primary: #1f2937; --text-secondary: #6b7280; --border: #e5e7eb; } /* Dark Mode Color Palette */ [data-theme="quantumdark"] { --primary: #818cf8; --primary-dark: #6366f1; --primary-light: #a5b4fc; --secondary: #34d399; --accent: #fbbf24; --success: #34d399; --info: #60a5fa; --warning: #fbbf24; --danger: #f87171; --dark: #111827; --gray-dark: #1f2937; --gray-medium: #9ca3af; --gray-light: #4b5563; --light: #f9fafb; --background: #1f2937; --surface: #374151; --text-primary: #f9fafb; --text-secondary: #d1d5db; --border: #4b5563; } /* Typography (shared across themes) */ :root { --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; --font-mono: 'Space Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; /* Spacing */ --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2.5rem; /* Shadows */ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Borders */ --border-radius-sm: 0.25rem; --border-radius-md: 0.375rem; --border-radius-lg: 0.5rem; --border-radius-xl: 0.75rem; --border-radius-full: 9999px; } body { font-family: var(--font-primary); background-color: var(--background); color: var(--text-primary); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; position: relative; padding-top: 56px; transition: background-color 0.3s ease, color 0.3s ease; } main { flex-grow: 1; } a { text-decoration: none; transition: color 0.3s ease; } a:hover { text-decoration: none; } pre, code { font-family: var(--font-mono); } /* Typography enhancements */ h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; } .lead { font-weight: 300; } .text-gradient { background: linear-gradient(45deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; /* Fallback */ } /* ===================== Navigation - FIXED HEADER ===================== */ #mainNav { transition: background-color 0.3s ease; background-color: var(--surface); box-shadow: var(--shadow-md); z-index: 1030; /* Ensure navbar is above other content */ padding: 0.5rem 1rem; position: fixed; top: 0; left: 0; right: 0; width: 100%; border-bottom: 1px solid var(--border); } #mainNav.scrolled { background-color: var(--surface); } /* Brand styling */ #mainNav .navbar-brand { font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; } #mainNav .navbar-brand i { font-size: 1.5rem; margin-right: 0.5rem; } /* Navbar structure fix */ #mainNav .navbar-nav { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; margin-left: auto; } /* Nav item styling */ #mainNav .nav-item { margin-right: 0.5rem; position: relative; } /* Critical fix for nav-link display */ #mainNav .nav-link { display: flex !important; align-items: center !important; justify-content: flex-start !important; white-space: nowrap !important; padding: 0.5rem 0.75rem !important; position: relative; } /* Ensure icons display properly */ #mainNav .nav-link i, #mainNav .nav-link .fas, #mainNav .nav-link .fab { display: inline-block !important; vertical-align: middle !important; margin-right: 0.4rem !important; margin-top: 0 !important; font-size: 1rem !important; } /* Nav link hover effect */ #mainNav .nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background-color: var(--primary-light); transition: width 0.3s ease; } #mainNav .nav-link:hover::after { width: 80%; } /* Dropdown styling */ .dropdown-menu { padding: 0.7rem 0; margin-top: 0.5rem; font-size: 0.95rem; border: none; box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1); background-color: rgba(25, 25, 35, 0.95); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); border-radius: var(--border-radius-lg); animation: dropdown-fade 0.2s ease-out forwards; min-width: 220px; } @keyframes dropdown-fade { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } /* Dropdown toggle caret */ .dropdown-toggle::after { transition: transform 0.2s ease; vertical-align: middle !important; margin-left: 0.4em !important; margin-top: 0.1em; } .dropdown-toggle[aria-expanded="true"]::after { transform: rotate(180deg); } /* Dropdown items with hover effects */ .dropdown-item { color: rgba(255, 255, 255, 0.85); font-weight: 500; padding: 0.7rem 1.3rem; border-radius: var(--border-radius-md); margin: 0 0.5rem; width: calc(100% - 1rem); transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1); display: flex; align-items: center; } .dropdown-item i, .dropdown-item svg { margin-right: 0.7rem; font-size: 1rem; opacity: 0.7; width: 20px; text-align: center; transition: all 0.2s ease; } .dropdown-item:hover { background-color: rgba(80, 70, 230, 0.15); color: var(--accent); transform: translateX(5px); } .dropdown-item:hover i, .dropdown-item:hover svg { opacity: 1; color: var(--accent); } .dropdown-item:active { background-color: var(--accent); color: white; } /* Dropdown section dividers */ .dropdown-divider { border-top: 1px solid rgba(255, 255, 255, 0.08); margin: 0.5rem 1rem; } /* Dropdown show/hide states */ .navbar-nav .dropdown:hover > .nav-link { color: var(--accent); } /* Hover indicator for dropdown toggles */ .nav-item.dropdown .nav-link:hover::after { background-color: var(--accent); } /* Focus styles for keyboard navigation */ .dropdown-item:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); } /* Highlight active dropdown item */ .dropdown-item.active, .dropdown-item:active { background-color: var(--accent); color: white; } /* Mobile navbar toggler */ .navbar-toggler { padding: 0.25rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.25rem; } .navbar-toggler:focus { box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15); } .navbar-toggler-icon { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: middle; } /* ===================== Hero Section ===================== */ .hero-container { height: 100vh; min-height: 500px; background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); position: relative; overflow: hidden; } #quantum-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .hero-content { position: relative; z-index: 2; min-height: 100vh; padding: 0 1rem; } .hero-subtitle { max-width: 700px; margin-left: auto; margin-right: auto; } .hero-title { background: linear-gradient(45deg, #a78bfa, #4f46e5); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; margin-bottom: 1.5rem; font-size: 3.5rem; text-shadow: 0 0 20px rgba(167, 139, 250, 0.5); } .hero-subtitle { font-size: 1.25rem; max-width: 600px; margin: 0 auto 2rem; } /* Animation keyframes */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } } .animate-fade-in-up { animation: fadeInUp 0.8s ease forwards; } .animate-fade-in-up-delayed { animation: fadeInUp 1.2s ease forwards; } .animate-fade-in-up-delayed2 { animation: fadeInUp 1.6s ease forwards; } /* ===================== Cards & Plugins ===================== */ .plugin-card { transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; background-color: var(--background); border: 1px solid var(--border); overflow: hidden; border-radius: var(--border-radius-lg); } .plugin-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); } .plugin-card .card-body { padding: 1.5rem; } .icon-wrapper { transition: transform 0.3s ease; width: 48px; } /* ===================== Enhanced Theme Support ===================== */ /* Form Controls */ .form-control, .form-select { background-color: var(--background); border-color: var(--border); color: var(--text-primary); transition: all 0.3s ease; } .form-control:focus, .form-select:focus { background-color: var(--background); border-color: var(--primary); color: var(--text-primary); box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25); } /* Cards and Surfaces */ .card { background-color: var(--background); border-color: var(--border); transition: background-color 0.3s ease, border-color 0.3s ease; } .card-header { background-color: var(--surface); border-bottom-color: var(--border); color: var(--text-primary); } .card-body { color: var(--text-primary); } /* Alerts */ .alert { border-color: var(--border); color: var(--text-primary); } .alert-primary { background-color: rgba(99, 102, 241, 0.1); border-color: var(--primary); color: var(--primary); } .alert-success { background-color: rgba(16, 185, 129, 0.1); border-color: var(--success); color: var(--success); } .alert-warning { background-color: rgba(245, 158, 11, 0.1); border-color: var(--warning); color: var(--warning); } .alert-info { background-color: rgba(59, 130, 246, 0.1); border-color: var(--info); color: var(--info); } /* Tables */ .table { color: var(--text-primary); } .table th { border-color: var(--border); color: var(--text-primary); } .table td { border-color: var(--border); } /* Badges */ .badge { transition: all 0.3s ease; } /* Code blocks */ pre, code { background-color: var(--surface); border: 1px solid var(--border); color: var(--text-primary); } /* QRNG Specific Styles */ .qrng-bit-sequence { background-color: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text-primary) !important; } .qrng-enhanced-viz .card { background-color: var(--background); border-color: var(--border); } .qrng-enhanced-viz .card-header { background-color: var(--surface); color: var(--text-primary); } /* Dark mode specific improvements */ [data-theme="quantumdark"] { /* Improve contrast for dark mode */ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3); } [data-theme="quantumdark"] .form-control:focus, [data-theme="quantumdark"] .form-select:focus { box-shadow: 0 0 0 0.2rem rgba(129, 140, 248, 0.25); } [data-theme="quantumdark"] .text-muted { color: var(--text-secondary) !important; } .tilt-card { transform-style: preserve-3d; perspective: 1000px; } /* ===================== Simulation Controls ===================== */ .form-range::-webkit-slider-thumb { background-color: var(--primary); } .form-range::-moz-range-thumb { background-color: var(--primary); } .form-label { font-weight: 600; margin-bottom: 0.5rem; } .terminal-log { background-color: var(--gray-dark); color: #e2e8f0; padding: 1rem; border-radius: var(--border-radius-md); font-family: var(--font-mono); font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; max-height: 400px; overflow-y: auto; } /* Stylized tabs */ .nav-tabs { border-bottom: 1px solid #dee2e6; } .nav-tabs .nav-link { border: none; color: var(--gray-medium); padding: 0.75rem 1.25rem; font-weight: 600; border-radius: 0; transition: color 0.2s ease; } .nav-tabs .nav-link:hover { color: var(--primary); border-color: transparent; } .nav-tabs .nav-link.active { color: var(--primary); border-bottom: 3px solid var(--primary); background-color: transparent; } /* ===================== Visualizations ===================== */ .circuit-svg { position: relative; background-color: #fff; padding: 1rem; border-radius: var(--border-radius-md); margin-bottom: 1.5rem; text-align: center; overflow: auto; max-width: 100%; } .chart-container { height: 300px; } #bloch-sphere-container, #circuit-demo-container { background-color: #141414; border-radius: var(--border-radius-lg); overflow: hidden; } #bloch-sphere-container, #quantum-state-viz { height: 400px !important; width: 100%; background-color: #141424; border-radius: 8px; overflow: hidden; } .demo-container { height: 400px; } /* Download button styling */ .circuit-download-btn { position: absolute; top: 10px; right: 10px; z-index: 100; opacity: 0.8; transition: opacity 0.2s ease; background-color: var(--primary); border-color: var(--primary); font-size: 0.85rem; } .circuit-download-btn:hover { opacity: 1; background-color: var(--primary-dark); border-color: var(--primary-dark); } /* Ensure SVG responsiveness */ .circuit-svg svg { max-width: none; height: auto; } .circuit-svg-wrapper { width: 100%; overflow-x: auto; position: relative; } /* BB84 Visualization Styles */ .pipeline-step { position: relative; } .step-header { display: flex; align-items: center; margin-bottom: 5px; } .key-pipeline .progress { height: 24px; } .key-pipeline .progress-bar { color: #fff; font-weight: bold; text-shadow: 0 0 3px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; } /* ===================== Utility Classes ===================== */ .bg-gradient-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); } .bg-gradient-dark { background: linear-gradient(135deg, #0f172a, #1e1b4b); } .shadow-hover { transition: box-shadow 0.3s ease; } .shadow-hover:hover { box-shadow: var(--shadow-lg); } .smooth-scroll { cursor: pointer; } /* Back to top button */ .back-to-top-btn { position: fixed; bottom: 20px; right: 20px; z-index: 99; display: none; width: 40px; height: 40px; border-radius: 50%; background-color: var(--primary); color: white; border: none; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.2); transition: opacity 0.3s ease, transform 0.3s ease; } .back-to-top-btn:hover { background-color: var(--primary-dark); } /* Glossary styles */ .loading-glossary::before { content: "Loading glossary..."; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 9999; font-size: 1.5rem; } .highlight-term { animation: highlight-pulse 2s ease-in-out; } @keyframes highlight-pulse { 0% { background-color: transparent; } 30% { background-color: rgba(124, 58, 237, 0.2); } 100% { background-color: transparent; } } /* Hide download button when printing */ @media print { .circuit-download-btn { display: none; } } /* ===================== Media Queries ===================== */ @media (max-width: 1200px) { #mainNav .navbar-brand span { display: none; /* Hide brand text on medium screens */ } } @media (max-width: 991.98px) { /* Mobile navigation adjustments */ #mainNav .navbar-nav { flex-direction: column !important; padding: 1rem 0; overflow-x: visible; } #mainNav .nav-link { padding: 0.7rem !important; justify-content: flex-start !important; } #mainNav .nav-link::after { display: none; } /* Mobile dropdown styles */ .dropdown-menu { background-color: rgba(30, 30, 45, 0.5); box-shadow: none; padding: 0.5rem; margin-top: 0; animation: none; } .dropdown-item { padding: 0.6rem 1rem; margin: 0.2rem 0; border-radius: var(--border-radius-sm); } .dropdown-item:hover { transform: none; } } @media (max-width: 767.98px) { /* Small screen adjustments */ .hero-title { font-size: 2.5rem; } .hero-subtitle { font-size: 1rem; } } @media (min-width: 992px) { /* Desktop adjustments */ .hero-content { padding: 0 2rem; } .plugin-card .card-body { padding: 2rem; } /* Ensure desktop navigation stays horizontal */ #mainNav .navbar-nav { flex-direction: row !important; } } /* ===================== Lattice Authentication Styles ===================== */ /* Lattice Visualization Container */ #lattice-visualization { background-color: var(--light); border-radius: var(--border-radius-lg); overflow: hidden; padding: 1rem; box-shadow: var(--shadow-sm); transition: all 0.3s ease; min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; } #lattice-visualization:hover { box-shadow: var(--shadow-md); } .lattice-explanation { background-color: rgba(79, 70, 229, 0.05); border-left: 4px solid var(--lattice-primary); padding: 0.75rem; border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0; margin: 1rem 0; } /* Authentication Protocol Visualization */ #auth-protocol-visualization { padding: 1rem; border-radius: var(--border-radius-lg); background-color: var(--light); box-shadow: var(--shadow-sm); } .auth-status-banner { position: relative; overflow: hidden; } .auth-status-banner::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); pointer-events: none; } .protocol-steps { counter-reset: step-counter; } .protocol-step { position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease; } .protocol-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); } .protocol-step .card-header { background-color: rgba(79, 70, 229, 0.05); } .step-number { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-weight: bold; } .step-details { display: none; padding: 0.75rem; background-color: rgba(79, 70, 229, 0.05); border-radius: var(--border-radius-sm); margin-top: 0.5rem; } .protocol-step:hover .step-details { display: block; animation: fadeIn 0.3s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .crypto-comparison .card { transition: transform 0.2s ease, box-shadow 0.2s ease; } .crypto-comparison .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); } /* Security Strength Visualization */ #security-strength-visualization { padding: 1rem; border-radius: var(--border-radius-lg); background-color: var(--light); box-shadow: var(--shadow-sm); } .security-levels { width: 100%; position: relative; } .security-explanation { border-left: 4px solid var(--info); background-color: rgba(59, 130, 246, 0.1); } /* 3D Lattice Point Visualization */ .lattice-3d-container { width: 100%; height: 400px; position: relative; background-color: #141424; border-radius: var(--border-radius-lg); overflow: hidden; } .lattice-point { position: absolute; width: 8px; height: 8px; background-color: var(--lattice-tertiary); border-radius: 50%; transform: translate(-50%, -50%); transition: background-color 0.3s ease; } .lattice-point:hover { background-color: var(--lattice-accent); box-shadow: 0 0 10px var(--lattice-accent); } .lattice-line { position: absolute; background-color: rgba(124, 58, 237, 0.3); transform-origin: 0 0; pointer-events: none; }