/* ════════════════════════════════════════════ PDA SIMULATOR – STYLE.CSS Aesthetic: Dark Sci-Fi Terminal / Presentation ════════════════════════════════════════════ */ /* ── Variables ───────────────────────────── */ :root { --bg: #090b14; --bg2: #0d1120; --surface: rgba(255,255,255,.04); --surface2: rgba(255,255,255,.08); --border: rgba(255,255,255,.10); --accent: #00e5ff; --accent2: #7c4dff; --accent3: #ff6b6b; --green: #00e676; --yellow: #ffd740; --text: #e8eaf0; --text2: #8892a4; --text3: #4a5568; --nav-w: 200px; --font-display: 'Orbitron', monospace; --font-mono: 'Space Mono', monospace; --font-body: 'Inter', sans-serif; --radius: 12px; --glow: 0 0 20px rgba(0,229,255,.25); --glow2: 0 0 20px rgba(124,77,255,.25); } /* ── Reset ───────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { scroll-behavior: smooth; } body { background: var(--bg); color: var(--text); font-family: var(--font-body); min-height: 100vh; overflow-x: hidden; } /* ── Grid background ─────────────────────── */ .grid-bg { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(0,229,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0,229,255,.04) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; } .scanline { position: absolute; inset: 0; z-index: 0; background: repeating-linear-gradient( to bottom, transparent, transparent 3px, rgba(0,0,0,.08) 3px, rgba(0,0,0,.08) 4px ); pointer-events: none; animation: scan 8s linear infinite; } @keyframes scan { 0% { background-position: 0 0; } 100% { background-position: 0 80px; } } /* ── Side Nav ────────────────────────────── */ .sidenav { position: fixed; top: 0; left: 0; width: var(--nav-w); height: 100vh; background: rgba(9,11,20,.95); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 24px 0; z-index: 100; backdrop-filter: blur(12px); } .nav-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; color: var(--text); padding: 0 24px 24px; letter-spacing: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; } .nav-logo span { color: var(--accent); } .sidenav ul { list-style: none; flex: 1; } .sidenav ul li { } .sidenav ul li button { width: 100%; text-align: left; padding: 12px 24px; background: none; border: none; color: var(--text2); font-family: var(--font-body); font-size: .85rem; font-weight: 500; cursor: pointer; transition: all .2s; border-left: 3px solid transparent; position: relative; } .sidenav ul li button:hover, .sidenav ul li button.active { color: var(--accent); border-left-color: var(--accent); background: rgba(0,229,255,.06); } /* ── Sections ────────────────────────────── */ .section { margin-left: var(--nav-w); min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; padding: 60px 40px; overflow: hidden; } .section-inner { position: relative; z-index: 1; width: 100%; max-width: 1000px; } .section-header { margin-bottom: 48px; text-align: center; } .section-num { font-family: var(--font-display); font-size: 4rem; font-weight: 900; color: rgba(0,229,255,.08); line-height: 1; margin-bottom: 4px; letter-spacing: 4px; } .section-header h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--text); letter-spacing: 1px; margin-bottom: 8px; } .section-header p { color: var(--text2); font-size: .95rem; } /* ── HERO ────────────────────────────────── */ #hero { background: radial-gradient(ellipse at 30% 40%, rgba(0,229,255,.06) 0%, transparent 60%), radial-gradient(ellipse at 70% 60%, rgba(124,77,255,.06) 0%, transparent 60%), var(--bg); } .hero-content { position: relative; z-index: 2; text-align: center; max-width: 700px; } .badge { display: inline-block; background: rgba(0,229,255,.1); border: 1px solid rgba(0,229,255,.3); color: var(--accent); font-size: .75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; padding: 6px 16px; border-radius: 20px; margin-bottom: 24px; animation: fadeUp .6s ease both; } .hero-title { font-family: var(--font-display); font-weight: 900; line-height: 1.1; margin-bottom: 16px; } .title-line { display: block; font-size: clamp(3rem, 8vw, 5.5rem); color: var(--text); animation: fadeUp .6s ease both; animation-delay: .1s; } .title-line.accent { color: var(--accent); text-shadow: 0 0 40px rgba(0,229,255,.4); animation-delay: .2s; } .hero-sub { font-family: var(--font-mono); color: var(--text2); font-size: .9rem; letter-spacing: 1px; margin-bottom: 20px; animation: fadeUp .6s ease both .3s; } .hero-desc { color: var(--text2); font-size: 1rem; line-height: 1.7; margin-bottom: 24px; animation: fadeUp .6s ease both .35s; } .hero-desc strong { color: var(--accent); } .hero-desc em { color: var(--accent2); font-style: normal; } .hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; animation: fadeUp .6s ease both .4s; } .chip { padding: 5px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: .78rem; color: var(--text2); font-weight: 500; } /* ── Orbs ────────────────────────────────── */ .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .4; pointer-events: none; animation: float 8s ease-in-out infinite; } .orb1 { width: 300px; height: 300px; background: var(--accent2); top: 10%; left: 5%; animation-delay: 0s; } .orb2 { width: 200px; height: 200px; background: var(--accent); top: 60%; right: 5%; animation-delay: 3s; } .orb3 { width: 150px; height: 150px; background: #ff6b6b; bottom: 10%; left: 30%; animation-delay: 6s; } @keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-24px) scale(1.05); } } /* ── Buttons ─────────────────────────────── */ .btn-glow { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; font-family: var(--font-display); font-size: .85rem; font-weight: 700; letter-spacing: 1px; cursor: pointer; box-shadow: 0 0 24px rgba(0,229,255,.4), 0 4px 20px rgba(0,0,0,.3); transition: all .3s; animation: fadeUp .6s ease both .5s; } .btn-glow:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,229,255,.6), 0 8px 30px rgba(0,0,0,.4); } .btn-glow:active { transform: translateY(0); } .btn-outline { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 8px; background: transparent; border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-body); font-size: .9rem; font-weight: 600; cursor: pointer; transition: all .3s; } .btn-outline:hover { background: rgba(0,229,255,.08); box-shadow: var(--glow); } /* ── Concepts grid ───────────────────────── */ .concepts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 40px; } .concept-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(8px); transition: transform .25s, box-shadow .25s, border-color .25s; animation: fadeUp .5s ease both; animation-delay: var(--delay, 0s); } .concept-card:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(0,229,255,.3); } .concept-icon { font-family: var(--font-display); font-size: 1.8rem; font-weight: 900; color: var(--accent); margin-bottom: 12px; } .concept-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; } .concept-card p { color: var(--text2); font-size: .85rem; line-height: 1.6; } .formal-def { text-align: center; margin: 32px 0 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 24px; } .mono { font-family: var(--font-mono); color: var(--accent2); font-size: 1rem; letter-spacing: 1px; } /* ── Input form ──────────────────────────── */ .sample-row { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; } .sample-label { color: var(--text2); font-size: .85rem; font-weight: 600; } .btn-sample { padding: 7px 16px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-size: .82rem; cursor: pointer; transition: all .2s; font-family: var(--font-mono); } .btn-sample:hover { background: rgba(0,229,255,.1); border-color: var(--accent); color: var(--accent); } .input-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 20px; } .input-group { display: flex; flex-direction: column; gap: 6px; } .input-group label { font-size: .82rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; } .input-group .hint { font-size: .75rem; color: var(--text3); text-transform: none; letter-spacing: 0; font-weight: 400; } .input-group input, .input-group select, .input-group textarea { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-family: var(--font-mono); font-size: .85rem; transition: border-color .2s, box-shadow .2s; resize: vertical; } .input-group input:focus, .input-group select:focus, .input-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,229,255,.15); } .input-group textarea { min-height: 160px; } .input-group code { background: rgba(0,229,255,.1); color: var(--accent); padding: 1px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: .78rem; } .full-width { margin-bottom: 20px; } .input-row { display: flex; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; } .input-row .input-group { min-width: 180px; } .action-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } select option { background: var(--bg2); } /* ── Toast ───────────────────────────────── */ .toast { margin-top: 20px; padding: 14px 20px; border-radius: 8px; background: rgba(255,107,107,.15); border: 1px solid rgba(255,107,107,.4); color: #ff8a80; font-size: .85rem; animation: fadeUp .3s ease; } .toast.success { background: rgba(0,230,118,.12); border-color: rgba(0,230,118,.35); color: var(--green); } .toast.hidden { display: none; } /* ── Diagram ─────────────────────────────── */ .diagram-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-height: 460px; position: relative; overflow: hidden; } .diagram-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: .9rem; } #pda-diagram { display: block; } /* SVG styling */ .state-circle { fill: var(--surface2); stroke: rgba(0,229,255,.4); stroke-width: 2; transition: fill .3s, stroke .3s; cursor: default; } .state-circle.active { fill: rgba(0,229,255,.2); stroke: var(--accent); filter: drop-shadow(0 0 8px rgba(0,229,255,.6)); } .state-circle.accept { stroke-width: 4; stroke: var(--green); } .state-label { fill: var(--text); font-family: var(--font-mono); font-size: 13px; dominant-baseline: central; text-anchor: middle; pointer-events: none; } .trans-arrow { stroke: rgba(0,229,255,.3); stroke-width: 1.5; fill: none; transition: stroke .3s; } .trans-arrow.active { stroke: var(--accent2); stroke-width: 2.5; filter: drop-shadow(0 0 4px var(--accent2)); } .trans-label { fill: var(--text2); font-size: 10px; font-family: var(--font-mono); text-anchor: middle; } .trans-label.active { fill: var(--accent2); } .start-arrow { stroke: var(--accent); stroke-width: 2; fill: none; } /* ── Simulation ──────────────────────────── */ .sim-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 36px; } .sim-controls { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; } .ctrl-btn { width: 48px; height: 48px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-size: 1rem; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; } .ctrl-btn:hover { background: rgba(0,229,255,.1); border-color: var(--accent); color: var(--accent); } .ctrl-btn.play.playing { background: rgba(255,107,107,.1); border-color: var(--accent3); color: var(--accent3); } .ctrl-btn:disabled { opacity: .35; cursor: not-allowed; } .speed-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: .8rem; color: var(--text2); } .speed-row input[type=range] { flex: 1; accent-color: var(--accent); } .current-panel { padding: 20px; } .glass-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(8px); } .cur-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); } .cur-row:last-child { border-bottom: none; } .cur-label { font-size: .75rem; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; } .cur-val { font-family: var(--font-mono); font-size: .9rem; color: var(--text); text-align: right; max-width: 60%; word-break: break-all; } .cur-val.small { font-size: .75rem; } .state-badge { background: rgba(0,229,255,.12); color: var(--accent); padding: 2px 10px; border-radius: 4px; border: 1px solid rgba(0,229,255,.25); } /* Tape */ .tape-section, .stack-section { margin-bottom: 20px; } .tape-section h4, .stack-section h4 { font-size: .8rem; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; } .tape { display: flex; flex-wrap: wrap; gap: 4px; } .tape-cell { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface2); font-family: var(--font-mono); font-size: .9rem; display: flex; align-items: center; justify-content: center; position: relative; transition: all .3s; } .tape-cell.current { background: rgba(0,229,255,.15); border-color: var(--accent); box-shadow: 0 0 12px rgba(0,229,255,.3); } .tape-cell.consumed { opacity: .35; } .tape-pointer { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); color: var(--accent); font-size: .7rem; } .stack-visual { display: flex; gap: 4px; flex-wrap: wrap; } .stack-cell { padding: 6px 14px; border-radius: 6px; background: rgba(124,77,255,.15); border: 1px solid rgba(124,77,255,.35); color: var(--accent2); font-family: var(--font-mono); font-size: .9rem; animation: popIn .25s ease; transition: all .3s; } .stack-cell.top { background: rgba(0,229,255,.18); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(0,229,255,.3); } @keyframes popIn { from { transform: scale(.7); opacity:0; } to { transform: scale(1); opacity:1; } } /* Timeline */ .timeline-wrap { } .timeline-wrap h4 { font-size: .8rem; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; } .timeline { display: flex; gap: 6px; flex-wrap: wrap; } .tl-step { width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: .7rem; color: var(--text2); cursor: pointer; transition: all .2s; } .tl-step:hover { border-color: var(--accent); color: var(--accent); } .tl-step.active-tl { background: rgba(0,229,255,.18); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 8px rgba(0,229,255,.3); } .tl-step.dead-tl { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.3); color: var(--accent3); } /* ── Result ──────────────────────────────── */ .result-center { display: flex; align-items: center; justify-content: center; } .result-card { max-width: 520px; width: 100%; padding: 48px 40px; text-align: center; } .result-icon { font-family: var(--font-display); font-size: 3.5rem; margin-bottom: 16px; animation: pulse 2s ease infinite; } @keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} } .result-icon.accepted { color: var(--green); text-shadow: 0 0 30px rgba(0,230,118,.5); } .result-icon.rejected { color: var(--accent3); text-shadow: 0 0 30px rgba(255,107,107,.5); } #result-title { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 12px; } #result-desc { color: var(--text2); margin-bottom: 28px; line-height: 1.6; } .result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; } .stat-item { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; } .stat-label { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; } .stat-val { font-family: var(--font-mono); color: var(--text); font-size: .95rem; } /* ── Scroll hint ─────────────────────────── */ .scroll-hint { position: fixed; bottom: 24px; left: calc(var(--nav-w) + 50% - var(--nav-w)/2); transform: translateX(-50%); color: var(--text3); animation: bounce 2s ease infinite; pointer-events: none; z-index: 50; } @keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} } /* ── Animations ──────────────────────────── */ @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* ── Responsive ──────────────────────────── */ @media (max-width: 768px) { :root { --nav-w: 0px; } .sidenav { display: none; } .section { padding: 40px 20px; } .sim-layout { grid-template-columns: 1fr; } .concepts-grid { grid-template-columns: 1fr; } }