/* Coding Terminal Animation */
.coding-terminal {
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    font-family: 'Courier New', monospace;
    border: 1px solid #333;
    position: relative;
    z-index: 2;
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red {
    background: #ff5f56;
}

.terminal-btn.yellow {
    background: #ffbd2e;
}

.terminal-btn.green {
    background: #27c93f;
}

.terminal-body {
    padding: 20px;
    color: #d4d4d4;
    font-size: 14px;
    line-height: 1.6;
}

.code-line {
    white-space: pre;
    opacity: 0;
    animation: typeLine 0.5s forwards;
    display: flex;
    /* Fix alignment */
    align-items: center;
    /* Fix alignment */
}

/* Typing Animation Delays */
.code-line:nth-child(1) {
    animation-delay: 0.2s;
}

.code-line:nth-child(2) {
    animation-delay: 0.8s;
}

.code-line:nth-child(3) {
    animation-delay: 1.4s;
}

.code-line:nth-child(4) {
    animation-delay: 2.5s;
}

.code-line:nth-child(5) {
    animation-delay: 3.2s;
}

.code-line:nth-child(6) {
    animation-delay: 3.8s;
}

@keyframes typeLine {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.indent {
    margin-left: 20px;
}

/* Syntax Highlighting */
.keyword {
    color: #c586c0;
    font-weight: bold;
}

.variable {
    color: #9cdcfe;
}

.property {
    color: #9cdcfe;
}

.string {
    color: #ce9178;
}

.boolean {
    color: #569cd6;
}

.function {
    color: #dcdcaa;
}

/* Cursor Animation */
.cursor {
    display: inline-block;
    color: #fff;
    animation: blinkCursor 1s infinite;
    margin-left: 2px;
    font-weight: bold;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Enhancements for Mobile */
@media (max-width: 600px) {
    .terminal-body {
        font-size: 12px;
        padding: 15px;
    }
}