@font-face {
    font-family: 'Outfit';
    src: url('/mensajero/assets/fonts/Outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/mensajero/assets/fonts/Outfit-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/mensajero/assets/fonts/Outfit-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --font-family: 'Outfit', sans-serif;
    --accent-color: #facc15;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
    user-select: none;
}

body.editor-enabled {
    cursor: default;
    user-select: auto;
}

.screen-editor-toolbar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.76);
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.screen-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.virtual-canvas {
    position: relative;
    width: 100%;
    height: calc(100vw * (2/3));
    max-height: 100vh;
    max-width: calc(100vh * (3/2));
    overflow: hidden;
}

/* Base Areas - All are absolute positioned via JS */
.message-area,
.photo-area,
.qr-area,
.qr-label {
    position: absolute !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-area {
    z-index: 15;
}

.photo-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.message-area {
    z-index: 20;
}

.qr-area {
    z-index: 10;
    overflow: visible;
    /* Allow QR to scale properly */
}

.qr-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-label {
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 30;
    text-align: center;
}

body.editor-enabled .qr-area,
body.editor-enabled .qr-label {
    outline: 1px dashed rgba(255,255,255,0.24);
    cursor: move;
}

.editor-target {
    overflow: visible !important;
}

.editor-handle {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.9);
    background: rgba(14, 165, 233, 0.95);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.18s ease, transform 0.18s ease;
    cursor: nwse-resize;
}

body.editor-enabled .editor-target:hover .editor-handle,
body.editor-enabled .editor-target.editor-active .editor-handle {
    opacity: 1;
    transform: scale(1);
}

h1 {
    line-height: 1.2;
    word-break: break-word;
    max-width: 100%;
    font-size: var(--font-size-vw, 5vw);
    text-align: center;
}

h1#screenMessage {
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.4));
    transition: all 0.5s ease;
}
