/* Common styles for both Tetris and Emulator pages */

body {
    margin: 0;
    padding: 0;
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Mode Switch Button */
.mode-switch {
    position: absolute;
    top: 3px;
    right: 50px;
    z-index: 10000;
}

.mode-switch a {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(129, 82, 158, 0.3);
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-radius: 3px;
    font-family: Arial, sans-serif;
    font-size:9px;
    transition: all 0.3s;
    transform: scale(1);
    transform-origin: top right;
}

.mode-switch a:hover {
    background: rgba(90, 31, 125, 0.8);
    color: rgba(255, 255, 255, 0.9);
}

/* RetroBoy Controls */
.btn-direction {
    cursor: pointer !important;
    user-select: none !important;
    z-index: 100 !important;
    position: relative !important;
}

.btn-AB {
    cursor: pointer !important;
    user-select: none !important;
    z-index: 10 !important;
}

.btn-direction .vertical,
.btn-direction .horizontal {
    z-index: 101 !important;
    pointer-events: auto !important;
}

.btn-direction:before {
    pointer-events: none !important;
}

/* Canvas Positioning */
.gameboy .screen-cont .screen canvas {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    image-rendering: pixelated !important;
}

/* Responsive Mode Switch */
@media (max-width: 500px) {
    .mode-switch {
        top: 3px;
        right: 50px;
    }

    .mode-switch a {
        padding: 8px 12px;
        font-size: 8px;
    }
}

/* GitHub Link */
.github-link {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #000;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 1000;
}

.github-link:hover {
    opacity: 1;
}

/* Control Button Overlays */
#btnUp {
    position: absolute;
    top: 60px;
    left: 70px;
    width: 40px;
    height: 40px;
    z-index: 200;
    cursor: pointer;
}

#btnDown {
    position: absolute;
    top: 135px;
    left: 70px;
    width: 40px;
    height: 35px;
    z-index: 200;
    cursor: pointer;
}

#btnLeft {
    position: absolute;
    top: 95px;
    left: 35px;
    width: 35px;
    height: 40px;
    z-index: 200;
    cursor: pointer;
}

#btnRight {
    position: absolute;
    top: 95px;
    left: 110px;
    width: 35px;
    height: 40px;
    z-index: 200;
    cursor: pointer;
}

#btnSelect {
    position: absolute;
    top: 205px;
    left: 135px;
    width: 60px;
    height: 12px;
    transform: rotate(-25deg);
    z-index: 100;
    cursor: pointer;
}

#btnStart {
    position: absolute;
    top: 205px;
    left: 202px;
    width: 60px;
    height: 12px;
    transform: rotate(-25deg);
    z-index: 100;
    cursor: pointer;
}

/* Button Labels */
.label-select {
    position: absolute;
    top: 223px;
    left: 155px;
    font-size: 10px;
    font-weight: bold;
    color: #5a1f7d;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 50;
}

.label-start {
    position: absolute;
    top: 221px;
    left: 225px;
    font-size: 10px;
    font-weight: bold;
    color: #5a1f7d;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 50;
}

.label-ab {
    position: absolute;
    top: 135px;
    left: 298px;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 50;
}

.label-ab span {
    font-size: 18px;
    font-weight: bold;
    color: #5a1f7d;
}

.label-ab span:last-child {
    margin-left: 50px;
}

/* Emulator specific styles */
#power-button,
#power-toggle {
    cursor: pointer;
}
    opacity: 1;
}
