
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: #0a192f;
    color: #64ffda;
    background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

.animation-container {
    position: relative;
    width: 90vw;
    max-width: 900px;     /* Reduced from 1200px */
    height: 75vh;         /* Reduced from 90vh */
    max-height: 600px;    /* Reduced from 800px */
    padding: 20px;
    box-sizing: border-box;
}

.terminal {
    background-color: rgba(26, 30, 46, 0.95);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.2);
    width: 100%;
    height: 100%;
    overflow: hidden;
    animation: none; /* Remove floating animation */
    backdrop-filter: blur(10px);
    transform-origin: center;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.terminal.shrunk {
    transform: scale(0);
    opacity: 0;
}

.terminal-header {
    background-color: rgba(37, 42, 63, 0.95);
    padding: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.terminal-buttons span:hover {
    transform: scale(1.2);
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27c93f; }

.terminal-title {
    color: #8892b0;
    font-size: 14px;
    font-weight: 500;
}

.terminal-content {
    padding: 20px 28px;   
    font-size: 14px;    
    line-height: 1.4;   
    overflow-y: auto;
    height: calc(100% - 45px);
    display: flex;
    flex-direction: column;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background-color: #64ffda;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: middle;
}

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

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.code-symbol {
    position: absolute;
    color: rgba(100, 255, 218, 0.15);
    font-size: 24px;
    animation: float 8s infinite;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.code-symbol:nth-child(1) {
    top: 20%;
    left: -30px;
    animation-delay: 0s;
}

.code-symbol:nth-child(2) {
    top: 60%;
    right: -20px;
    animation-delay: -2s;
}

.code-symbol:nth-child(3) {
    bottom: 10%;
    left: 45%;
    animation-delay: -4s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translate(100px, -100px) rotate(360deg);
        opacity: 0;
    }
}

.typed-text {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.3s forwards;
    margin-bottom: 4px;  /* Reduced from 8px */
}

.response {
    color: #8892b0;
    margin-left: 12px;
    padding-left: 8px;
    border-left: 2px solid rgba(100, 255, 218, 0.3);
    margin-bottom: 4px;
}

.response-line {
    margin: 4px 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emoji {
    display: inline-block;
    transform-origin: center;
    animation: emojiPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes emojiPop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(136, 146, 176, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 255, 218, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 255, 218, 0.3);
}

.contact-info {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 30, 46, 0.95);
    padding: 16px 32px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #64ffda;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    opacity: 0;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: opacity 0.5s ease-in-out;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    width: 80%;
    max-width: 400px;
    box-sizing: border-box;
}

.contact-info::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    filter: blur(2px);
    animation: sparkTravel 3s linear infinite;
    box-shadow:
        0 0 4px #fff,
        0 0 8px #fff;
}

@keyframes sparkTravel {
    0% {
        left: -3px;
        top: -3px;
    }
    25% {
        left: calc(100% + 3px);
        top: -3px;
    }
    50% {
        left: calc(100% + 3px);
        top: calc(100% + 3px);
    }
    75% {
        left: -3px;
        top: calc(100% + 3px);
    }
    100% {
        left: -3px;
        top: -3px;
    }
}

.contact-info.visible {
    opacity: 1;
}

.contact-text {
    width: 100%;
    display: inline-block;
    text-align: center;
    margin: 0 auto;
    line-height: 1.4;
}

#typing-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 768px) {
    .animation-container {
        width: 95vw;
        height: 80vh;
        padding: 10px;
        max-height: 80vh;
    }

    .terminal {
        width: 100%;
        height: 100%;
    }

    .terminal-content {
        padding: 16px 20px;
        font-size: 13px;
    }

    .contact-info {
        font-size: 14px;
        padding: 12px 20px;
        width: 85%;
        max-width: 320px;
    }

    .code-symbol:nth-child(1) {
        left: 0;
    }

    .code-symbol:nth-child(2) {
        right: 0;
    }
}

@media (max-width: 480px) {
    .animation-container {
        width: 100vw;
        height: 85vh;
        padding: 8px;
    }

    .terminal-content {
        padding: 12px 16px;
        font-size: 11px;
    }

    .terminal-title {
        font-size: 12px;
    }

    .terminal-buttons span {
        width: 10px;
        height: 10px;
    }

    .contact-info {
        font-size: 12px;
        padding: 10px 16px;
        width: 90%;
        max-width: 280px;
    }

    .code-symbol {
        font-size: 20px;
    }

    @keyframes float {
        0% {
            transform: translate(0, 0) rotate(0deg);
            opacity: 0;
        }
        20% {
            opacity: 0.8;
        }
        80% {
            opacity: 0.8;
        }
        100% {
            transform: translate(50px, -50px) rotate(360deg);
            opacity: 0;
        }
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    .animation-container {
        height: 90vh;
        padding: 5px;
    }

    .terminal-content {
        padding: 10px 12px;
        font-size: 10px;
    }

    .contact-info {
        font-size: 11px;
        padding: 8px 12px;
        width: 95%;
    }
}