/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Code Pro', 'Inconsolata', 'Courier New', monospace;
    background: #000000;
    color: #00ff00;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
    scroll-behavior: auto;
}

/* Matrix Background Canvas */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(180deg, rgba(0, 255, 0, 0.05) 0%, transparent 100%);
    border-radius: 10px;
    margin-bottom: 40px;
}

.ascii-banner {
    margin-bottom: 30px;
}

.ascii-text {
    color: #00ff00;
    font-size: clamp(0.8rem, 2.5vw, 1.4rem);
    text-shadow: 0 0 10px #00ff00;
    white-space: pre;
    overflow: hidden;
}

.main-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #00ff00;
    letter-spacing: 2px;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #00ff00;
    margin-bottom: 30px;
    font-weight: 300;
}

.terminal-prompt {
    font-size: 1.2rem;
    color: #00ff00;
    margin-top: 20px;
}

.terminal-prompt.recruitment-text {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #00ff00;
    margin-top: 30px;
    margin-bottom: 20px;
    text-shadow: 0 0 15px #00ff00;
    letter-spacing: 1px;
}

.prompt-text {
    color: #ffff00;
}

/* Cursor Animation */
.cursor {
    animation: blink 1s infinite;
    color: #00ff00;
    font-weight: bold;
}

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

/* Typewriter Animation */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #00ff00;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end);
}

/* Terminal Window */
.terminal-window {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.terminal-header {
    background: linear-gradient(90deg, #003300, #001100);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #00ff00;
}

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

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

.btn-close { background: #ff5555; }
.btn-minimize { background: #ffff55; }
.btn-maximize { background: #55ff55; }

.terminal-title {
    color: #00ff00;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Departments Menu */
.departments-menu {
    padding: 30px;
}

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

.ascii-selector {
    color: #00cccc;
    font-size: 0.9rem;
    text-shadow: 0 0 10px #00cccc;
}

.department-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

/* Terminal Interface */
.terminal-interface {
    padding: 20px;
    background: #000000;
    border: 1px solid #333333;
    border-radius: 5px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
    min-height: 400px;
    height: auto;
}

.terminal-output {
    min-height: 300px;
    margin-bottom: 20px;
    padding: 15px;
    background: #000000;
    border-radius: 3px;
    overflow-y: auto;
    max-height: none;
    height: auto;
    line-height: 1.4;
    scrollbar-width: thin;
    scrollbar-color: #00ff00 #000000;
}

.terminal-output::-webkit-scrollbar {
    width: 6px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #000000;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 3px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background: #00cccc;
}

.output-line {
    color: #dcdcdc;
    margin-bottom: 2px;
    font-size: 0.9rem;
    line-height: 1.2;
}

.help-line {
    color: #aaaaaa;
    font-weight: normal;
    margin-top: 10px;
}

.terminal-input-line {
    display: flex;
    align-items: baseline;
    background: #000000;
    padding: 10px 15px;
    border-radius: 3px;
    border: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
}

.terminal-prompt {
    color: #00ff99;
    font-weight: normal;
    margin-right: 0;
    white-space: nowrap;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #dcdcdc;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    caret-color: #dcdcdc;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.terminal-input::placeholder {
    color: #555555;
    opacity: 0.7;
}

.terminal-cursor {
    color: #dcdcdc;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.help-commands {
    display: none;
}

.command-help {
    display: none;
}

.command-list {
    display: none;
}

.command {
    color: #f5e642;
    font-weight: normal;
}

.error-line {
    color: #dcdcdc !important;
}

.success-line {
    color: #dcdcdc !important;
}

.warning-line {
    color: #dcdcdc !important;
}

.system-line {
    color: #aaaaaa !important;
}

.command-line {
    color: #f5e642 !important;
}

.checkmark-line {
    color: #dcdcdc !important;
}

/* Terminal-style candidate output */
.candidate-terminal-line {
    color: #dcdcdc !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
    margin-bottom: 2px;
    opacity: 0;
    animation: fadeInTerminal 0.3s ease-out forwards;
}

@keyframes fadeInTerminal {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile responsive for terminal output */
@media (max-width: 768px) {
    .candidate-terminal-line {
        font-size: 0.85rem;
        line-height: 1.5;
        white-space: normal;
        word-wrap: break-word;
    }
}

/* Responsive Grid - Large Screens */
@media (min-width: 1200px) {
    .candidates-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* Remove the ASCII selector box */
.ascii-selector {
    display: none;
}

.menu-header {
    display: none;
}

/* Terminal typing effect */
.typing-line {
    overflow: hidden;
    border-right: 2px solid #dcdcdc;
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink-cursor 1s infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-cursor {
    50% { border-color: transparent; }
}

/* Department Buttons */
.department-btn {
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: inherit;
    font-size: 1.1rem;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.department-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: translateX(10px);
    animation: glitch 0.3s ease-in-out;
}

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

.btn-prefix {
    color: #00cccc;
    font-weight: bold;
    margin-right: 15px;
}

.btn-text {
    flex: 1;
    font-weight: 500;
}

.btn-suffix {
    color: #ffff00;
    font-weight: bold;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.department-btn:hover .btn-suffix {
    transform: translateX(5px);
}

/* Glitch Effect */
@keyframes glitch {
    0% { transform: translateX(0); }
    20% { transform: translateX(-2px) skew(-1deg); }
    40% { transform: translateX(2px) skew(1deg); }
    60% { transform: translateX(-1px) skew(-0.5deg); }
    80% { transform: translateX(1px) skew(0.5deg); }
    100% { transform: translateX(0); }
}

/* Results Panel */
.results-panel {
    display: none;
    padding: 30px;
    animation: fadeIn 0.5s ease-in-out;
}

.results-panel.active {
    display: block;
}

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

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

.loading-text {
    font-size: 1.2rem;
    color: #ffff00;
    margin-bottom: 20px;
    min-height: 30px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.dept-name {
    font-size: 2.5rem;
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.bracket {
    color: #00cccc;
    animation: bracketGlow 2s infinite alternate;
}

@keyframes bracketGlow {
    0% { text-shadow: 0 0 5px #00cccc; }
    100% { text-shadow: 0 0 20px #00cccc, 0 0 30px #00cccc; }
}

.access-granted {
    text-align: center;
    margin-bottom: 30px;
}

.status-text {
    color: #00ff00;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 15px #00ff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Candidates List */
.candidates-list {
    list-style: none;
    max-width: 600px;
    margin: 0 auto 30px;
}

.candidate-item {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideIn 0.6s ease-out forwards;
    font-size: 1.1rem;
}

.candidate-item:nth-child(1) { animation-delay: 0.1s; }
.candidate-item:nth-child(2) { animation-delay: 0.2s; }
.candidate-item:nth-child(3) { animation-delay: 0.3s; }
.candidate-item:nth-child(4) { animation-delay: 0.4s; }
.candidate-item:nth-child(5) { animation-delay: 0.5s; }
.candidate-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.candidate-icon {
    color: #00ff00;
    margin-right: 15px;
    font-size: 1.2rem;
}

.candidate-name {
    flex: 1;
    font-weight: 500;
}

/* Back Button */
.back-btn-container {
    text-align: center;
    margin-top: 40px;
}

.back-btn {
    background: transparent;
    border: 2px solid #ff6600;
    color: #ff6600;
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.back-btn:hover {
    background: rgba(255, 102, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
    transform: translateY(-2px);
}

/* Footer */
.terminal-footer {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff00;
    border-radius: 5px;
    padding: 20px;
    margin-top: 40px;
}

.status-log {
    font-family: 'Source Code Pro', 'Inconsolata', 'Courier New', monospace;
    font-size: 0.9rem;
}

.log-line {
    margin-bottom: 8px;
    display: flex;
    gap: 15px;
}

.timestamp {
    color: #666666;
    white-space: nowrap;
}

.status {
    color: #00ff00;
}

.terminal-prompt-line {
    margin-top: 10px;
    border: none;
}

.final-prompt {
    color: #00ff99;
    font-family: inherit;
    font-weight: normal;
}

/* Easter Egg - ASCII Fireworks */
.fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.firework {
    position: absolute;
    color: #00ff00;
    font-size: 2rem;
    animation: explode 2s ease-out forwards;
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: scale(0.1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .terminal-window {
        margin: 0 -10px 30px;
        border-radius: 0;
    }
    
    .departments-menu {
        padding: 20px;
    }
    
    .department-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .dept-name {
        font-size: 2rem;
    }
    
    .ascii-text {
        font-size: 0.6rem;
    }
    
    .candidate-item {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .terminal-prompt {
        font-size: 1rem;
    }
    
    .department-btn {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .btn-suffix {
        display: none;
    }
    
    .dept-name {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
}

/* Hidden class for animations */
.hidden {
    display: none !important;
}