* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Disable browser smoothing for sharp pixels */
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    text-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body {
    font-family: zx-spectrum;
    background: #000000;
    color: white;
    min-height: 100svh;
    overflow-x: auto;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}
@font-face {
    font-family: "zx-spectrum";
    src: url(zx-spectrum.ttf) format("truetype");
  }

.container {
    width: 100%;
    height: 100svh;
    padding: 20px;
    text-align: left;
    position: relative;
}



.pixel-counter { 
    font-family: zx-spectrum;
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #00ff00;
    font-weight: bold;
    font-display: swap;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}



.pixel-svg {
    height: 100%;
    background: transparent;
    display: block;
    margin: 0;
    overflow: visible;
    transform-origin: 0 0;
    will-change: transform;
    transition: transform 0.1s ease-out;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    shape-rendering: crispEdges;
    /* Additional properties for sharp rendering */
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    text-rendering: optimizeSpeed;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.svg-container {
    width: 90svw;
    height: auto;
    background: transparent;
    overflow-x: scroll;
    overflow-y: scroll;
    border: none;
    position: relative;
    margin: 50px auto; /* Center horizontally */
    cursor: crosshair;
    user-select: none;
}

.svg-container:active {
    cursor: crosshair;
}

.pixel-rect {
    fill: #00ff00;
    stroke: none;
}

/* Make SVG rectangles more visible and sharp */
.pixel-svg rect {
    stroke-width: 0;
    shape-rendering: crispEdges;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    /* Force sharp rendering */
    vector-effect: non-scaling-stroke;
    paint-order: fill;
}



/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .pixel-counter {
        font-size: 1rem;
        margin-top: 40px;
    }
}


/* Zoom controls */
.zoom-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px;
    z-index: 1000;
}

.zoom-btn {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 40px;
}

.custom-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    min-width: 120px;
}

.dropdown-selected {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'zx-spectrum', monospace;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    padding-right: 30px;
}

.dropdown-selected::after {
    content: '▼';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #00ff00;
    opacity: 0.7;
}

.dropdown-selected:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

.dropdown-selected:active {
    background: rgba(0, 255, 0, 0.4);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    border: 1px solid #00ff00;
    border-top: none;
    display: none;
    z-index: 10000;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

/* Custom scrollbar styling */
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: rgba(0, 255, 0, 0.1);
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.5);
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.7);
}

.dropdown-option {
    padding: 8px 12px;
    color: #00ff00;
    font-family: 'zx-spectrum', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-option:hover {
    background: rgba(0, 255, 0, 0.2);
}

.dropdown-option:active {
    background: rgba(0, 255, 0, 0.3);
}

.zoom-btn:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

.zoom-btn:active {
    background: rgba(0, 255, 0, 0.4);
    transform: scale(0.95);
}

.zoom-level {
    color: #00ff00;
    font-size: 12px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}



/* Mobile responsive zoom controls */
@media (max-width: 768px) {
    .zoom-controls {
        top: 10px;
        right: 10px;
        padding: 8px;
        gap: 8px;
    }
    
    .zoom-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }
    
    .zoom-level {
        font-size: 11px;
        min-width: 45px;
    }
}

a {
    color: #0f0;
    text-decoration: none;
} 