/* ===================================
   Learning Linux Interactive - Main Styles
   =================================== */

:root {
    /* Colors */
    --primary: #5c6bc0;
    --primary-dark: #3949ab;
    --primary-light: #7986cb;
    --secondary: #26a69a;
    --accent: #ff7043;
    --success: #66bb6a;
    --warning: #ffa726;
    --error: #ef5350;
    --info: #42a5f5;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-tertiary: #e8ecef;
    --bg-code: #1e1e2e;
    --bg-card: #ffffff;

    /* Text */
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-muted: #8795a1;
    --text-inverse: #ffffff;

    /* Borders */
    --border-color: #e1e4e8;
    --border-radius: 8px;
    --border-radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --header-height: 64px;
    --sidebar-width: 280px;
    --content-max-width: 900px;

    /* Fonts */
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Roboto Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-card: #1f1f38;
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --border-color: #333355;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ===================================
   Reset & Base Styles
   =================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--bg-tertiary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

pre {
    font-family: var(--font-mono);
    overflow-x: auto;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius);
    z-index: 1000;
}

.skip-link:focus {
    top: 16px;
}

/* ===================================
   Header
   =================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.logo i {
    font-size: 1.75rem;
    color: var(--primary);
}

.logo .subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

/* ===================================
   Layout
   =================================== */

.layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Sidebars */
.sidebar {
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
}

.right-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav {
    padding: 12px;
}

.nav-tree {
    list-style: none;
}

.nav-tree .nav-item {
    margin-bottom: 2px;
}

.nav-tree .nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.nav-tree .nav-item a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.nav-tree .nav-item a:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.nav-tree .nav-item.active a {
    background: rgba(92, 107, 192, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.nav-tree .nav-item.highlight a {
    background: rgba(38, 166, 154, 0.1);
    color: var(--secondary);
}

.nav-tree .nav-item.highlight a:hover {
    background: rgba(38, 166, 154, 0.2);
}

.nav-section-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 16px 12px 8px;
    margin-top: 8px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.progress-tracker {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--border-radius);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Table of Contents */
.toc {
    padding: 12px;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 4px;
}

.toc a {
    display: block;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.toc a:hover {
    color: var(--primary);
    border-left-color: var(--primary-light);
}

.toc a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(92, 107, 192, 0.05);
}

/* ===================================
   Main Content
   =================================== */

.content {
    padding: 32px 48px;
    max-width: calc(var(--content-max-width) + 96px);
    margin: 0 auto;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 8px;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-stats {
    display: flex;
    gap: 24px;
}

.hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-stats .stat i {
    color: var(--primary);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.terminal-preview {
    width: 100%;
    max-width: 400px;
    background: var(--bg-code);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.terminal-header {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
}

.terminal-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-header .dot.red { background: #ff5f56; }
.terminal-header .dot.yellow { background: #ffbd2e; }
.terminal-header .dot.green { background: #27c93f; }

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #a6e3a1;
}

.terminal-body .prompt {
    color: #89b4fa;
}

.terminal-body .cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.card-header i {
    color: var(--primary);
    font-size: 1.1rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-content {
    padding: 20px;
}

/* Concepts Tags */
.concept-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.concept-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.concept-tag:hover {
    background: rgba(92, 107, 192, 0.15);
    color: var(--primary);
}

.concept-tag.learned {
    background: rgba(102, 187, 106, 0.15);
    color: var(--success);
}

.concept-tag i {
    font-size: 0.75rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 48px;
    scroll-margin-top: calc(var(--header-height) + 24px);
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-section h2 i {
    color: var(--primary);
    font-size: 1.5rem;
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

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

/* Analogy Box */
.analogy-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(92, 107, 192, 0.1), rgba(38, 166, 154, 0.05));
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--primary);
    margin: 24px 0;
}

.analogy-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
}

.analogy-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.analogy-content p {
    margin: 0;
}

.analogy-box.lego .analogy-icon { background: var(--accent); }
.analogy-box.icecream .analogy-icon { background: #e91e63; }
.analogy-box.road .analogy-icon { background: var(--secondary); }

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.feature-card {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* Tables */
.interactive-table {
    overflow-x: auto;
    margin: 24px 0;
}

.interactive-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.interactive-table th,
.interactive-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.interactive-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.interactive-table td {
    color: var(--text-secondary);
}

.interactive-table td i {
    margin-right: 10px;
    color: var(--primary);
}

.interactive-table tr:last-child td {
    border-bottom: none;
}

.interactive-table tr:hover td {
    background: var(--bg-secondary);
}

/* Callouts */
.callout {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 24px 0;
}

.callout i {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 2px;
}

.callout strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.callout p {
    margin: 0;
    font-size: 0.95rem;
}

.callout.info {
    background: rgba(66, 165, 245, 0.1);
    border-left: 4px solid var(--info);
}

.callout.info i { color: var(--info); }

.callout.success {
    background: rgba(102, 187, 106, 0.1);
    border-left: 4px solid var(--success);
}

.callout.success i { color: var(--success); }

.callout.warning {
    background: rgba(255, 167, 38, 0.1);
    border-left: 4px solid var(--warning);
}

.callout.warning i { color: var(--warning); }

.callout.definition {
    background: rgba(92, 107, 192, 0.1);
    border-left: 4px solid var(--primary);
}

.callout.definition i { color: var(--primary); }

/* Fun Fact */
.fun-fact {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 112, 67, 0.1), rgba(255, 167, 38, 0.05));
    border-radius: var(--border-radius);
    margin: 24px 0;
}

.fun-fact-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent);
}

.fun-fact p {
    margin: 0;
}

.fun-fact.mac {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(100, 100, 100, 0.05));
}

.fun-fact.mac .fun-fact-header {
    color: #555;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
    margin: 32px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.timeline-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* Highlight Box */
.highlight-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--success);
    margin: 24px 0;
}

.highlight-box > i {
    flex-shrink: 0;
    font-size: 2.5rem;
    color: var(--success);
}

.highlight-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.highlight-box p {
    margin-bottom: 16px;
}

.highlight-box.gaming {
    border-color: var(--primary);
}

.highlight-box.gaming > i {
    color: var(--primary);
}

/* Person Cards */
.person-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.person-card {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
}

.person-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    color: white;
    overflow: hidden;
}

.pioneer-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.person-avatar.ken {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 3px solid var(--primary);
}

.person-avatar.dennis {
    background: linear-gradient(135deg, var(--secondary), #00897b);
    border: 3px solid var(--secondary);
}

.person-avatar.stallman {
    background: linear-gradient(135deg, var(--accent), #e64a19);
}

.person-card h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.person-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.person-achievements {
    list-style: none;
    text-align: left;
}

.person-achievements li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.person-achievements li:last-child {
    border-bottom: none;
}

.person-achievements li i {
    color: var(--success);
    margin-right: 8px;
}

/* Code Demo */
.code-demo {
    background: var(--bg-code);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin: 24px 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
}

.code-title {
    color: #cdd6f4;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.code-badge {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.code-demo pre {
    padding: 20px;
    margin: 0;
    background: transparent;
}

.code-demo code {
    background: transparent;
    padding: 0;
    color: #cdd6f4;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-demo .comment { color: #6c7086; }
.code-demo .preprocessor { color: #cba6f7; }
.code-demo .string { color: #a6e3a1; }
.code-demo .type { color: #89b4fa; }
.code-demo .function { color: #f9e2af; }
.code-demo .keyword { color: #cba6f7; }
.code-demo .number { color: #fab387; }

.code-demo .btn {
    margin: 0 16px 16px;
}

/* Benefits List */
.benefits-list {
    margin: 24px 0;
}

.benefit {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.benefit-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
}

/* Philosophy Grid */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.philosophy-card {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-normal);
}

.philosophy-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.philosophy-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
}

.philosophy-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.philosophy-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* Comparison Cards */
.comparison-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.comparison-card {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--border-color);
}

.comparison-card.system-v {
    border-color: #7c4dff;
}

.comparison-card.bsd {
    border-color: #ff6b6b;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comparison-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.corporate {
    background: rgba(124, 77, 255, 0.15);
    color: #7c4dff;
}

.badge.academic {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.comparison-card ul {
    list-style: none;
    margin-top: 16px;
}

.comparison-card li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.comparison-card li i {
    margin-right: 10px;
    width: 16px;
}

/* Person Spotlight */
.person-spotlight {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    margin: 24px 0;
}

.person-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: 2.5rem;
    color: white;
    overflow: hidden;
}

.person-image .pioneer-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.person-image.stallman {
    background: linear-gradient(135deg, #8e24aa, #5e35b1);
    border: 3px solid #8e24aa;
}

.person-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.person-info > p {
    margin-bottom: 16px;
}

.freedoms {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.freedom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.freedom i {
    color: var(--primary);
}

/* Story Card */
.story-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin: 24px 0;
}

.story-header {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.story-header .year {
    font-size: 1.5rem;
    font-weight: 700;
}

.story-header .location {
    font-size: 0.9rem;
    opacity: 0.9;
}

.story-content {
    padding: 24px;
}

.story-content p {
    margin-bottom: 12px;
}

.story-content p:last-child {
    margin-bottom: 0;
}

/* Story card with portrait */
.story-card.with-portrait .story-content-with-photo {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
}

.story-photo {
    flex-shrink: 0;
    text-align: center;
}

.story-photo .pioneer-photo {
    width: 120px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.story-photo .photo-caption {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.story-text p {
    margin-bottom: 12px;
}

.story-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .story-card.with-portrait .story-content-with-photo {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Quote Card */
.quote-card {
    position: relative;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    margin: 24px 0;
}

.quote-marks {
    position: absolute;
    top: 16px;
    left: 24px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.2;
    line-height: 1;
}

.quote-card blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    margin: 0 0 16px;
    padding-left: 24px;
}

.quote-card cite {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 24px;
}

.quote-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(102, 187, 106, 0.1);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--success);
}

.quote-note i {
    margin-right: 8px;
}

/* Reasons Grid */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.reason {
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
}

.reason i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.reason h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.reason p {
    font-size: 0.85rem;
    margin: 0;
}

/* Stats Section */
.stats-section {
    margin: 32px 0;
}

.stats-section h3 {
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.stat-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.stats-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.stats-note i {
    margin-right: 6px;
    color: var(--info);
}

/* Distro Cards */
.distro-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.distro-card {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--border-color);
}

.distro-card.debian {
    border-color: #a80030;
}

.distro-card.ubuntu {
    border-color: #e95420;
}

.distro-logo {
    font-size: 3rem;
    margin-bottom: 16px;
}

.distro-card.debian .distro-logo { color: #a80030; }
.distro-card.ubuntu .distro-logo { color: #e95420; }

.distro-card h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.distro-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.distro-features {
    list-style: none;
    margin-top: 16px;
}

.distro-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.distro-features li i {
    color: var(--success);
    margin-right: 8px;
}

/* Distro Tree */
.distro-tree {
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin: 24px 0;
}

.distro-tree h4 {
    margin-bottom: 16px;
}

.tree-branch {
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

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

.tree-parent {
    color: var(--primary);
    font-weight: 600;
}

.tree-arrow {
    color: var(--text-muted);
    margin: 0 8px;
}

.tree-children {
    color: var(--text-secondary);
}

/* Reasons List */
.reasons-list {
    margin: 24px 0;
}

.reason-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    transition: all var(--transition-normal);
}

.reason-item:hover {
    border-color: var(--primary);
    transform: translateX(8px);
}

.reason-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
}

.reason-content h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.reason-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* Takeaways */
.takeaways {
    background: linear-gradient(135deg, rgba(92, 107, 192, 0.05), rgba(38, 166, 154, 0.05));
    padding: 32px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(92, 107, 192, 0.2);
}

.takeaways-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.takeaway {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.takeaway i {
    color: var(--success);
    margin-top: 2px;
}

/* Interactive Sections */
.interactive-section {
    margin: 48px 0;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--primary);
    scroll-margin-top: calc(var(--header-height) + 24px);
}

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

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    justify-content: center;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* Content Footer */
.content-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.attribution {
    text-align: center;
    margin-bottom: 24px;
}

.attribution p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.next-chapter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 50;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   Responsive Design
   =================================== */

/* Hide hamburger on desktop by default */
.hamburger {
    display: none;
}

@media (max-width: 1200px) {
    .layout {
        grid-template-columns: var(--sidebar-width) 1fr;
    }

    .right-sidebar {
        display: none;
    }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .left-sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
        background: var(--bg-primary);
        border-right: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .left-sidebar.open {
        transform: translateX(0);
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 98;
    }

    .mobile-overlay.open {
        display: block;
    }

    .content {
        padding: 24px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .feature-grid,
    .person-cards,
    .philosophy-grid,
    .comparison-cards,
    .distro-cards,
    .reasons-grid,
    .stats-grid,
    .takeaways-grid {
        grid-template-columns: 1fr;
    }

    .freedoms {
        grid-template-columns: 1fr;
    }

    .person-spotlight {
        flex-direction: column;
        text-align: center;
    }

    .header-nav {
        display: none;
    }

    /* Hamburger menu button */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 28px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-right: 16px;
    }

    .hamburger span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

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

    .content-section h2 {
        font-size: 1.5rem;
    }

    .analogy-box {
        flex-direction: column;
        text-align: center;
    }

    .highlight-box {
        flex-direction: column;
        text-align: center;
    }

    .benefit {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================
   Restaurant OS Game
   =================================== */

.restaurant-frame {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin: 24px 0;
}

.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
    border-bottom: 2px solid #1a252f;
}

.restaurant-title {
    font-family: var(--font-sans);
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.restaurant-title i {
    color: #f39c12;
    margin-right: 8px;
}

.restaurant-stats {
    display: flex;
    gap: 16px;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
}

.stat-badge i {
    margin-right: 4px;
    color: #f39c12;
}

.restaurant-game-area {
    position: relative;
    min-height: 350px;
    background: linear-gradient(180deg, #ecf0f1 0%, #bdc3c7 100%);
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
    padding: 16px;
}

.restaurant-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 20;
    padding: 24px;
}

.restaurant-overlay.hidden {
    display: none;
}

.restaurant-overlay h3 {
    color: #f39c12;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.restaurant-overlay p {
    color: #ecf0f1;
    margin-bottom: 12px;
    max-width: 400px;
}

.restaurant-rules {
    text-align: left;
    color: #bdc3c7;
    margin: 16px 0;
    list-style: none;
}

.restaurant-rules li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.restaurant-rules li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #f39c12;
}

.restaurant-rules strong {
    color: #3498db;
}

.restaurant-btn {
    background: linear-gradient(180deg, #27ae60 0%, #1e8449 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.restaurant-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.kitchen-area, .tables-area, .waiting-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kitchen-label, .tables-label, .waiting-label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7f8c8d;
    margin-bottom: 12px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.kitchen-label { color: #e74c3c; }
.tables-label { color: #3498db; }
.waiting-label { color: #9b59b6; }

.chef-slots {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.chef-slot {
    width: 60px;
    height: 60px;
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.chef-slot.cooking {
    animation: cookPulse 0.5s ease infinite;
}

@keyframes cookPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.table-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.table-slot {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.table-slot.occupied {
    border-style: solid;
    border-color: #3498db;
    background: #e8f4f8;
}

.customer-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
}

/* Queue App Styles */
.queue-app {
    background: white;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    border: 2px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.queue-app:active {
    cursor: grabbing;
}

.queue-app.warning {
    border-color: #f39c12;
    animation: pulseWarning 1s ease infinite;
}

.queue-app.critical {
    border-color: #e74c3c;
    animation: pulseCritical 0.5s ease infinite;
}

@keyframes pulseWarning {
    0%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(243, 156, 18, 0); }
}

@keyframes pulseCritical {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.6); }
    50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

.queue-app-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.queue-app-info {
    flex: 1;
    min-width: 0;
}

.queue-app-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 4px;
}

.queue-app-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.queue-app-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.drag-hint {
    color: #bdc3c7;
    font-size: 1rem;
}

/* RAM Slot Styles */
.ram-slot {
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 10px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    transition: all 0.2s ease;
}

.ram-slot.empty {
    color: #bdc3c7;
}

.ram-slot.empty i {
    font-size: 1.5rem;
}

.ram-slot .drop-hint {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ram-slot.drag-over {
    border-color: #3498db;
    border-style: solid;
    background: #e8f4f8;
    transform: scale(1.05);
}

.ram-slot.occupied {
    border-style: solid;
    border-color: #27ae60;
    background: #e8f8f0;
}

.ram-slot.processing {
    border-color: #f39c12;
    background: #fef9e7;
    animation: processingPulse 1s ease infinite;
}

@keyframes processingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(243, 156, 18, 0); }
}

.ram-app-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.ram-app-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
}

.processing-indicator {
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.processing-indicator::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: #f39c12;
    animation: processingBar 1s ease infinite;
}

@keyframes processingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* CPU Display Styles */
.cpu-active, .cpu-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.cpu-idle {
    color: #95a5a6;
}

.cpu-idle i {
    font-size: 2rem;
}

.cpu-active {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 12px;
    border: 2px solid #f39c12;
}

.cpu-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.cpu-info {
    text-align: center;
}

.cpu-info span {
    font-size: 0.7rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

.cpu-info strong {
    display: block;
    font-size: 0.85rem;
    color: #2c3e50;
}

.cpu-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: #f39c12;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Shake animation for crash */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.3s ease;
}

/* Float up animation for messages */
@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1.2); }
}

/* Speed indicator */
.speed-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.speed-label {
    color: #95a5a6;
    margin-right: 4px;
}

/* Final stats overlay */
.final-stats {
    margin: 20px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row.total {
    border-top: 2px solid #f39c12;
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
}

.stat-label {
    color: #95a5a6;
}

.stat-big {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.stat-big.score {
    color: #f39c12;
}

.score-message {
    color: #95a5a6;
    font-style: italic;
}

.app-customer {
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.app-customer:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-customer.waiting {
    border-color: #f39c12;
}

.app-customer.angry {
    border-color: #e74c3c;
    animation: angryShake 0.3s ease infinite;
}

@keyframes angryShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.app-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.app-icon.chrome { background: linear-gradient(135deg, #4285f4, #ea4335, #fbbc05, #34a853); }
.app-icon.spotify { background: #1db954; }
.app-icon.vscode { background: #007acc; }
.app-icon.slack { background: #4a154b; }
.app-icon.discord { background: #5865f2; }
.app-icon.firefox { background: linear-gradient(135deg, #ff6b6b, #ffa500); }

.app-name {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
}

.app-patience {
    width: 40px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.app-patience-fill {
    height: 100%;
    background: #27ae60;
    transition: width 0.3s ease, background 0.3s ease;
}

.restaurant-footer {
    padding: 10px 20px;
    background: #34495e;
    text-align: center;
}

.restaurant-hint {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* ===================================
   Enhanced UNIX Family Tree
   =================================== */

.family-tree-container {
    margin-top: 16px;
}

.diagram-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.tree-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.family-tree {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
}

.family-tree svg {
    display: block;
    margin: 0 auto;
}

.tree-info-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.info-panel-content h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.info-panel-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===================================
   Enhanced Attribution
   =================================== */

.attribution-box {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.attribution-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.attribution-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.attribution-header h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.attribution-content {
    margin-bottom: 16px;
}

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

.attribution-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-weight: 500;
    margin: 12px 0;
    transition: all 0.2s ease;
}

.attribution-link:hover {
    background: var(--primary);
    color: white;
}

.license-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.license-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #4caf50;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.license-badge i {
    font-size: 1rem;
}

.license-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-details strong {
    font-size: 1rem;
    color: var(--text-primary);
}

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

/* ===================================
   Fullscreen Game Mode (Mobile)
   =================================== */

.game-fullscreen-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
    overflow: hidden;
}

.game-fullscreen-wrapper.active {
    display: flex;
    flex-direction: column;
}

.game-fullscreen-wrapper .fullscreen-close-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.game-fullscreen-wrapper .fullscreen-close-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Fullscreen Space Travel */
.game-fullscreen-wrapper.space-travel-fullscreen {
    background: #000;
}

.game-fullscreen-wrapper.space-travel-fullscreen .pdp7-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    margin: 0;
    max-height: 100vh;
    overflow: hidden;
}

.game-fullscreen-wrapper.space-travel-fullscreen .pdp7-header {
    flex-shrink: 0;
}

.game-fullscreen-wrapper.space-travel-fullscreen .pdp7-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.game-fullscreen-wrapper.space-travel-fullscreen #game-canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 100%;
    object-fit: contain;
}

.game-fullscreen-wrapper.space-travel-fullscreen .mobile-game-controls {
    display: flex !important;
    flex-shrink: 0;
    padding: 12px;
    background: #111;
}

.game-fullscreen-wrapper.space-travel-fullscreen .pdp7-controls {
    flex-shrink: 0;
}

/* Fullscreen Restaurant Game */
.game-fullscreen-wrapper.restaurant-fullscreen {
    background: #1a252f;
}

.game-fullscreen-wrapper.restaurant-fullscreen .restaurant-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    margin: 0;
    max-height: 100vh;
    overflow: hidden;
}

.game-fullscreen-wrapper.restaurant-fullscreen .restaurant-header {
    flex-shrink: 0;
}

.game-fullscreen-wrapper.restaurant-fullscreen .restaurant-game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.game-fullscreen-wrapper.restaurant-fullscreen .kitchen-area,
.game-fullscreen-wrapper.restaurant-fullscreen .tables-area,
.game-fullscreen-wrapper.restaurant-fullscreen .waiting-area {
    flex-shrink: 0;
}

.game-fullscreen-wrapper.restaurant-fullscreen .restaurant-footer {
    flex-shrink: 0;
}

/* Mobile tap-to-fullscreen hint */
.mobile-fullscreen-hint {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 24px 32px;
    border-radius: 16px;
    text-align: center;
    z-index: 30;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.mobile-fullscreen-hint i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    color: #fff;
}

.mobile-fullscreen-hint span {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
}

/* Only show fullscreen hint on actual mobile devices (small screens) */
@media (max-width: 768px) {
    .mobile-fullscreen-hint {
        display: block;
    }
}

/* ===================================
   Responsive for games
   =================================== */

@media (max-width: 768px) {
    .restaurant-game-area {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .tree-legend {
        gap: 8px;
        flex-wrap: wrap;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    /* Space Travel game responsive */
    .pdp7-frame {
        margin: 0 -16px;
        border-radius: 0;
    }

    .pdp7-screen canvas {
        max-height: 300px;
    }

    .retro-instructions {
        font-size: 0.75rem;
    }

    .retro-instructions p {
        margin: 4px 0;
    }

    /* Restaurant game responsive */
    .restaurant-frame {
        margin: 0 -16px;
        border-radius: 0;
    }

    .kitchen-area,
    .tables-area,
    .waiting-area {
        padding: 8px;
    }

    .kitchen-label,
    .tables-label,
    .waiting-label {
        font-size: 0.7rem;
    }

    /* Terminal responsive */
    .inline-terminal-container {
        margin: 0 -16px;
    }

    .retro-terminal-frame {
        border-radius: 0;
    }

    /* General inline containers */
    .inline-game-container {
        margin-left: -16px;
        margin-right: -16px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .pdp7-header {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .pdp7-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .restaurant-header {
        flex-direction: column;
        gap: 8px;
    }

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

    .retro-goal,
    .retro-instructions {
        padding: 0 8px;
    }

    .retro-title {
        font-size: 1.2rem !important;
    }

    .retro-subtitle {
        font-size: 0.9rem !important;
    }
}

/* Global mobile overflow fix */
@media (max-width: 900px) {
    .content,
    .content-section,
    .inline-game-container,
    .pdp7-frame,
    .restaurant-frame,
    .inline-terminal-container,
    .family-tree-container,
    pre,
    code,
    table {
        max-width: 100%;
        overflow-x: auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }

    .pdp7-screen {
        overflow: hidden;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

/* ===================================
   Restaurant Game - Updated Styles
   =================================== */

/* Queue App Cards */
.queue-app {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #ddd;
    margin-bottom: 8px;
}

.queue-app:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.queue-app.warning {
    border-color: #f39c12;
    animation: pulse 1s ease infinite;
}

.queue-app.critical {
    border-color: #e74c3c;
    animation: shake 0.3s ease infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(243, 156, 18, 0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.queue-app-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.queue-app-info {
    flex: 1;
    min-width: 0;
}

.queue-app-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 4px;
}

.queue-app-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.queue-app-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* RAM Slots */
.ram-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    min-height: 44px;
    transition: all 0.2s ease;
}

.ram-slot.empty {
    justify-content: center;
    color: #bbb;
}

.ram-slot.occupied {
    border-style: solid;
    border-color: #3498db;
    background: #e8f4fc;
}

.ram-app-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.ram-app-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #2c3e50;
}

/* CPU Display */
.cpu-idle, .cpu-processing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.cpu-idle i {
    font-size: 2rem;
    color: #bdc3c7;
}

.cpu-processing {
    color: #2c3e50;
    font-weight: 500;
}

.cpu-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.cpu-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===================================
   Restaurant Game - Drag & Drop Styles
   =================================== */

/* Drag hint icon */
.drag-hint {
    color: #bbb;
    font-size: 1rem;
    cursor: grab;
    padding: 4px;
}

.queue-app {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.queue-app:active {
    cursor: grabbing;
}

/* Dragging app element */
.dragging-app {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
}

.drag-app-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* RAM slot drop targets */
.ram-slot {
    position: relative;
    transition: all 0.2s ease;
}

.ram-slot.empty {
    flex-direction: column;
    gap: 4px;
}

.ram-slot .drop-hint {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ram-slot.drag-over {
    background: #d4edda !important;
    border-color: #28a745 !important;
    border-style: solid !important;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.4);
}

.ram-slot.drag-over .drop-hint {
    color: #28a745;
    font-weight: 600;
}

.ram-slot.processing {
    background: #fff3cd !important;
    border-color: #ffc107 !important;
}

.processing-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ffc107;
    border-radius: 50%;
    animation: processingPulse 0.5s ease infinite alternate;
}

@keyframes processingPulse {
    from { opacity: 0.5; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

/* CPU styles */
.cpu-active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    border-radius: 8px;
}

.cpu-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cpu-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cpu-info span {
    font-size: 0.75rem;
    color: #856404;
    text-transform: uppercase;
}

.cpu-info strong {
    font-size: 1rem;
    color: #533f03;
}

.cpu-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    text-align: center;
}

.cpu-idle i {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: #ddd;
}

.cpu-idle span {
    font-weight: 600;
    color: #888;
}

.cpu-idle small {
    font-size: 0.75rem;
    color: #aaa;
}

/* Float up animation for messages */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(0.8);
    }
}

/* Final score display */
.final-score-display {
    font-size: 4rem;
    font-weight: bold;
    color: #f39c12;
    text-shadow: 0 2px 10px rgba(243, 156, 18, 0.3);
    margin: 16px 0;
}

.score-message {
    color: #ecf0f1;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* ===================================
   Restaurant Game - Survival Mode Styles
   =================================== */

.speed-label {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
}

.speed-value {
    font-size: 1rem;
    font-weight: bold;
    color: #27ae60;
    transition: color 0.3s ease;
}

/* Crash badge with hearts */
.crash-badge {
    font-size: 1rem !important;
    letter-spacing: 2px;
}

/* Shake animation for crashes */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.restaurant-game-area.shake {
    animation: shake 0.3s ease;
}

/* Final stats display */
.final-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px 24px;
    margin: 20px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
}

.stat-big {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.stat-big.score {
    color: #f39c12;
    font-size: 2rem;
}

.score-message {
    color: #bdc3c7;
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Updated label styles with icons */
.kitchen-label i,
.tables-label i,
.waiting-label i {
    margin-right: 6px;
    opacity: 0.7;
}

/* ===================================
   Restaurant Game - Mobile Fixes
   =================================== */

/* Mobile-specific restaurant game styles */
@media (max-width: 768px) {
    /* Fix the game area to properly contain stacked sections */
    .restaurant-game-area {
        min-height: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    /* Ensure overlay covers the entire game area on mobile */
    .restaurant-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 100%;
        padding: 20px 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Fix overlay content for smaller screens */
    .restaurant-overlay h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .restaurant-overlay p {
        font-size: 0.9rem;
        margin-bottom: 10px;
        max-width: 100%;
    }

    .restaurant-rules {
        margin: 12px 0;
        font-size: 0.85rem;
    }

    .restaurant-rules li {
        margin: 6px 0;
    }

    .restaurant-btn {
        padding: 10px 24px;
        font-size: 1rem;
    }

    /* Ensure game sections have proper sizing */
    .kitchen-area,
    .tables-area,
    .waiting-area {
        min-height: auto;
        flex-shrink: 0;
    }

    /* Fix waiting area queue for vertical layout */
    .customer-queue {
        min-height: 120px;
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Smaller queue app cards on mobile */
    .queue-app {
        padding: 8px 10px;
        gap: 8px;
    }

    .queue-app-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .queue-app-name {
        font-size: 0.8rem;
    }

    /* RAM slots 2x2 grid on mobile */
    .table-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .ram-slot {
        min-height: 50px;
        padding: 6px 8px;
    }

    .ram-app-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .ram-app-name {
        font-size: 0.7rem;
    }

    /* Speed indicator positioning */
    .speed-indicator {
        position: relative;
        bottom: auto;
        right: auto;
        display: inline-block;
        margin-top: 8px;
        align-self: center;
    }

    /* Fix final stats overlay on mobile */
    .final-stats {
        padding: 12px 16px;
        margin: 16px 0;
    }

    .stat-big {
        font-size: 1.2rem;
    }

    .stat-big.score {
        font-size: 1.5rem;
    }

    .score-message {
        font-size: 0.9rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .restaurant-game-area {
        padding: 8px;
        gap: 8px;
    }

    .restaurant-overlay {
        padding: 16px 12px;
    }

    .restaurant-overlay h3 {
        font-size: 1.1rem;
    }

    .restaurant-overlay p {
        font-size: 0.85rem;
    }

    .restaurant-rules {
        font-size: 0.8rem;
    }

    .restaurant-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    /* Smaller cards */
    .queue-app {
        padding: 6px 8px;
    }

    .queue-app-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .queue-app-name {
        font-size: 0.75rem;
    }

    .queue-app-bar {
        height: 4px;
    }

    /* CPU area compact */
    .cpu-idle i {
        font-size: 1.5rem;
    }

    .cpu-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* ===================================
   Restaurant Game - Tap-to-Select Mode
   =================================== */

/* Selected app in queue */
.queue-app.selected {
    border-color: #3498db !important;
    background: #e8f4fc;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
    transform: scale(1.02);
}

.queue-app.selected .drag-hint {
    color: #3498db;
}

.queue-app.selected .drag-hint i {
    animation: pulse-check 0.5s ease;
}

@keyframes pulse-check {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* RAM slot ready to receive */
.ram-slot.tap-ready {
    border-color: #3498db !important;
    border-style: solid !important;
    background: #e8f4fc;
    animation: pulse-slot 1s ease infinite;
    cursor: pointer;
}

.ram-slot.tap-ready .drop-hint {
    color: #3498db;
    font-weight: 600;
}

@keyframes pulse-slot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(52, 152, 219, 0); }
}

/* Mobile instruction hint */
@media (max-width: 768px) {
    .queue-app {
        cursor: pointer;
    }

    .ram-slot.empty {
        cursor: pointer;
    }

    /* Make tap targets larger on mobile */
    .ram-slot {
        min-height: 60px;
    }

    .queue-app {
        min-height: 50px;
    }
}
