:root {
    --bg-color: #1e1e1e;
    --text-color: #f0f0f0;
    --prompt-color: #50fa7b;
    --accent-color: #bd93f9;
    --error-color: #ff5555;
    --success-color: #50fa7b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background-color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 10px;
}

.terminal {
    width: 95%;
    max-width: 900px;
    height: 85vh;
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: #333;
    padding: 10px;
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close {
    background-color: #ff5f56;
}

.minimize {
    background-color: #ffbd2e;
}

.maximize {
    background-color: #27c93f;
}

.terminal-title {
    color: var(--text-color);
    font-size: 14px;
}

.terminal-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    color: var(--text-color);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.terminal-output {
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--prompt-color);
    margin-right: 8px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    outline: none;
    font-size: 16px;
    width: 100%;
    padding: 5px 0;
    caret-color: var(--prompt-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { border-right-color: transparent; }
    50% { border-right-color: var(--prompt-color); }
}

.command {
    margin: 10px 0;
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
}

.command-output {
    padding-left: 20px;
    margin-top: 5px;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.error {
    color: var(--error-color);
}

.success {
    color: var(--success-color);
}

.highlight {
    color: var(--accent-color);
}


/* Project links styling */
.project-link {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.project-link:hover {
    color: var(--text-color);
    background-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Matrix effect styling */
.matrix-effect {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: black;
}

.matrix-column {
    position: absolute;
    top: -100px;
    width: 20px;
    color: #0f0;
    font-size: 1.2em;
    text-align: center;
}

.matrix-char {
    animation: fall 5s linear infinite;
    opacity: 0;
}

@keyframes fall {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(300px);
        opacity: 0;
    }
}

.exit-matrix {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 8px 16px;
    cursor: pointer;
    z-index: 10;
}

.exit-matrix:hover {
    background: #0f0;
    color: #000;
}

/* Media Queries for Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .terminal {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .terminal-body {
        padding: 10px;
    }

    #terminal-input {
        font-size: 14px;
    }

    .command, .command-output {
        font-size: 14px;
        line-height: 1.4;
    }

    .matrix-effect {
        height: 200px;
    }

    .matrix-char {
        font-size: 1em;
    }

    .welcome .typing-animation {
        font-size: 0.6em;
        line-height: 1.2;
        letter-spacing: -1px;
        white-space: pre;
        overflow-x: auto;
    }

    .project-link {
        display: block;
        margin: 5px 0;
        padding: 8px;
        text-align: center;
        background-color: rgba(189, 147, 249, 0.1);
    }
}

/* Animation styles */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
    will-change: opacity;
}

/* Typing animation */
.typing-animation {
    display: inline-block;
    overflow: hidden;
    white-space: pre;
    border-right: 2px solid var(--text-color);
    width: 0;
    animation: typing 3s steps(40, end) forwards,
             blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--text-color) }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    transform: translateX(-20px);
    opacity: 0;
    animation: slideIn 0.3s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.terminal-header-animation {
    height: 3px;
    width: 0;
    background: linear-gradient(to right, var(--prompt-color), var(--accent-color));
    animation: headerGrow 1s ease-in-out forwards;
    margin-bottom: 10px;
    display: block;
    will-change: width;
}

@keyframes headerGrow {
    to { width: 100%; }
}

/* Widget styles - making more specific */
#output .clock-widget, 
#output .weather-widget, 
#output .theme-selector {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: block;
    transition: transform 0.2s ease;
}

#output .widget-header {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
}

#output .widget-content {
    padding: 10px;
    display: flex;
    align-items: center;
}

#output .widget-footer {
    font-size: 0.8em;
    padding: 5px 10px;
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
    display: block;
}

/* Weather widget specific */
.weather-icon {
    font-size: 2.5em;
    margin-right: 15px;
}

.weather-details {
    display: flex;
    flex-direction: column;
}

.weather-temp {
    font-size: 1.5em;
    font-weight: bold;
}

/* Theme selector */
.theme-options {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.theme-btn {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}