/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&display=swap');

:root {
    --bg-color: #1a2a3a; /* Dark navy blue background */
    --text-color: #00ff00;
    --accent-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --error-color: #e74c3c;
    --font-family: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header Styles */
header {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0.25rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

nav a:hover {
    color: var(--accent-color);
}

/* Updates Section Styles */
#updates-section {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    width: 100%;
    max-width: 800px;
    margin: 0.5rem auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    max-height: 150px;
}

#updates-header {
    background-color: var(--text-color);
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

#updates-content {
    padding: 0.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.update-item {
    margin-bottom: 0.25rem;
    padding: 0.25rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.update-date {
    color: var(--secondary-color);
    font-size: 0.7rem;
    display: inline-block;
    margin-right: 0.5rem;
}

.update-text {
    color: var(--text-color);
    font-size: 0.8rem;
    display: inline-block;
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#terminal {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    width: 100%;
    max-width: 800px;
    height: calc(100vh - 220px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    margin-top: 0.5rem;
}

#terminal-header {
    background-color: var(--text-color);
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

.terminal-button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.terminal-button:nth-child(1) { background-color: #ff5f56; }
.terminal-button:nth-child(2) { background-color: #ffbd2e; }
.terminal-button:nth-child(3) { background-color: #27c93f; }

.terminal-title {
    color: var(--bg-color);
    font-size: 0.8rem;
    margin-left: 10px;
}

#terminal-content {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
}

#terminal-output {
    margin-bottom: 0.5rem;
}

#terminal-input {
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

#command-input {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 0.9rem;
    flex: 1;
    outline: none;
}

/* Project Cards */
.projects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.project-card {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    padding: 0.5rem;
    width: calc(50% - 0.25rem);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 255, 0, 0.2);
}

.project-card h3 {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.project-card p {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.project-card a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.8rem;
}

.project-card a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Custom Styling for Different Command Outputs */
.success {
    color: var(--success-color);
}

.warning {
    color: var(--warning-color);
}

.error {
    color: var(--error-color);
}

/* Loading Animation */
.loading-bar {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 1.5px;
    overflow: hidden;
    margin-top: 5px;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.5s ease-in-out;
    position: relative;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    z-index: 1;
    background-size: 50px 50px;
    animation: move 2s linear infinite;
    overflow: hidden;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Footer Styles */
footer {
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 0.5rem;
    font-size: 0.7rem;
}

/* Animations */
@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background-color: var(--text-color);
    animation: blink 1s infinite;
}

/* Active Element Highlight */
.active-command {
    color: #ffffff;
    text-shadow: 0 0 5px var(--text-color);
    animation: pulse 1s infinite alternate;
}

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

/* Matrix Animation */
.matrix-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.matrix-character {
    position: absolute;
    color: #00ff00;
    font-size: 12px;
    line-height: 12px;
    font-family: var(--font-family);
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav li {
        margin: 0.25rem 0;
    }

    #terminal {
        height: calc(100vh - 250px);
    }

    .project-card {
        width: 100%;
    }

    #updates-section {
        margin: 0.5rem;
        max-height: 120px;
    }

    .update-item {
        font-size: 0.8rem;
    }
}

/* Background Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 255, 0, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 255, 0, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-color);
    z-index: 9999;
}

.loading::after {
    content: "Loading...";
    font-family: var(--font-family);
    color: var(--text-color);
    animation: loadingText 1.5s infinite;
}

@keyframes loadingText {
    0% { content: "Loading.  "; }
    33% { content: "Loading.. "; }
    66% { content: "Loading..."; }
}
