@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

body {
    font-family: 'Share Tech Mono', monospace;
    background: #000;
    overflow: hidden;
    cursor: crosshair;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 0, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 3px
        );
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.center-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.center-prompt.hidden {
    opacity: 0;
    pointer-events: none;
}

.glitch-text {
    font-size: 48px;
    font-weight: bold;
    color: #0f0;
    text-shadow: 
        0 0 10px #0f0,
        0 0 20px #0f0,
        0 0 30px #0f0;
    animation: glitch 2s infinite;
    position: relative;
    letter-spacing: 4px;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 
            0 0 10px #0f0,
            0 0 20px #0f0,
            0 0 30px #0f0;
    }
    25% {
        text-shadow: 
            -2px 0 10px #0f0,
            2px 2px 20px #f00,
            -2px -2px 30px #00f;
        transform: translate(-2px, 2px);
    }
    50% {
        text-shadow: 
            2px 0 10px #0f0,
            -2px -2px 20px #f00,
            2px 2px 30px #00f;
        transform: translate(2px, -2px);
    }
    75% {
        text-shadow: 
            0 0 10px #0f0,
            -2px 2px 20px #f00,
            2px -2px 30px #00f;
    }
}

.subtitle {
    margin-top: 20px;
    font-size: 16px;
    color: #0a0;
    animation: pulse 2s ease-in-out infinite;
}

.access-code-container {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #0f0;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    animation: borderPulse 2s ease-in-out infinite;
}

.access-code-label {
    color: #0ff;
    font-size: 14px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #0ff;
    letter-spacing: 2px;
}

.access-code-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.code-input {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.code-input:hover {
    border-color: #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: scale(1.05);
}

.code-input:focus {
    outline: none;
    border-color: #0ff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.7);
}

.code-input option {
    background: #000;
    color: #0f0;
}

.code-input-text {
    width: 200px;
    height: 60px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 24px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.code-input-text:hover {
    border-color: #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.code-input-text:focus {
    outline: none;
    border-color: #0ff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.7);
}

.code-input-text::placeholder {
    color: #0a0;
}

.code-separator {
    color: #0f0;
    font-size: 32px;
    text-shadow: 0 0 10px #0f0;
}

.access-button {
    width: 100%;
    padding: 12px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.access-button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

.access-button:active {
    transform: translateY(0);
}

.access-hint {
    color: #0a0;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 10px;
}

.hint-code {
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
}

.access-error {
    color: #f00;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
    text-shadow: 0 0 10px #f00;
    animation: shake 0.5s;
}

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

.access-code {
    margin-top: 30px;
    font-size: 14px;
    color: #0f0;
    letter-spacing: 2px;
    padding: 10px 20px;
    border: 1px solid #0f0;
    display: inline-block;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    animation: borderPulse 2s ease-in-out infinite;
}

#accessCode {
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
    font-weight: bold;
}

@keyframes borderPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
        border-color: #0f0;
    }
    50% { 
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
        border-color: #0ff;
    }
}

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

.terminal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.terminal-container.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.terminal {
    width: 800px;
    max-width: 90vw;
    max-height: 80vh;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #0f0;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 50px rgba(0, 255, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.terminal.minimized {
    max-height: 40px;
    overflow: hidden;
}

.terminal.minimized .terminal-body {
    display: none;
}

.terminal.maximized {
    width: 95vw;
    max-width: 95vw;
    max-height: 95vh;
}

.terminal-header {
    background: rgba(0, 255, 0, 0.1);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #0f0;
}

.terminal-title {
    color: #0f0;
    font-size: 14px;
    text-shadow: 0 0 5px #0f0;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.control {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #0f0;
    border-radius: 3px;
    cursor: pointer;
    color: #0f0;
    font-size: 16px;
    transition: all 0.2s;
}

.control:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 10px #0f0;
}

.terminal-body {
    padding: 20px;
    color: #0f0;
    font-size: 14px;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

.terminal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        );
    pointer-events: none;
}

.terminal-line {
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

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

.prompt {
    color: #0a0;
    margin-right: 10px;
}

.command {
    color: #0f0;
}

.typing {
    border-right: 2px solid #0f0;
    animation: blink 0.7s step-end infinite;
}

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

.output {
    color: #0d0;
    margin-left: 20px;
    white-space: pre-wrap;
    line-height: 1.8;
    text-shadow: 0 0 1px #0f0;
}

.section-title {
    color: #0ff;
    font-size: 16px;
    margin: 15px 0 10px 0;
    text-shadow: 0 0 5px #0ff;
}

.info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px;
    margin-left: 20px;
}

.info-label {
    color: #0a0;
}

.info-value {
    color: #0f0;
}

.link {
    color: #0ff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.link:hover {
    text-shadow: 0 0 10px #0ff;
    text-decoration: underline;
}

.menu-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #0f0;
    background: rgba(0, 255, 0, 0.05);
}

.menu-title {
    color: #0ff;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px #0ff;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.menu-item {
    padding: 15px;
    border: 1px solid #0a0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
    transition: left 0.5s;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    border-color: #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

.menu-item-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: #0f0;
    filter: drop-shadow(0 0 5px #0f0);
    transition: all 0.3s;
}

.menu-item:hover .menu-item-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 10px #0ff);
}

.menu-item-title {
    color: #0f0;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.menu-item-desc {
    color: #0a0;
    font-size: 11px;
}

.menu-item:hover .menu-item-title {
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
}

.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    border: 1px solid #0f0;
    background: rgba(0, 255, 0, 0.1);
    color: #0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.back-button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: translateX(-5px);
}

.back-button::before {
    content: '← ';
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0ff;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #0ff;
    margin: 5px;
    transition: all 0.3s;
}

.external-link:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1.05);
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.command-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.command-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    padding: 8px;
    outline: none;
}

.command-input:focus {
    border-color: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.message-form {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #0f0;
    background: rgba(0, 255, 0, 0.05);
}

.message-input,
.message-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    padding: 10px;
    margin-bottom: 10px;
    outline: none;
}

.message-input:focus,
.message-textarea:focus {
    border-color: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.message-textarea {
    resize: vertical;
    min-height: 80px;
}

.message-buttons {
    display: flex;
    gap: 10px;
}

.message-button {
    flex: 1;
    padding: 10px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.message-button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.message-button.cancel {
    background: rgba(255, 0, 0, 0.1);
    border-color: #f00;
    color: #f00;
}

.message-button.cancel:hover {
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: rgba(0, 255, 0, 0.1);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #0ff;
    box-shadow: 0 0 10px #0ff;
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to bottom, transparent, #0ff, transparent);
    box-shadow: 0 0 20px #0ff;
    animation: scan 4s linear infinite;
    z-index: 999;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 998;
}

.stats-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    padding: 15px;
    z-index: 50;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
}

.stats-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: #0a0;
    margin-right: 15px;
}

.stat-value {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    font-weight: bold;
}

.status-online {
    color: #0ff !important;
    text-shadow: 0 0 5px #0ff !important;
    animation: blink 1s step-end infinite;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #0f0;
    box-shadow: 0 0 5px #0f0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    50% { opacity: 1; }
}

.command-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #0a0;
    font-size: 12px;
    z-index: 50;
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 768px) {
    .glitch-text {
        font-size: 32px;
    }
    
    .terminal {
        width: 95vw;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-panel {
        top: 10px;
        right: 10px;
        padding: 10px;
        font-size: 10px;
    }
    
    .access-code {
        font-size: 12px;
        padding: 8px 15px;
    }
}
