/* 80s/90s Demo Scene Aesthetics - Additional Components */

/* ============================================
   BBS (Bulletin Board System) Vibes
   ============================================ */

.bbs-header {
    font-family: 'Monaco', 'Courier New', monospace;
    background: #000080;
    color: #ffff00;
    padding: 1rem;
    text-align: center;
    border: 2px solid #00ffff;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.bbs-header::before {
    content: '████████████████████████████████████████';
    display: block;
    color: #ff00ff;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.bbs-header::after {
    content: '████████████████████████████████████████';
    display: block;
    color: #ff00ff;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.bbs-menu {
    background: #000040;
    color: #00ffff;
    font-family: 'Monaco', 'Courier New', monospace;
    padding: 1rem;
    border: 1px solid #00ffff;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bbs-menu .menu-item {
    display: block;
    color: #ffff00;
    text-decoration: none;
    padding: 0.2rem 0;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.bbs-menu .menu-item:hover {
    color: #ff00ff;
    border-left-color: #ff00ff;
    background: rgba(255, 255, 255, 0.1);
}

.bbs-status {
    background: #000;
    color: #00ff00;
    font-family: 'Monaco', 'Courier New', monospace;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.bbs-status .online-users::before {
    content: '👥 ';
    color: #ffaa00;
}

.bbs-status .last-login::before {
    content: '🕐 ';
    color: #ffaa00;
}

/* ============================================
   Cassette Tape Labels
   ============================================ */

.cassette-label {
    background: linear-gradient(145deg, #f5f5f5, #e8e8e8);
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    font-family: 'Kalam', cursive;
    max-width: 350px;
    margin: 1rem;
    transform: rotate(var(--cassette-rotation, 1deg));
    box-shadow: 
        inset 0 1px 0 #fff,
        0 3px 6px rgba(0, 0, 0, 0.3);
}

.cassette-label::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, 
        #333 0%, #333 20%, 
        transparent 20%, transparent 25%,
        #333 25%, #333 45%,
        transparent 45%, transparent 50%,
        #333 50%, #333 70%,
        transparent 70%, transparent 75%,
        #333 75%, #333 95%,
        transparent 95%, transparent 100%);
    border-radius: 1px;
}

.cassette-side {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.cassette-side-label {
    font-weight: bold;
    color: #1a1a1a;
    font-size: 1.1rem;
}

.cassette-tracks {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.3;
}

.cassette-tracks .track {
    display: block;
    margin: 0.2rem 0;
}

.cassette-tracks .crossed-out {
    text-decoration: line-through;
    color: #999;
}

/* Cassette reel holes */
.cassette-label::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 30px;
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
    box-shadow: 
        40px 0 0 #333,
        80px 0 0 #333,
        120px 0 0 #333;
}

/* ============================================
   CD-ROM/Shareware Aesthetics
   ============================================ */

.cd-rom-case {
    background: linear-gradient(135deg, #f0f0f0 0%, #d0d0d0 100%);
    border: 2px solid #999;
    border-radius: 4px;
    padding: 1.5rem;
    position: relative;
    font-family: 'Arial', sans-serif;
    max-width: 300px;
    margin: 1rem;
    box-shadow: 
        inset 0 1px 0 #fff,
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.cd-rom-case::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: 
        radial-gradient(circle at center, 
            transparent 8px,
            #333 9px,
            #333 11px,
            transparent 12px
        ),
        conic-gradient(
            from 0deg,
            #ff00ff, #ff0000, #ffff00, #00ff00, 
            #00ffff, #0000ff, #ff00ff
        );
    border-radius: 50%;
    background-size: 40px 40px, 40px 40px;
    animation: cd-spin 3s linear infinite paused;
}

.cd-rom-case:hover::before {
    animation-play-state: running;
}

@keyframes cd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.shareware-notice {
    background: #ffff99;
    border: 2px dashed #ff0000;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Arial', sans-serif;
    font-size: 0.9rem;
    color: #990000;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    animation: shareware-blink 2s ease-in-out infinite;
}

@keyframes shareware-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.floppy-count {
    font-family: 'Monaco', 'Courier New', monospace;
    background: #000;
    color: #00ff00;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    display: inline-block;
    margin: 0.5rem;
    font-size: 0.8rem;
}

.floppy-count::before {
    content: '💾 ';
    margin-right: 0.5rem;
}

/* ============================================
   Early Internet/GeoCities Energy
   ============================================ */

.geocities-container {
    background: #ffffff;
    border: 3px outset #c0c0c0;
    padding: 2rem;
    font-family: 'Times New Roman', serif;
    position: relative;
    color: #000080;
}

.geocities-header {
    text-align: center;
    margin-bottom: 2rem;
}

.geocities-title {
    font-size: 2rem;
    color: #ff0000;
    text-shadow: 2px 2px 0 #ffff00;
    font-weight: bold;
    animation: geocities-rainbow 3s linear infinite;
}

@keyframes geocities-rainbow {
    0% { color: #ff0000; }
    16% { color: #ff8000; }
    32% { color: #ffff00; }
    48% { color: #00ff00; }
    64% { color: #00ffff; }
    80% { color: #0000ff; }
    100% { color: #ff0000; }
}

.under-construction {
    background: linear-gradient(45deg, #ffff00 25%, #ff0000 25%, #ff0000 50%, #ffff00 50%, #ffff00 75%, #ff0000 75%);
    background-size: 20px 20px;
    color: #000;
    padding: 0.5rem 1rem;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    animation: construction-slide 2s linear infinite;
    border: 2px solid #000;
    margin: 1rem 0;
}

@keyframes construction-slide {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.hit-counter {
    background: #000;
    color: #00ff00;
    font-family: 'Monaco', 'Courier New', monospace;
    padding: 0.5rem 1rem;
    border: 2px inset #c0c0c0;
    display: inline-block;
    margin: 1rem 0;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.best-viewed-in {
    background: #ffffcc;
    border: 1px solid #cccccc;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin: 1rem 0;
}

.webring-nav {
    background: #f0f0f0;
    border: 2px inset #c0c0c0;
    padding: 1rem;
    text-align: center;
    margin: 2rem 0;
}

.webring-nav .webring-link {
    display: inline-block;
    margin: 0 0.5rem;
    padding: 0.3rem 0.8rem;
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    text-decoration: none;
    color: #000080;
    font-size: 0.8rem;
}

.webring-nav .webring-link:hover {
    border: 1px inset #c0c0c0;
    background: #a0a0a0;
}

/* ============================================
   Electronics Lab Bench
   ============================================ */

.lab-bench {
    background: 
        linear-gradient(90deg, #2c2c2c 0%, #3c3c3c 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.05) 10px,
            rgba(255, 255, 255, 0.05) 11px
        );
    padding: 2rem;
    border: 3px solid #555;
    border-radius: 8px;
    position: relative;
    color: #ffffff;
    font-family: 'Monaco', 'Courier New', monospace;
}

.component-label {
    background: #ffff99;
    color: #000;
    padding: 0.3rem 0.6rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 2px;
    display: inline-block;
    margin: 0.2rem;
    position: relative;
    transform: rotate(var(--label-rotation, 1deg));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.component-label::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 6px solid #ffff99;
}

.breadboard-pattern {
    background: 
        repeating-linear-gradient(
            0deg,
            #2d5a2d 0px,
            #2d5a2d 8px,
            #1a3d1a 8px,
            #1a3d1a 10px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 15px,
            rgba(255, 255, 255, 0.1) 15px,
            rgba(255, 255, 255, 0.1) 16px
        );
    padding: 1rem;
    border: 2px solid #444;
    border-radius: 4px;
    position: relative;
}

.oscilloscope-trace {
    background: #001100;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    height: 200px;
    overflow: hidden;
}

.oscilloscope-trace::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #00ff00;
    transform: translateY(-1px);
    box-shadow: 0 0 10px #00ff00;
}

.oscilloscope-trace::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #00ff00;
    transform: translateX(-1px);
    box-shadow: 0 0 10px #00ff00;
    opacity: 0.5;
}

.waveform {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #00ff00;
    transform: translateY(-1px);
    clip-path: polygon(
        0% 50%,
        10% 20%, 20% 50%, 30% 80%,
        40% 50%, 50% 10%, 60% 50%,
        70% 90%, 80% 50%, 90% 30%,
        100% 50%
    );
    box-shadow: 0 0 20px #00ff00;
    animation: waveform-sweep 2s ease-in-out infinite;
}

@keyframes waveform-sweep {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================
   Programming Manual Pages
   ============================================ */

.manual-page {
    background: #fefef8;
    border: 1px solid #ddd;
    padding: 2rem;
    font-family: 'Times New Roman', serif;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 1rem;
}

.manual-page::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ff6666;
}

.manual-page::after {
    content: '';
    position: absolute;
    left: 0;
    top: 30px;
    right: 0;
    height: 20px;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 19px,
            #e0e0e0 19px,
            #e0e0e0 21px
        );
}

.manual-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.manual-content {
    line-height: 1.6;
    color: #1a1a1a;
    margin-left: 60px;
}

.coffee-stain {
    position: absolute;
    width: 60px;
    height: 60px;
    background: 
        radial-gradient(
            circle at 30% 40%,
            rgba(139, 69, 19, 0.3) 0%,
            rgba(139, 69, 19, 0.2) 40%,
            rgba(139, 69, 19, 0.1) 70%,
            transparent 100%
        );
    border-radius: 50%;
    transform: rotate(15deg);
}

.coffee-stain.top-right {
    top: 20px;
    right: 30px;
}

.coffee-stain.bottom-left {
    bottom: 40px;
    left: 100px;
    transform: rotate(-25deg);
}

.margin-notes {
    position: absolute;
    right: 10px;
    top: 150px;
    width: 120px;
    font-family: 'Kalam', cursive;
    font-size: 0.8rem;
    color: #0066cc;
    line-height: 1.3;
    transform: rotate(2deg);
}

.highlighted-code {
    background: linear-gradient(
        104deg,
        rgba(255, 255, 0, 0.3) 0.9%,
        rgba(255, 255, 0, 0.7) 2.4%,
        rgba(255, 255, 0, 0.5) 5.8%,
        rgba(255, 255, 0, 0.1) 93%,
        rgba(255, 255, 0, 0.7) 96%,
        rgba(255, 255, 0, 0.3) 98%
    );
    padding: 0.1em 0.2em;
    font-family: 'Monaco', 'Courier New', monospace;
    border-radius: 2px;
}

/* ============================================
   Pager/Beeper Messages
   ============================================ */

.pager-display {
    background: #2a5f2a;
    border: 3px solid #1a4a1a;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1.2rem;
    color: #00ff00;
    display: inline-block;
    margin: 1rem;
    position: relative;
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pager-display::before {
    content: '';
    position: absolute;
    top: 5px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff00;
    animation: pager-blink 1.5s ease-in-out infinite;
}

@keyframes pager-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.pager-urgent {
    animation: pager-urgent 0.5s ease-in-out infinite;
}

@keyframes pager-urgent {
    0%, 100% { background: #2a5f2a; }
    50% { background: #5f2a2a; color: #ff0000; }
}

/* ============================================
   Enhanced Dot Matrix Printer
   ============================================ */

.dot-matrix-enhanced {
    font-family: 'Monaco', 'Courier New', monospace;
    background: #f8f8f0;
    color: #1a1a1a;
    padding: 2rem;
    border: 1px solid #ddd;
    position: relative;
    line-height: 1.1;
    letter-spacing: 1px;
    
    /* Enhanced perforated edges */
    border-left: 20px solid #f0f0f0;
    border-right: 20px solid #f0f0f0;
    margin: 2rem 0;
}

.dot-matrix-enhanced::before,
.dot-matrix-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 6px,
            #999 6px,
            #999 8px,
            transparent 8px,
            transparent 14px
        );
}

.dot-matrix-enhanced::before {
    left: -20px;
}

.dot-matrix-enhanced::after {
    right: -20px;
}

.dot-matrix-header {
    text-align: center;
    border-bottom: 1px solid #666;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.print-status {
    position: absolute;
    top: -30px;
    left: 0;
    background: #ffff99;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    animation: print-progress 3s ease-in-out infinite;
}

@keyframes print-progress {
    0% { content: 'PRINTING...'; }
    50% { content: 'PRINTING.'; }
    100% { content: 'PRINTING...'; }
}

/* ============================================
   Responsive Design for Demo Scene Elements
   ============================================ */

@media (max-width: 768px) {
    .cassette-label,
    .cd-rom-case,
    .manual-page {
        transform: none !important;
        margin: 0.5rem 0;
        max-width: 100%;
    }
    
    .lab-bench {
        padding: 1rem;
    }
    
    .oscilloscope-trace {
        height: 150px;
    }
    
    .geocities-title {
        font-size: 1.5rem;
    }
    
    .manual-content {
        margin-left: 30px;
    }
    
    .margin-notes {
        position: static;
        transform: none;
        width: auto;
        margin-top: 1rem;
        padding: 0.5rem;
        background: rgba(0, 102, 204, 0.1);
        border-radius: 4px;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .cd-rom-case::before,
    .waveform,
    .pager-display::before,
    .shareware-notice,
    .geocities-title,
    .under-construction,
    .pager-urgent,
    .print-status {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bbs-header,
    .pager-display,
    .terminal-content {
        border-width: 3px;
    }
    
    .component-label {
        border-width: 2px;
    }
}

/* ============================================
   Dot Matrix Paper Effects
   ============================================ */

.dot-matrix-paper {
    background: #fefefe;
    position: relative;
    
    /* Horizontal lines - like ruled paper */
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 19px,
            #e0e0e0 19px,
            #e0e0e0 21px
        ),
        /* Vertical dot grid */
        radial-gradient(
            circle at center,
            #ccc 0.5px,
            transparent 0.6px
        );
    
    background-size: 
        100% 21px,  /* Horizontal lines */
        8px 8px;    /* Dot grid */
    
    /* Perforated edges */
    border-left: 15px solid #f5f5f5;
    border-right: 15px solid #f5f5f5;
    
    /* Hole punch pattern on edges */
    box-shadow: 
        inset 15px 0 0 #fefefe,
        inset -15px 0 0 #fefefe;
}

.dot-matrix-paper::before,
.dot-matrix-paper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15px;
    
    /* Tractor feed holes */
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 8px,
            #999 8px,
            #999 10px,
            transparent 10px,
            transparent 18px
        );
}

.dot-matrix-paper::before {
    left: -15px;
}

.dot-matrix-paper::after {
    right: -15px;
}

/* Dot matrix paper with green bar pattern */
.dot-matrix-greenbar {
    background: 
        /* Green bar stripes */
        repeating-linear-gradient(
            0deg,
            #ffffff 0px,
            #ffffff 21px,
            #f0f8f0 21px,
            #f0f8f0 42px
        ),
        /* Horizontal lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 19px,
            #d0d0d0 19px,
            #d0d0d0 21px
        ),
        /* Dot grid */
        radial-gradient(
            circle at center,
            #bbb 0.5px,
            transparent 0.6px
        );
    
    background-size: 
        100% 42px,  /* Green bars */
        100% 21px,  /* Horizontal lines */
        8px 8px;    /* Dot grid */
    
    border-left: 15px solid #eef5ee;
    border-right: 15px solid #eef5ee;
}

/* Terminal output styled as dot matrix printout */
.terminal-printout {
    font-family: 'Monaco', 'Courier New', monospace;
    background: #fefefe;
    color: #1a1a1a;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    
    /* Enhanced dot matrix pattern */
    background-image: 
        /* Horizontal lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 11px,
            #e8e8e8 11px,
            #e8e8e8 12px
        ),
        /* Vertical guides */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 7px,
            rgba(200, 200, 200, 0.3) 7px,
            rgba(200, 200, 200, 0.3) 8px
        );
    
    background-size: 
        100% 12px,
        8px 100%;
    
    /* Perforated edges with more detail */
    border-left: 20px solid #f0f0f0;
    border-right: 20px solid #f0f0f0;
    
    /* Slight paper curl effect */
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.terminal-printout::before,
.terminal-printout::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    
    /* More detailed tractor feed holes */
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 6px,
            #888 6px,
            #888 8px,
            transparent 8px,
            transparent 14px
        );
}

.terminal-printout::before {
    left: -20px;
}

.terminal-printout::after {
    right: -20px;
}

/* Printout header */
.printout-header {
    text-align: center;
    border-bottom: 2px solid #666;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

/* Status printout lines */
.printout-line {
    margin: 0.3rem 0;
    line-height: 1.2;
    font-size: 0.9rem;
}

.printout-line.error {
    color: #cc0000;
}

.printout-line.warning {
    color: #ff6600;
}

.printout-line.success {
    color: #006600;
}

/* Form feed separator */
.form-feed {
    height: 30px;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            #ddd 3px,
            #ddd 4px
        );
    margin: 2rem 0;
    position: relative;
}

.form-feed::after {
    content: 'FORM FEED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fefefe;
    padding: 0 1rem;
    font-size: 0.7rem;
    color: #999;
    letter-spacing: 2px;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Folded paper effect */
.folded-paper {
    position: relative;
    background: #fefefe;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.folded-paper::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: 
        linear-gradient(
            135deg,
            transparent 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.2) 51%,
            #f8f8f8 52%
        );
    transform: rotate(45deg);
    box-shadow: -2px -2px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for dot matrix effects */
@media (max-width: 768px) {
    .dot-matrix-paper,
    .dot-matrix-greenbar,
    .terminal-printout {
        border-left-width: 10px;
        border-right-width: 10px;
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .dot-matrix-paper::before,
    .dot-matrix-paper::after,
    .terminal-printout::before,
    .terminal-printout::after {
        width: 10px;
    }
    
    .dot-matrix-paper::before,
    .terminal-printout::before {
        left: -10px;
    }
    
    .dot-matrix-paper::after,
    .terminal-printout::after {
        right: -10px;
    }
}