/* CodeCore Academy - Unique Modern Design */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #00ff88;
    --accent-warning: #ffaa00;
    --accent-danger: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --border-color: #2a2a3a;
    --glow-primary: rgba(0, 212, 255, 0.3);
    --glow-secondary: rgba(124, 58, 237, 0.3);
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --gradient-2: linear-gradient(135deg, #7c3aed 0%, #ff4757 100%);
    --gradient-3: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background:
        linear-gradient(90deg, var(--accent-primary) 1px, transparent 1px) 0 0 / 50px 50px,
        linear-gradient(var(--accent-primary) 1px, transparent 1px) 0 0 / 50px 50px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-to-showcase {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.back-to-showcase:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateX(-3px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-logo i {
    color: var(--accent-warning);
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.about-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
}

.about-btn i {
    margin-right: 5px;
}

.nav-xp {
    display: flex;
    align-items: center;
    gap: 12px;
}

.xp-bar {
    width: 100px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-3);
    transition: width 0.5s ease;
}

.xp-level {
    font-size: 0.85rem;
    color: var(--accent-tertiary);
    font-weight: 600;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 60px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at top right, var(--glow-primary) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--glow-primary);
}

/* 3D Lab Button */
.lab-3d-btn {
    display: inline-flex;
    position: relative;
    margin-top: 25px;
    padding: 18px 35px;
    border-radius: 14px;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.lab-3d-btn .btn-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #00ff88 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    border-radius: 14px;
}

.lab-3d-btn::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-primary);
    border-radius: 12px;
    z-index: 1;
    transition: all 0.4s ease;
}

.lab-3d-btn .btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.lab-3d-btn .btn-content i:first-child {
    font-size: 1.3rem;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
}

.lab-3d-btn .btn-content i:last-child {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.lab-3d-btn:hover::before {
    opacity: 0;
}

.lab-3d-btn:hover .btn-content {
    color: white;
}

.lab-3d-btn:hover .btn-content i:first-child {
    color: white;
    transform: rotateY(180deg);
}

.lab-3d-btn:hover .btn-content i:last-child {
    opacity: 1;
    transform: translateX(0);
}

.lab-3d-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4), 0 0 60px rgba(124, 58, 237, 0.2);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.floating-code {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

.floating-code pre {
    margin: 0;
}

.floating-code code {
    color: var(--text-secondary);
}

.code-keyword {
    color: var(--accent-secondary);
}

.code-function {
    color: var(--accent-primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* Sections */
.section {
    padding: 100px 60px;
    position: relative;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Hardware Explorer */
.hardware-explorer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.pc-build {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pc-component {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pc-component:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.pc-component.active {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.05);
}

.component-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.pc-component span {
    font-weight: 600;
    font-size: 0.9rem;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px solid var(--accent-primary);
    opacity: 0;
    pointer-events: none;
}

.pc-component:hover .pulse-ring {
    animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.component-detail {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    min-height: 300px;
}

.detail-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.detail-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
    opacity: 0.5;
}

.component-info-content {
    animation: fadeIn 0.3s ease;
}

.component-info-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

.component-info-content > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.component-info-content ul {
    list-style: none;
}

.component-info-content li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.component-info-content li:last-child {
    border-bottom: none;
}

.component-info-content li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-tertiary);
}

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

/* Binary Lab */
.binary-lab {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
}

.lab-header {
    text-align: center;
    margin-bottom: 30px;
}

.lab-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.lab-header h3 i {
    color: var(--accent-primary);
    margin-right: 10px;
}

.lab-header p {
    color: var(--text-secondary);
}

.binary-converter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.converter-section {
    flex: 1;
    max-width: 200px;
}

.converter-section label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.converter-section input {
    width: 100%;
    padding: 15px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: 'Fira Code', monospace;
    text-align: center;
    transition: all 0.3s ease;
}

.converter-section input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--glow-primary);
}

.converter-arrows {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.bit-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.bit-box {
    width: 60px;
    height: 80px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bit-box:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.bit-box.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.bit-val {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
}

.bit-weight {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.bit-box.active .bit-weight {
    color: rgba(255, 255, 255, 0.7);
}

.binary-explanation {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Coding Section */
.code-concepts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.concept-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.concept-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--glow-secondary);
}

.concept-card.viewed {
    border-color: var(--accent-tertiary);
}

.concept-card.viewed .concept-status {
    color: var(--accent-tertiary);
}

.concept-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    background: var(--gradient-2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.concept-card h4 {
    margin-bottom: 8px;
}

.concept-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.concept-status {
    font-size: 0.75rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Concept Panel */
.concept-panel {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--accent-secondary);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.concept-panel.show {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.panel-close:hover {
    background: var(--accent-danger);
    color: white;
}

.panel-content h3 {
    color: var(--accent-secondary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.panel-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.code-example {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.code-example .comment {
    color: var(--text-muted);
}

.code-example .keyword {
    color: var(--accent-secondary);
}

.code-example .string {
    color: var(--accent-tertiary);
}

.code-example .number {
    color: var(--accent-warning);
}

/* Code Playground */
.code-playground {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.playground-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.playground-header h3 {
    font-size: 1.2rem;
}

.playground-header h3 i {
    color: var(--accent-primary);
    margin-right: 10px;
}

.language-tabs {
    display: flex;
    gap: 5px;
}

.lang-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.editor-pane {
    border-right: 1px solid var(--border-color);
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.file-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.editor-btn {
    padding: 8px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.editor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-primary);
}

.editor-btn:last-child {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.editor-btn:last-child:hover {
    background: var(--border-color);
    box-shadow: none;
}

.code-editor {
    display: flex;
    min-height: 300px;
}

.line-numbers {
    padding: 15px 10px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    text-align: right;
    user-select: none;
    min-width: 40px;
}

#codeInput {
    flex: 1;
    padding: 15px;
    background: var(--bg-primary);
    border: none;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    line-height: 1.6;
}

.output-pane {
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.output-header span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.output-header i {
    color: var(--accent-tertiary);
    margin-right: 8px;
}

.clear-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.output-console {
    flex: 1;
    padding: 15px 20px;
    background: var(--bg-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    overflow-y: auto;
    min-height: 300px;
}

.output-hint {
    color: var(--text-muted);
    font-style: italic;
}

.output-line {
    padding: 4px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.output-line.error {
    color: var(--accent-danger);
}

.output-line.success {
    color: var(--accent-tertiary);
}

/* Code Challenges */
.challenges-section {
    padding: 25px;
    border-top: 1px solid var(--border-color);
}

.challenges-section h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.challenges-section h4 i {
    color: var(--accent-warning);
    margin-right: 8px;
}

.challenges-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.challenge-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-item:hover {
    border-color: var(--accent-warning);
    transform: translateY(-3px);
}

.challenge-item.completed {
    border-color: var(--accent-tertiary);
    background: rgba(0, 255, 136, 0.05);
}

.challenge-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.challenge-difficulty {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
}

.challenge-difficulty.easy {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-tertiary);
}

.challenge-difficulty.medium {
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-warning);
}

.challenge-difficulty.hard {
    background: rgba(255, 71, 87, 0.2);
    color: var(--accent-danger);
}

.challenge-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.challenge-xp {
    color: var(--accent-warning);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Networking Section */
.network-concepts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.net-concept {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.net-concept:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.net-concept.viewed {
    border-color: var(--accent-tertiary);
}

.net-concept i {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.net-concept h4 {
    margin-bottom: 8px;
}

.net-concept p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Network Detail Panel */
.net-detail-panel {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
    animation: fadeIn 0.3s ease;
}

.net-detail-panel.show {
    display: block;
}

.net-detail-panel h3 {
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.net-detail-panel p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.net-detail-panel code {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent-warning);
    font-family: 'Fira Code', monospace;
}

/* Network Simulator */
.network-simulator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.sim-header {
    text-align: center;
    margin-bottom: 30px;
}

.sim-header h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.sim-header h3 i {
    color: var(--accent-primary);
    margin-right: 10px;
}

.sim-header p {
    color: var(--text-secondary);
}

.network-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 16px;
    margin-bottom: 25px;
    overflow-x: auto;
}

.net-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.node-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.net-node.active .node-icon {
    border-color: var(--accent-tertiary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    background: rgba(0, 255, 136, 0.1);
}

.net-node span {
    font-size: 0.8rem;
    font-weight: 500;
}

.node-info {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.net-connection {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    position: relative;
    min-width: 50px;
}

.connection-line {
    width: 100%;
    height: 20px;
    position: absolute;
    top: -8px;
}

.connection-line line {
    stroke: var(--border-color);
    stroke-width: 2;
    stroke-dasharray: 5;
}

.packet-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    top: -4px;
    left: 0;
    opacity: 0;
    box-shadow: 0 0 10px var(--accent-primary);
}

.packet-dot.animate {
    opacity: 1;
    animation: movePacket 0.4s ease-in-out forwards;
}

@keyframes movePacket {
    from { left: 0; }
    to { left: calc(100% - 12px); }
}

.sim-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.sim-controls select {
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.sim-btn {
    padding: 12px 24px;
    background: var(--gradient-1);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.sim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-primary);
}

.sim-log {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
}

.log-hint {
    color: var(--text-muted);
    font-style: italic;
}

.log-entry {
    padding: 6px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.log-entry .time {
    color: var(--text-muted);
    margin-right: 10px;
}

.log-entry .action {
    color: var(--accent-primary);
}

/* Packet Inspector */
.packet-inspector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
}

.inspector-header {
    text-align: center;
    margin-bottom: 30px;
}

.inspector-header h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.inspector-header h3 i {
    color: var(--accent-secondary);
    margin-right: 10px;
}

.packet-structure {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.packet-layer {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.packet-layer:hover {
    border-color: var(--accent-secondary);
}

.packet-layer.expanded {
    border-color: var(--accent-secondary);
}

.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
}

.layer-name {
    font-weight: 600;
}

.layer-protocol {
    font-size: 0.75rem;
    color: var(--accent-secondary);
    background: rgba(124, 58, 237, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
}

.layer-content {
    padding: 15px 20px;
    display: none;
}

.packet-layer.expanded .layer-content {
    display: block;
}

.field {
    padding: 8px 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.field:last-child {
    border-bottom: none;
}

.field span {
    color: var(--text-muted);
    margin-right: 10px;
}

/* Terminal Section */
.terminal-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.terminal-window {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #2d2d2d;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-btn.red { background: #ff5f56; }
.term-btn.yellow { background: #ffbd2e; }
.term-btn.green { background: #27ca40; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

.terminal-type-selector {
    margin-left: auto;
}

.terminal-type-selector select {
    background: #1a1a1a;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.terminal-type-selector select:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.terminal-type-selector select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.terminal-type-selector select option {
    background: #1a1a1a;
    color: var(--text-secondary);
    padding: 8px;
}

.terminal-body {
    padding: 20px;
    min-height: 350px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
}

.terminal-output {
    margin-bottom: 10px;
}

.terminal-output p {
    color: #00ff88;
    margin-bottom: 5px;
}

.cmd-highlight {
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: var(--accent-primary);
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

.command-reference {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
}

.command-reference h4 {
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.cmd-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cmd-item code {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    color: var(--accent-warning);
    min-width: 80px;
    text-align: center;
}

.cmd-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Terminal Challenges */
.terminal-challenges {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
}

.terminal-challenges h4 {
    margin-bottom: 20px;
}

.terminal-challenges h4 i {
    color: var(--accent-warning);
    margin-right: 10px;
}

.term-challenge-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.term-challenge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.term-challenge:hover {
    border-color: var(--accent-warning);
    transform: translateY(-3px);
}

.term-challenge.completed {
    border-color: var(--accent-tertiary);
}

.tchallenge-icon {
    width: 45px;
    height: 45px;
    background: var(--bg-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-warning);
    font-size: 1.2rem;
}

.tchallenge-info {
    flex: 1;
}

.tchallenge-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.tchallenge-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tchallenge-xp {
    color: var(--accent-warning);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Quiz Section */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.quiz-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.quiz-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.quiz-card h4 {
    margin-bottom: 8px;
}

.quiz-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.quiz-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-score {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.quiz-score.passed {
    color: var(--accent-tertiary);
    background: rgba(0, 255, 136, 0.1);
}

.quiz-start-btn {
    padding: 10px 20px;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-start-btn:hover {
    background: #00b8e6;
}

/* Quiz Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-danger);
    color: white;
}

/* About Modal */
.about-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.about-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.about-header i {
    font-size: 3rem;
    color: var(--accent-warning);
    margin-bottom: 15px;
}

.about-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.about-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.about-body p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.7;
}

.about-body h3 {
    color: var(--accent-primary);
    margin: 25px 0 15px;
    font-size: 1.1rem;
}

.about-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.about-body li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.about-body li:last-child {
    border-bottom: none;
}

.about-body li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-tertiary);
}

.about-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.quiz-progress {
    margin-bottom: 25px;
}

.quiz-progress span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.quiz-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 1.2rem;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quiz-option {
    padding: 15px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover:not(.disabled) {
    border-color: var(--accent-primary);
}

.quiz-option.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

.quiz-option.correct {
    border-color: var(--accent-tertiary);
    background: rgba(0, 255, 136, 0.1);
}

.quiz-option.wrong {
    border-color: var(--accent-danger);
    background: rgba(255, 71, 87, 0.1);
}

.quiz-option.disabled {
    cursor: not-allowed;
}

.quiz-feedback {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-tertiary);
    color: var(--accent-tertiary);
}

.quiz-feedback.wrong {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.quiz-next-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-1);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-primary);
}

.quiz-results {
    text-align: center;
    padding: 20px;
}

.results-icon {
    font-size: 4rem;
    color: var(--accent-warning);
    margin-bottom: 20px;
}

.quiz-results h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.quiz-results p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-retry, .btn-done {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-done {
    background: var(--gradient-1);
    color: white;
}

/* XP Notification */
.xp-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--gradient-3);
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    transform: translateX(150%);
    transition: transform 0.4s ease;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

.xp-notification.show {
    transform: translateX(0);
}

.xp-notification i {
    font-size: 1.2rem;
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: var(--gradient-2);
    padding: 20px 30px;
    border-radius: 15px;
    z-index: 1500;
    transition: transform 0.4s ease;
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.4);
}

.achievement-popup.show {
    transform: translateX(-50%) translateY(0);
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.achievement-content i {
    font-size: 2rem;
}

.achievement-text {
    display: flex;
    flex-direction: column;
}

.achievement-text strong {
    font-size: 0.85rem;
    opacity: 0.9;
}

.achievement-text span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 50px 60px;
    text-align: center;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-brand i {
    color: var(--accent-primary);
}

.main-footer p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 12px;
}

/* Responsive */
@media (max-width: 1200px) {
    .code-concepts, .network-concepts, .quiz-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .challenges-list, .term-challenge-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .main-nav {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-left {
        gap: 10px;
    }

    .back-to-showcase span {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 30px 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 40px;
    }

    .section {
        padding: 60px 30px;
    }

    .hardware-explorer {
        grid-template-columns: 1fr;
    }

    .editor-container {
        grid-template-columns: 1fr;
    }

    .editor-pane {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .terminal-container {
        grid-template-columns: 1fr;
    }

    .network-diagram {
        flex-direction: column;
        gap: 20px;
    }

    .net-connection {
        width: 4px;
        height: 30px;
        min-width: unset;
    }

    .packet-dot {
        left: -4px;
        top: 0;
    }

    .packet-dot.animate {
        animation: movePacketVert 0.4s ease-in-out forwards;
    }

    @keyframes movePacketVert {
        from { top: 0; }
        to { top: calc(100% - 12px); }
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .code-concepts, .network-concepts, .quiz-grid {
        grid-template-columns: 1fr;
    }

    .challenges-list, .term-challenge-list {
        grid-template-columns: 1fr;
    }

    .pc-build {
        grid-template-columns: repeat(2, 1fr);
    }

    .bit-grid {
        flex-wrap: wrap;
    }

    .bit-box {
        width: 45px;
        height: 60px;
    }

    .bit-val {
        font-size: 1.3rem;
    }
}
