/* Hacker Style CSS - Matrix Theme */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Share+Tech+Mono&display=swap');

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

:root {
    --bg-primary: #000000;
    --bg-secondary: #001100;
    --text-primary: #00ff00;
    --text-secondary: #00cc00;
    --text-warning: #ffff00;
    --text-danger: #ff0000;
    --text-muted: #006600;
    --border-color: #00ff00;
    --shadow-glow: 0 0 20px #00ff00;
    --terminal-bg: rgba(0, 17, 0, 0.9);
}

body {
    font-family: 'Share Tech Mono', 'Courier Prime', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Matrix Background Effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: -2;
}

.matrix-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        );
    animation: matrix-scan 2s linear infinite;
}

@keyframes matrix-scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Terminal Header */
.header {
    margin-bottom: 20px;
}

.terminal-header {
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-glow);
}

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

.terminal-dot.red { background: #ff0000; }
.terminal-dot.yellow { background: #ffff00; }
.terminal-dot.green { background: #00ff00; }

.terminal-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    margin-left: 10px;
    text-shadow: 0 0 10px var(--text-primary);
}

/* Terminal */
.terminal {
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    min-height: 70vh;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(0, 255, 0, 0.1) 100%),
        linear-gradient(0deg, transparent 98%, rgba(0, 255, 0, 0.1) 100%);
    pointer-events: none;
    animation: terminal-flicker 0.15s infinite linear alternate;
}

@keyframes terminal-flicker {
    0% { opacity: 1; }
    100% { opacity: 0.98; }
}

.terminal-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* ASCII Art */
.ascii-art {
    text-align: center;
    margin-bottom: 30px;
}

.ascii-art pre {
    color: var(--text-primary);
    font-size: 0.6rem;
    line-height: 1;
    text-shadow: 0 0 10px var(--text-primary);
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    0% { text-shadow: 0 0 10px var(--text-primary); }
    100% { text-shadow: 0 0 20px var(--text-primary), 0 0 30px var(--text-primary); }
}

/* System Info */
.system-info {
    margin-bottom: 30px;
    border: 1px solid var(--text-muted);
    padding: 15px;
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.05);
}

.system-line {
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.status-ready {
    color: var(--text-primary);
    font-weight: 700;
    animation: blink 1s infinite;
}

.target-device {
    color: var(--text-warning);
    font-weight: 700;
}

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

/* Start Button */
.start-section {
    text-align: center;
    margin: 40px 0;
}

.start-btn {
    background: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    padding: 15px 40px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.start-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.start-btn:active {
    transform: scale(0.98);
}

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

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

/* Hacking Process */
.hacking-process {
    margin-top: 30px;
}

.process-header {
    margin-bottom: 20px;
    color: var(--text-warning);
    font-size: 1.1rem;
    font-weight: 700;
}

.data-extraction {
    margin-bottom: 30px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--text-muted);
    margin-bottom: 10px;
    opacity: 0.5;
    transition: all 0.5s ease;
}

.data-item.active {
    opacity: 1;
    background: rgba(0, 255, 0, 0.1);
    padding: 12px 15px;
    border-radius: 4px;
    border-bottom: 1px solid var(--text-primary);
    animation: data-glow 1s ease-in-out;
}

@keyframes data-glow {
    0% { box-shadow: none; }
    50% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.5); }
    100% { box-shadow: none; }
}

.data-item.completed {
    opacity: 1;
    color: var(--text-primary);
}

.data-label {
    color: var(--text-secondary);
    font-weight: 700;
    min-width: 150px;
}

.data-value {
    color: var(--text-primary);
    font-weight: 400;
    flex: 1;
    text-align: center;
}

.data-value.hacking {
    animation: typing 2s steps(20) infinite;
}

@keyframes typing {
    0% { content: 'Hacking'; }
    25% { content: 'Hacking.'; }
    50% { content: 'Hacking..'; }
    75% { content: 'Hacking...'; }
    100% { content: 'Hacking'; }
}

.data-status {
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

/* Progress Bar */
.progress-bar {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    height: 30px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

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

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 0 5px var(--text-primary);
}

/* Completion Message */
.completion-message {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    border: 2px solid var(--text-primary);
    border-radius: 8px;
    background: rgba(0, 255, 0, 0.1);
    animation: completion-glow 2s ease-in-out infinite alternate;
}

@keyframes completion-glow {
    0% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.3); }
    100% { box-shadow: 0 0 40px rgba(0, 255, 0, 0.6); }
}

.success-text {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--text-primary);
}

.warning-text {
    color: var(--text-warning);
    font-size: 1rem;
}

/* Back Button */
.back-section {
    margin-top: 30px;
    text-align: center;
}

.back-btn {
    background: transparent;
    border: 2px solid var(--text-danger);
    color: var(--text-danger);
    padding: 12px 30px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    width: fit-content;
}

.back-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    box-shadow: 0 0 20px var(--text-danger);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .ascii-art pre {
        font-size: 0.4rem;
    }
    
    .terminal-content {
        padding: 15px;
    }
    
    .data-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .data-label {
        min-width: auto;
    }
    
    .data-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .ascii-art pre {
        font-size: 0.3rem;
    }
    
    .start-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}
