/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', 'Source Code Pro', 'Courier New', monospace;
    line-height: 1.6;
    color: #00ff41;
    background: #000000;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Prevent page overscroll/bounce */
html, body { overscroll-behavior: none; }

/* Lock page scroll (used for mobile or when needed) */
.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Allow inner terminal to scroll even when page is locked */
.no-scroll .terminal-content {
    touch-action: pan-y;
    overscroll-behavior: contain;
}


.modal-open .cv-link { opacity: 0; pointer-events: none; }

/* Floating CV link */
.cv-link {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid #00d4ff;
    color: #00d4ff;
    background: rgba(10,10,10,0.6);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.15);
}

.cv-link i {
    font-size: 1rem;
}

.cv-link:hover {
    background: #00d4ff;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.35);
}

@media (max-width: 480px) {
    .cv-link {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
        gap: 6px;
    }
}

/* Hide bubble background */
.bubble-container {
    display: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(102, 194, 255, 0.6), 
        rgba(173, 216, 255, 0.4) 40%, 
        rgba(200, 235, 255, 0.2) 70%, 
        rgba(255, 255, 255, 0.1) 90%,
        transparent);
    animation: floatUp 15s ease-out infinite,
               sway 8s ease-in-out infinite alternate,
               shimmer 3s ease-in-out infinite;
    opacity: 0;
    mix-blend-mode: normal;
    filter: blur(0.5px);
    box-shadow: 
        0 0 25px rgba(102, 194, 255, 0.3),
        0 0 50px rgba(173, 216, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bubble:hover {
    transform: scale(1.1);
    filter: blur(0.1px);
    box-shadow: 
        0 0 25px rgba(102, 194, 255, 0.25),
        0 0 50px rgba(173, 216, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.15);
}

/* Burst effect on click */
.bubble.pop {
    animation: pop 500ms ease-out forwards;
}

@keyframes pop {
    0% { 
        transform: scale(1); 
        opacity: 1; 
        filter: blur(0.3px) brightness(1.2); 
        box-shadow: 
            0 0 25px rgba(102, 194, 255, 0.4),
            0 0 50px rgba(173, 216, 255, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
    30% { 
        transform: scale(1.4); 
        opacity: 0.9; 
        filter: blur(0.8px) brightness(1.5); 
        box-shadow: 
            0 0 40px rgba(102, 194, 255, 0.6),
            0 0 80px rgba(173, 216, 255, 0.4),
            inset 0 0 30px rgba(255, 255, 255, 0.4);
    }
    60% { 
        transform: scale(2.2); 
        opacity: 0.6; 
        filter: blur(2px) brightness(2); 
        box-shadow: 
            0 0 60px rgba(102, 194, 255, 0.8),
            0 0 120px rgba(173, 216, 255, 0.6);
    }
    100% { 
        transform: scale(0.1); 
        opacity: 0; 
        filter: blur(3px) brightness(0.5); 
        box-shadow: none;
    }
}

.bubble:nth-child(odd) {
    background: radial-gradient(circle at 70% 40%, rgba(0, 196, 255, 0.16), rgba(0, 255, 65, 0.08) 60%, rgba(0,0,0,0) 70%);
}

.bubble:nth-child(3n) {
    background: radial-gradient(circle at 40% 60%, rgba(0, 255, 65, 0.16), rgba(0, 196, 255, 0.08) 60%, rgba(0,0,0,0) 70%);
}

@keyframes floatUp {
    0% {
        transform: translateY(calc(100vh + 50px)) translateX(0px) scale(0.3);
        opacity: 0;
    }
    5% {
        opacity: 0.9;
        transform: translateY(calc(100vh - 20px)) translateX(5px) scale(0.6);
    }
    10% {
        opacity: 1;
        transform: translateY(calc(90vh)) translateX(-3px) scale(0.8);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) translateX(8px) scale(1);
    }
    95% {
        opacity: 0.8;
        transform: translateY(-5vh) translateX(-2px) scale(1.1);
    }
    100% {
        transform: translateY(-15vh) translateX(0px) scale(0.8);
        opacity: 0;
    }
}

/* Horizontal gentle sway to simulate water movement */
@keyframes sway {
    0%   { transform: translateX(0px) rotate(0deg); }
    25%  { transform: translateX(12px) rotate(2deg); }
    50%  { transform: translateX(-8px) rotate(-1deg); }
    75%  { transform: translateX(15px) rotate(3deg); }
    100% { transform: translateX(0px) rotate(0deg); }
}

/* Shimmer effect for water-like appearance */
@keyframes shimmer {
    0%, 100% { 
        filter: blur(0.3px) brightness(1); 
        box-shadow: 
            0 0 20px rgba(102, 194, 255, 0.15),
            0 0 40px rgba(173, 216, 255, 0.08),
            inset 0 0 15px rgba(255, 255, 255, 0.1);
    }
    50% { 
        filter: blur(0.1px) brightness(1.2); 
        box-shadow: 
            0 0 30px rgba(102, 194, 255, 0.25),
            0 0 60px rgba(173, 216, 255, 0.15),
            inset 0 0 25px rgba(255, 255, 255, 0.2);
    }
}

/* Vary durations subtly for a natural feel */
.bubble:nth-child(2n)   { animation-duration: 18s, 9s, 4s; }
.bubble:nth-child(3n)   { animation-duration: 22s, 7s, 2.5s; }
.bubble:nth-child(5n)   { animation-duration: 16s, 10s, 3.5s; }
.bubble:nth-child(7n)   { animation-duration: 20s, 6s, 5s; }

/* Splash particle animation */
@keyframes splash {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(var(--end-x) - 50vw), calc(var(--end-y) - 50vh)) scale(0.2);
        opacity: 0;
    }
}

.container {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

.terminal-stack {
    position: absolute;
    width: 1000px;
    max-width: 90vw;
    height: auto;
    /* Move higher - 30% from top */
    left: 50%;
    top: 20%;
    transform: translate(-50%, -50%);
    /* Để chỗ cho terminal phía sau nhô ra */
    padding-right: 60px;
    padding-bottom: 40px;
}

.stackable {
    position: absolute;
    left: 0;
    top: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    width: calc(100% - 60px); /* Để chỗ cho cạnh nhô ra */
}

/* Terminal chính - ở trên khi active */
#terminal-main.stackable {
    z-index: 2;
    transform: translateX(0) translateY(0);
}

/* Terminal vui - ở phía sau, nhô cạnh phải */
#terminal-fun.stackable {
    z-index: 1;
    transform: translateX(50px) translateY(25px) scale(0.95);
    opacity: 0.8;
    width: 100%; /* Terminal phía sau full width để nhô ra */
}

/* Khi terminal active - lên trên cùng */
.stackable.active {
    z-index: 3 !important;
    transform: translateX(0) translateY(0) scale(1) !important;
    opacity: 1 !important;
    box-shadow: 0 24px 80px rgba(0, 255, 65, 0.25);
    width: calc(100% - 60px) !important; /* Đảm bảo không che hết */
}

/* Khi terminal không active - xuống dưới và nhô cạnh */
#terminal-main.stackable:not(.active) {
    z-index: 1;
    transform: translateX(50px) translateY(25px) scale(0.95);
    opacity: 0.8;
    width: 100%; /* Full width để nhô ra */
}

#terminal-fun.stackable:not(.active) {
    z-index: 1;
    transform: translateX(50px) translateY(25px) scale(0.95);
    opacity: 0.8;
    width: 100%; /* Full width để nhô ra */
}

/* Hover effect cho terminal phía sau */
.stackable:not(.active):hover {
    transform: translateX(40px) translateY(20px) scale(0.96) !important;
    opacity: 0.9 !important;
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.2);
}

.terminal-overlay-hint {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: #00d4ff;
    opacity: 0.9;
    background: rgba(10, 10, 10, 0.9);
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid #00d4ff;
    animation: pulse-hint 2s ease-in-out infinite;
    pointer-events: none; /* Không chặn click */
    z-index: 10;
}

/* Clean stackable styling */
.stackable {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stackable.active {
    box-shadow: 0 20px 60px rgba(0, 255, 65, 0.2);
}

.stackable:not(.active) {
    opacity: 0.8;
    filter: brightness(0.9);
}

.stackable:not(.active):hover {
    opacity: 0.9;
    filter: brightness(1);
}

/* Lock interaction (scroll, input) of the inactive terminal but still allow click to switch */
.stackable:not(.active) .terminal-content,
.stackable:not(.active) .terminal-header {
    pointer-events: none;
    user-select: none;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .terminal-stack {
        padding-right: 30px;
        padding-bottom: 25px;
        max-width: 95vw;
    }
    
    .stackable {
        width: calc(100% - 30px);
    }
    
    #terminal-fun.stackable {
        transform: translateX(25px) translateY(15px) scale(0.96);
        width: 100%;
    }
    
    #terminal-main.stackable:not(.active) {
        transform: translateX(25px) translateY(15px) scale(0.96);
        width: 100%;
    }
    
    #terminal-fun.stackable:not(.active) {
        transform: translateX(25px) translateY(15px) scale(0.96);
        width: 100%;
    }
}

/* Terminal Window Styles */
.terminal-window {
    width: 100%;
    max-width: 1000px;
    background: linear-gradient(145deg, #1e1e1e 0%, #1a1a1a 50%, #161616 100%);
    border-radius: 12px;
    border: 1px solid #333;
    backdrop-filter: blur(20px);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: terminalAppear 1s ease forwards, terminalGlow 3s ease-in-out infinite alternate 1s;
}

@keyframes terminalAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes terminalGlow {
    0% { 
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
                    0 0 50px rgba(0, 255, 65, 0.1); 
    }
    100% { 
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                    0 0 80px rgba(0, 255, 65, 0.2); 
    }
}

.terminal-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #2a2a2a 50%, #252525 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.btn-close {
    background: #ff5f56;
}

.btn-minimize {
    background: #ffbd2e;
}

.btn-maximize {
    background: #27ca3f;
}

.terminal-title {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.terminal-content {
    padding: 20px;
    min-height: 400px;
    max-height: 500px;
    background: #0a0a0a;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #2a2a2a;
    -webkit-overflow-scrolling: touch;
    font-family: 'Fira Code', 'Be Vietnam Pro', 'Source Code Pro', 'Courier New', monospace;
}

/* Custom scrollbar cho Webkit browsers */
.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
    opacity: 0.7;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: #00ff41;
    opacity: 1;
}

/* Lock terminal scrolling during startup */
.terminal-content.locked {
    overflow: hidden;
    scrollbar-width: none;
}
.terminal-content.locked::-webkit-scrollbar {
    display: none;
}

/* Terminal Output */
.terminal-output {
    margin-bottom: 20px;
    min-height: auto;
}

.terminal-line {
    margin-bottom: 8px;
    font-size: 1rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.4;
    opacity: 0;
    animation: terminalLineAppear 0.3s ease forwards;
}

@keyframes terminalLineAppear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prompt {
    color: #00ff41;
    font-weight: 600;
    flex-shrink: 0;
}

.command {
    color: #ffffff;
    margin-left: 5px;
    flex-grow: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.output {
    color: #ccc;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-left: 0;
    padding-left: 20px;
    border-left: 2px solid #333;
    margin-top: 5px;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.output a {
    word-break: break-all;
}

.cursor {
    color: #00ff41;
    animation: blink 1s infinite;
    margin-left: 2px;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Main Content Styles */
.intro-text {
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.name-display, .subtitle-display {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.text-primary {
    color: #00ff41;
}

.text-accent {
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.text-secondary {
    color: #00d4ff;
}

.emoji {
    color: #feca57;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 20px;
}

/* Terminal Cards */
.terminal-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

.terminal-card:nth-child(1) {
    animation-delay: 0.2s;
}

.terminal-card:nth-child(2) {
    animation-delay: 0.4s;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-card:hover {
    border-color: #00ff41;
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.2);
    transform: translateY(-5px);
}

.card-header {
    background: #2a2a2a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    color: #00ff41;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #888;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.status-dot.active {
    background: #00ff41;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.card-content {
    padding: 25px;
    text-align: center;
}

.card-icon {
    margin-bottom: 20px;
}

.card-icon i {
    font-size: 2.5rem;
    color: #00ff41;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

#mailbox-card .card-icon i {
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

#coding-card .card-icon i {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.card-description {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}

.terminal-btn {
    background: #2a2a2a;
    color: #00ff41;
    border: 2px solid #00ff41;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#mailbox-card .terminal-btn {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

#coding-card .terminal-btn {
    color: #00d4ff;
    border-color: #00d4ff;
}

.terminal-btn:hover {
    background: #00ff41;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 65, 0.3);
}

#mailbox-card .terminal-btn:hover {
    background: #ff6b6b;
    color: #0a0a0a;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

#coding-card .terminal-btn:hover {
    background: #00d4ff;
    color: #0a0a0a;
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

/* Modal Styles - Terminal Theme */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: #1a1a1a;
    margin: 20px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 255, 65, 0.2);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #2a2a2a;
    color: #00ff41;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Be Vietnam Pro', 'Fira Code', monospace;
    text-transform: uppercase;
}

.close {
    color: #ff6b6b;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    padding: 5px;
}

.close:hover {
    color: #fff;
    transform: scale(1.2);
}

/* Form Styles - Terminal Theme */
.contact-form {
    padding: 25px;
    background: #0a0a0a;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 80px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #00ff41;
    font-family: 'Be Vietnam Pro', 'Fira Code', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #333;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #1a1a1a;
    color: #fff;
    font-family: 'Be Vietnam Pro', 'Fira Code', monospace;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00ff41;
    background: #2a2a2a;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: #2a2a2a;
    color: #00ff41;
    border: 2px solid #00ff41;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Be Vietnam Pro', 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: #00ff41;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 65, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 1.1rem;
    color: #4a5568;
}

/* Success Message */
.success-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 2001;
    animation: successSlideIn 0.5s ease;
}

@keyframes successSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.success-message i {
    font-size: 4rem;
    color: #48bb78;
    margin-bottom: 1rem;
}

.success-message p {
    font-size: 1.2rem;
    color: #2d3748;
    font-weight: 500;
}

/* Loading Overlay - Terminal Theme */
.loading-overlay {
    background: rgba(10, 10, 10, 0.95);
    color: #00ff41;
}

.spinner {
    border: 4px solid #333;
    border-top: 4px solid #00ff41;
}

.loading-overlay p {
    color: #00ff41;
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
}

/* Success Message - Terminal Theme */
.success-message {
    background: #1a1a1a;
    border: 2px solid #00ff41;
    color: #00ff41;
}

.success-message i {
    color: #00ff41;
}

.success-message p {
    color: #00ff41;
    font-family: 'Fira Code', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .terminal-window {
        max-width: 100%;
    }
    
    .terminal-content {
        max-height: 400px;
    }
    
    .terminal-stack {
        flex-direction: column;
        gap: 10px;
    }
    
    #terminal-main.stackable,
    #terminal-fun.stackable {
        max-width: 100%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .terminal-card {
        padding: 0;
    }
    
    .modal {
        padding: 10px 0;
    }
    
    .modal-content {
        margin: 10px auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .contact-form {
        padding: 20px;
        max-height: calc(95vh - 60px);
    }
}

@media (max-width: 480px) {
    .terminal-content {
        max-height: 60vh;
        padding: 14px;
    }
    .terminal-line { font-size: 0.95rem; }
    .output { font-size: 0.95rem; }
    .terminal-title { font-size: 0.8rem; }
    
    .card-icon i {
        font-size: 2rem;
    }
    
    .terminal-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .card-content {
        padding: 20px;
    }
}
