/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: #0a0a0a;
    color: #00ff00;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Matrix Background Animation */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: -3;
    opacity: 0.7;
}

.matrix-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, transparent 50%, rgba(0, 255, 0, 0.03) 50%),
        linear-gradient(transparent 50%, rgba(0, 255, 0, 0.03) 50%);
    background-size: 50px 50px;
    animation: matrix 20s linear infinite;
}

@keyframes matrix {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* Scan Line */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(0, 255, 0, 0.8), 
        transparent);
    z-index: -1;
    animation: scan 3s linear infinite;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Glitch Effect */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -2;
    opacity: 0.3;
    animation: glitch 5s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-1px, 1px); }
    20% { transform: translate(1px, -1px); }
    30% { transform: translate(-1px, -1px); }
    40% { transform: translate(1px, 1px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(1px, -1px); }
    70% { transform: translate(-1px, -1px); }
    80% { transform: translate(1px, 1px); }
    90% { transform: translate(-1px, 1px); }
}

/* Terminal Header */
.terminal-header {
    background: #111;
    border-bottom: 2px solid #00ff00;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    position: relative;
    z-index: 100;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.control.close { background: #ff5f56; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #27c93f; }

.terminal-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
}

.terminal-title i {
    margin-right: 10px;
}

.terminal-time {
    font-size: 0.9rem;
    color: #00ff00;
    opacity: 0.8;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Main Header */
.main-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    border: 2px solid #00ff00;
    background: rgba(0, 20, 0, 0.7);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        transparent 30%, 
        rgba(0, 255, 0, 0.1) 70%);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #00ff00;
    position: relative;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    5% { clip-path: inset(92% 0 1% 0); }
    10% { clip-path: inset(43% 0 1% 0); }
    15% { clip-path: inset(25% 0 58% 0); }
    20% { clip-path: inset(54% 0 7% 0); }
    25% { clip-path: inset(58% 0 43% 0); }
    30% { clip-path: inset(98% 0 1% 0); }
    35% { clip-path: inset(25% 0 73% 0); }
    100% { clip-path: inset(85% 0 6% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(25% 0 58% 0); }
    5% { clip-path: inset(54% 0 7% 0); }
    10% { clip-path: inset(58% 0 43% 0); }
    15% { clip-path: inset(98% 0 1% 0); }
    20% { clip-path: inset(25% 0 73% 0); }
    100% { clip-path: inset(85% 0 6% 0); }
}

.subtitle {
    font-size: 1.2rem;
    color: #00ff00;
    opacity: 0.9;
    margin-top: 10px;
}

.typing-text {
    border-right: 3px solid #00ff00;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: #00ff00; }
}

.security-status {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse {
    width: 15px;
    height: 15px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 10px #00ff00;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.status-text {
    font-size: 0.9rem;
    color: #00ff00;
}

.encryption-level {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid #00ff00;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 4px;
}

.encryption-level i {
    color: #00ff00;
}

/* Games Section */
.games-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #00ff00;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #00ff00;
}

.section-header h2 i {
    margin-right: 10px;
}

.data-stream {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #00ff00;
    opacity: 0.9;
}

.stream-value {
    color: #00ff00;
    font-weight: bold;
}

.packet-loss {
    color: #00ff00;
}

.loss-value {
    color: #00ff00;
    font-weight: bold;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.game-card {
    background: rgba(10, 20, 10, 0.8);
    border: 1px solid #00ff00;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 180px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 0, 0.4);
    border-color: #00ff00;
}

.game-card-inner {
    display: flex;
    align-items: center;
    padding: 20px;
    height: 100%;
}

.game-icon {
    position: relative;
    margin-right: 20px;
    flex-shrink: 0;
}

.game-icon img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #00ff00;
    padding: 5px;
    background: rgba(0, 255, 0, 0.1);
}

.game-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff0000;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.game-info {
    flex-grow: 1;
}

.game-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: #00ff00;
    margin-bottom: 5px;
}

.game-desc {
    font-size: 0.8rem;
    color: #00ff00;
    opacity: 0.8;
    margin-bottom: 10px;
}

.game-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.75rem;
    color: #00ff00;
    opacity: 0.9;
}

.game-stats i {
    margin-right: 5px;
    width: 12px;
}

.play-btn {
    background: linear-gradient(45deg, #00ff00, #00cc00);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn:hover {
    background: linear-gradient(45deg, #00cc00, #00ff00);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
    transform: scale(1.05);
}

.play-btn i {
    font-size: 0.8rem;
}

/* Footer */
.main-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #00ff00;
    background: rgba(0, 20, 0, 0.7);
    border-radius: 8px;
}

.footer-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00ff00;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.protocol-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.protocol-list span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #00ff00;
    opacity: 0.9;
}

.protocol-list i {
    color: #00ff00;
    font-size: 0.8rem;
}

.system-status {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    font-size: 0.9rem;
    color: #00ff00;
    opacity: 0.9;
    min-width: 100px;
}

.status-bar {
    flex-grow: 1;
    height: 10px;
    background: rgba(0, 255, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.status-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00cc00);
    border-radius: 5px;
    transition: width 1s ease;
}

.status-value {
    font-size: 0.9rem;
    color: #00ff00;
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

.admin-btn {
    display: inline-block;
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    border: 1px solid #ff0000;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.admin-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(10, 20, 10, 0.95);
    border: 2px solid #00ff00;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: rgba(0, 30, 0, 0.9);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00ff00;
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #00ff00;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    font-size: 2rem;
    color: #00ff00;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #ff0000;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* Authentication Container */
.auth-container {
    text-align: center;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-icon {
    font-size: 3rem;
    color: #00ff00;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

#gameName {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #00ff00;
    margin-bottom: 15px;
}

.auth-warning {
    font-size: 0.8rem;
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: #00ff00;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 6px;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    border-color: #00ff00;
}

.input-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff00;
    transition: width 0.3s ease;
}

.input-group input:focus ~ .input-effect {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 40px;
    color: #00ff00;
    cursor: pointer;
    font-size: 1.1rem;
}

.security-check {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00ff00;
    letter-spacing: 3px;
}

.captcha button {
    background: transparent;
    border: none;
    color: #00ff00;
    cursor: pointer;
    font-size: 1rem;
}

.security-check input {
    flex-grow: 1;
    padding: 10px 15px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 6px;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
}

.auth-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #00ff00, #00cc00);
    color: #000;
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit:hover {
    background: linear-gradient(45deg, #00cc00, #00ff00);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.7);
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 0, 0.3);
}

.auth-footer p {
    font-size: 0.8rem;
    color: #00ff00;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Terminal Output */
.terminal-output {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff00;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.terminal-output .terminal-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00ff00;
    background: rgba(0, 20, 0, 0.9);
}

.terminal-output .terminal-header button {
    background: transparent;
    border: none;
    color: #00ff00;
    cursor: pointer;
    font-size: 1rem;
}

.terminal-content {
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.5;
}

.terminal-content p {
    margin-bottom: 8px;
    color: #00ff00;
    opacity: 0.9;
}

.success-text {
    color: #00ff00;
    font-weight: bold;
}

.error-text {
    color: #ff0000;
    font-weight: bold;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 20, 0, 0.5);
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .main-header {
        padding: 20px;
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .terminal-output {
        width: calc(100% - 40px);
        bottom: 10px;
        right: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .glitch {
        font-size: 2rem;
    }
    
    .game-card-inner {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .game-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .play-btn {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .main-footer {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}