/**
 * ╔═══════════════════════════════════════════════════════════════╗
 * ║  ZEDEC.AI RETRO-FUTURISTIC THEME                              ║
 * ║  1970s Hacker Vibe + 2020s AI Industry Sleek                  ║
 * ╚═══════════════════════════════════════════════════════════════╝
 */

/* ============================================
   RETRO-FUTURE COLOR PALETTE
   ============================================ */

:root {
    /* Terminal green - classic hacker */
    --retro-green: #00ff41;
    --retro-green-dim: #00aa2a;
    --retro-green-glow: rgba(0, 255, 65, 0.5);
    
    /* Amber terminal */
    --retro-amber: #ffb000;
    --retro-amber-dim: #cc8800;
    
    /* CRT phosphor colors */
    --crt-bg: #0a0a0a;
    --crt-scanline: rgba(0, 0, 0, 0.3);
    
    /* Modern AI accent */
    --ai-blue: #00d4ff;
    --ai-purple: #a855f7;
    --ai-gradient: linear-gradient(135deg, #00ff41 0%, #00d4ff 50%, #a855f7 100%);
    
    /* Retro fonts */
    --font-terminal: 'Share Tech Mono', 'Courier New', monospace;
    --font-display-retro: 'Orbitron', 'VT323', monospace;
}

/* ============================================
   CRT SCREEN EFFECT
   ============================================ */

.crt-effect {
    position: relative;
}

.crt-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--crt-scanline) 2px,
        var(--crt-scanline) 4px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: 0.15;
}

.crt-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 999;
}

/* ============================================
   TERMINAL STYLING
   ============================================ */

.terminal-box {
    background: var(--crt-bg);
    border: 2px solid var(--retro-green);
    border-radius: 4px;
    padding: 20px;
    font-family: var(--font-terminal);
    color: var(--retro-green);
    position: relative;
    box-shadow: 
        0 0 10px var(--retro-green-glow),
        inset 0 0 30px rgba(0, 255, 65, 0.05);
}

.terminal-box::before {
    content: '> ZEDEC TERMINAL v3.6.9';
    display: block;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--retro-green-dim);
    font-size: 0.8rem;
    opacity: 0.7;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.terminal-prompt::before {
    content: '>';
    color: var(--retro-green);
    font-weight: bold;
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--retro-green);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ============================================
   SEARCH BAR - RETRO TERMINAL STYLE
   ============================================ */

.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

.search-box {
    background: var(--crt-bg);
    border: 2px solid var(--retro-green);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 20px var(--retro-green-glow);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--retro-green-dim);
}

.search-title {
    font-family: var(--font-terminal);
    color: var(--retro-green);
    font-size: 0.85rem;
}

.search-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-terminal);
    font-size: 0.75rem;
    color: var(--retro-green-dim);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--retro-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--retro-green-dim);
    border-radius: 4px;
    padding: 5px 15px;
}

.search-input-wrapper::before {
    content: '>';
    color: var(--retro-green);
    font-family: var(--font-terminal);
    font-weight: bold;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--retro-green);
    font-family: var(--font-terminal);
    font-size: 1.1rem;
    padding: 12px 0;
}

.search-input::placeholder {
    color: var(--retro-green-dim);
}

.search-btn {
    background: var(--retro-green);
    color: var(--crt-bg);
    border: none;
    padding: 12px 24px;
    font-family: var(--font-display-retro);
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-btn:hover {
    box-shadow: 0 0 20px var(--retro-green-glow);
    transform: translateY(-2px);
}

.search-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-terminal);
    font-size: 0.8rem;
    color: var(--retro-green-dim);
    cursor: pointer;
}

.search-option input[type="checkbox"] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--retro-green-dim);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.search-option input[type="checkbox"]:checked {
    background: var(--retro-green);
}

.search-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: var(--crt-bg);
    font-size: 12px;
}

.depth-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-terminal);
    font-size: 0.8rem;
    color: var(--retro-green-dim);
}

.depth-selector select {
    background: var(--crt-bg);
    border: 1px solid var(--retro-green-dim);
    color: var(--retro-green);
    padding: 4px 8px;
    font-family: var(--font-terminal);
    border-radius: 2px;
}

/* ============================================
   CONTENT BOXES (NOT ADS)
   ============================================ */

.content-box {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.content-box::before {
    content: 'CONTENT';
    position: absolute;
    top: 5px;
    right: 10px;
    font-family: var(--font-terminal);
    font-size: 0.6rem;
    color: var(--retro-green-dim);
    letter-spacing: 2px;
}

.content-box-title {
    font-family: var(--font-display-retro);
    color: var(--retro-green);
    margin-bottom: 10px;
    font-size: 1rem;
}

.content-box-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   DONATION POPUP - RETRO STYLE
   ============================================ */

.donation-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--crt-bg);
    border: 3px solid var(--retro-green);
    border-radius: 12px;
    padding: 30px;
    z-index: 10000;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 30px var(--retro-green-glow),
        0 0 60px rgba(0, 255, 65, 0.2);
}

.donation-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.donation-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.donation-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.donation-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.donation-popup-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.donation-popup-title {
    font-family: var(--font-display-retro);
    color: var(--retro-green);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.donation-popup-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.donation-popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.donation-popup-btn {
    padding: 12px 20px;
    font-family: var(--font-display-retro);
    font-size: 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.donation-popup-btn.cashapp {
    background: #00d632;
    color: white;
}

.donation-popup-btn.wise {
    background: #9fe870;
    color: #163300;
}

.donation-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.donation-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--retro-green-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.donation-popup-close:hover {
    color: var(--retro-green);
}

.donation-popup-later {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

/* ============================================
   ALGORITHM STATUS DISPLAY - RETRO
   ============================================ */

.algo-display {
    background: var(--crt-bg);
    border: 1px solid var(--retro-green-dim);
    border-radius: 4px;
    padding: 15px;
    font-family: var(--font-terminal);
    font-size: 0.8rem;
}

.algo-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.algo-row:last-child {
    border-bottom: none;
}

.algo-label {
    color: var(--retro-green-dim);
}

.algo-value {
    color: var(--retro-green);
}

.algo-value.active {
    animation: glow-pulse 1s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 5px var(--retro-green-glow); }
    50% { text-shadow: 0 0 15px var(--retro-green-glow); }
}

/* ============================================
   SWARM VISUALIZATION
   ============================================ */

.swarm-display {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 3px;
    padding: 15px;
    background: var(--crt-bg);
    border: 1px solid var(--retro-green-dim);
    border-radius: 4px;
}

.swarm-node {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--retro-green-dim);
    border-radius: 2px;
    transition: all 0.3s;
}

.swarm-node.active {
    background: var(--retro-green);
    box-shadow: 0 0 10px var(--retro-green-glow);
}

.swarm-node.processing {
    animation: node-pulse 0.5s ease-in-out infinite;
}

@keyframes node-pulse {
    0%, 100% { background: var(--retro-green); }
    50% { background: var(--ai-blue); }
}

/* ============================================
   DEEP WEB LEVEL INDICATOR
   ============================================ */

.depth-indicator {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px;
    background: var(--crt-bg);
    border: 1px solid var(--retro-green-dim);
    border-radius: 4px;
}

.depth-level {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border-radius: 2px;
    font-family: var(--font-terminal);
    font-size: 0.75rem;
}

.depth-level.accessible {
    background: rgba(0, 255, 65, 0.1);
    color: var(--retro-green);
}

.depth-level.locked {
    background: rgba(255, 0, 0, 0.05);
    color: var(--text-muted);
}

.depth-number {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--retro-green-dim);
    border-radius: 2px;
    font-weight: bold;
}

.depth-level.accessible .depth-number {
    background: var(--retro-green);
    color: var(--crt-bg);
}

/* ============================================
   WEB3 BADGE
   ============================================ */

.web3-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(0, 212, 255, 0.2) 100%);
    border: 1px solid var(--ai-purple);
    border-radius: 20px;
    font-family: var(--font-terminal);
    font-size: 0.75rem;
    color: var(--ai-purple);
}

.web3-badge::before {
    content: '◆';
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE - ALL DEVICES
   ============================================ */

/* Smart TV (large screens) */
@media (min-width: 1920px) {
    .search-input {
        font-size: 1.4rem;
        padding: 18px 0;
    }
    
    .terminal-box {
        padding: 30px;
        font-size: 1.2rem;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .search-container {
        padding: 20px;
    }
    
    .search-options {
        justify-content: center;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    .search-box {
        padding: 15px;
    }
    
    .search-input {
        font-size: 1rem;
    }
    
    .search-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .search-input-wrapper {
        flex-wrap: wrap;
    }
    
    .swarm-display {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .donation-popup {
        padding: 20px;
    }
    
    .donation-popup-buttons {
        flex-direction: column;
    }
    
    .donation-popup-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .terminal-box {
        padding: 15px;
        font-size: 0.85rem;
    }
    
    .swarm-display {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .depth-indicator {
        font-size: 0.7rem;
    }
}

/* Print - hide interactive elements */
@media print {
    .donation-popup,
    .donation-popup-overlay,
    .search-box,
    .swarm-display {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .terminal-box {
        border-width: 3px;
    }
    
    .search-input {
        font-weight: bold;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .terminal-cursor,
    .status-dot,
    .swarm-node,
    .web3-badge::before {
        animation: none;
    }
}
