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

:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --accent-color: #00ff00;
    --warning-color: #ffaa00;
    --danger-color: #ff0040;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: rgba(20, 20, 20, 0.8);
    --border-color: rgba(0, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-dim: #888888;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Matrix Background Animation */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(0, 255, 255, 0.1) 100%),
        linear-gradient(transparent 98%, rgba(0, 255, 255, 0.1) 100%);
    background-size: 50px 50px;
    animation: matrixMove 20s linear infinite;
    z-index: -2;
}

@keyframes matrixMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 255, 255, 0.03) 50%
    );
    background-size: 100% 4px;
    animation: scanlineMove 0.1s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes scanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand .brand-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    margin-bottom: 2rem;
}

.title-main {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    display: block;
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--primary-color);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.title-sub {
    font-size: 1.2rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.5rem;
    font-weight: 300;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 30px var(--primary-color); }
    100% { text-shadow: 0 0 50px var(--primary-color), 0 0 70px var(--primary-color); }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    border-radius: 4px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.3);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--primary-color);
}

.btn.full-width {
    width: 100%;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circuit-board {
    position: relative;
    width: 300px;
    height: 300px;
}

.circuit-line {
    position: absolute;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.circuit-line.horizontal {
    width: 80%;
    height: 2px;
    top: 50%;
    left: 10%;
    animation: circuitPulse 3s ease-in-out infinite;
}

.circuit-line.vertical {
    width: 2px;
    height: 80%;
    left: 50%;
    top: 10%;
    animation: circuitPulse 3s ease-in-out infinite 1.5s;
}

.circuit-node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-color);
    animation: nodePulse 2s ease-in-out infinite;
}

.circuit-node[data-node="1"] { top: 20%; left: 20%; animation-delay: 0s; }
.circuit-node[data-node="2"] { top: 20%; right: 20%; animation-delay: 0.5s; }
.circuit-node[data-node="3"] { bottom: 20%; left: 20%; animation-delay: 1s; }
.circuit-node[data-node="4"] { bottom: 20%; right: 20%; animation-delay: 1.5s; }

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

@keyframes nodePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 20px var(--primary-color);
}

/* Systems Section */
.systems {
    background: var(--darker-bg);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.status-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
    border-color: var(--primary-color);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-header h3 {
    font-family: 'Orbitron', monospace;
    color: var(--text-primary);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: indicatorPulse 2s ease-in-out infinite;
}

.status-indicator.active {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.status-indicator.warning {
    background: var(--warning-color);
    box-shadow: 0 0 10px var(--warning-color);
}

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

.status-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.status-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.status-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: statusFillGlow 3s ease-in-out infinite;
}

.status-fill.warning {
    background: linear-gradient(90deg, var(--warning-color), var(--danger-color));
}

@keyframes statusFillGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.8); }
}

/* Terminal */
.terminal {
    background: var(--darker-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    max-width: 800px;
    margin: 0 auto;
}

.terminal-header {
    background: rgba(0, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-title {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.minimize { background: var(--warning-color); }
.control.maximize { background: var(--accent-color); }
.control.close { background: var(--danger-color); }

.terminal-body {
    padding: 1rem;
    height: 200px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--accent-color);
}

.command {
    color: var(--primary-color);
    margin-left: 0.5rem;
}

.terminal-output {
    color: var(--text-secondary);
    margin: 0.5rem 0 1rem 0;
    line-height: 1.4;
}

.cursor {
    color: var(--primary-color);
    animation: cursorBlink 1s infinite;
}

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

/* Chat Interface */
.chat-container {
    background: var(--darker-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: rgba(0, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.replicant-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.replicant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid var(--primary-color);
    position: relative;
    animation: avatarPulse 3s ease-in-out infinite;
}

.replicant-avatar::after {
    content: 'R';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-bg);
    font-weight: bold;
    font-size: 1.2rem;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 10px var(--primary-color); }
    50% { box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
}

.replicant-details {
    display: flex;
    flex-direction: column;
}

.replicant-name {
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.1rem;
}

.replicant-model {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.replicant-status {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.chat-controls {
    display: flex;
    gap: 0.5rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.replicant-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 1px solid var(--primary-color);
    position: relative;
}

.replicant-message .message-avatar::after {
    content: 'R';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-bg);
    font-weight: bold;
    font-size: 0.8rem;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    border: 1px solid var(--accent-color);
    position: relative;
}

.user-message .message-avatar::after {
    content: 'U';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-bg);
    font-weight: bold;
    font-size: 0.8rem;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-text {
    background: var(--card-bg);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    line-height: 1.4;
    border: 1px solid var(--border-color);
}

.replicant-message .message-text {
    background: rgba(0, 255, 255, 0.1);
    border-left: 3px solid var(--primary-color);
}

.user-message .message-text {
    background: rgba(0, 255, 0, 0.1);
    border-right: 3px solid var(--accent-color);
    text-align: right;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    font-family: 'Courier New', monospace;
}

.user-message .message-time {
    text-align: right;
}

.chat-input-container {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.send-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

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

/* Contact Section */
.contact {
    background: var(--darker-bg);
}

/* Contact Information */
.contact-info {
    margin-bottom: 4rem;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-card h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px var(--primary-color);
}

.contact-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    min-width: 300px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    min-width: 30px;
    text-align: center;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.contact-text label {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Orbitron', monospace;
}

.contact-email {
    color: var(--accent-color);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.contact-email:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.contact-email:hover::after {
    width: 100%;
}

.contact-text span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.access-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.access-form h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.access-form {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.access-info {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.access-info h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.access-info ul {
    list-style: none;
}

.access-info li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.access-info li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-dim);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .access-panel {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        min-width: auto;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-details {
        gap: 1rem;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}
