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

img {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #000;
    background: #000;
    font-size: 18px;
    overflow-x: hidden;
    position: relative;
    height: 100vh;
    overflow-y: auto;
}

body.zoomed-in {
    overflow: hidden;
}

/* Background Video */
.background-video {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    z-index: 0;
    pointer-events: none;
    object-fit: cover;
    will-change: transform;
    transform-origin: center center;
    transform: translate(-50%, -50%) translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    filter: contrast(1.15) brightness(1.08) saturate(1.12);
    -webkit-filter: contrast(1.15) brightness(1.08) saturate(1.12);
    transform-style: preserve-3d;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Laptop Image */
.laptop-image {
    position: fixed;
    top: 5%;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    left: 5%;
    width: 600px;
    height: auto;
    z-index: 2;
    pointer-events: auto;
    will-change: transform;
    transform-origin: top left;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    mix-blend-mode: normal;
    cursor: url('cursor.png') 0 0, auto;
}

/* Laptop Screen Text */
.laptop-screen-text {
    position: fixed;
    z-index: 3;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    will-change: transform;
    transform-origin: center center;
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    padding: 0.5rem 1rem;
    background: #2d9ade;
    border-radius: 4px;
    border: 2px solid #808080;
}

.laptop-screen-text:hover {
    color: #2d9ade;
    background: #fff;
}

/* Laptop About Content */
.laptop-about-content {
    position: fixed;
    z-index: 4;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 400;
    font-family: 'Courier New', Courier, 'Lucida Console', Monaco, monospace;
    will-change: transform;
    transform-origin: center center;
    pointer-events: none;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 300px;
    line-height: 1.6;
}

.laptop-about-content .cursor {
    display: inline-block;
    animation: blink 1s infinite;
}

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

.laptop-about-content.visible {
    opacity: 1;
}

.laptop-screen-text.hidden {
    display: none;
}

/* Close Button */
.close-button {
    position: fixed;
    z-index: 5;
    background: rgba(45, 158, 222, 0.9);
    color: #fff;
    border: 2px solid #808080;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background 0.2s ease, color 0.2s ease;
    pointer-events: auto;
}

.close-button:hover {
    background: #fff;
    color: #2d9ade;
}

.close-button.visible {
    display: flex;
}

/* Animated Code Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #000;
    white-space: pre-wrap;
    overflow: hidden;
    will-change: transform;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Laptop responsive sizing */
    .laptop-image {
        width: 90vw;
        max-width: 400px;
        top: 2%;
        left: 50%;
        transform: translateX(-50%);
        transform-origin: center top;
    }

    .laptop-screen-text {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    body {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .laptop-image {
        width: 85vw;
        max-width: 350px;
        top: 1%;
    }

    .laptop-screen-text {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }

    /* Video background optimization for mobile */
    .background-video {
        width: 150%;
        height: 150%;
    }

    /* Reduce animated code background on small screens */
    .animated-background {
        opacity: 0.1;
        font-size: 10px;
    }
}

