* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: #050505;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: 'Special Elite', monospace;
}

.back-link {
    position: fixed; top: 20px; left: 20px;
    color: #555; text-decoration: none; z-index: 1000;
}

.screen-center {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.rpg-interface {
    display: flex;
    width: 100%;
    max-width: 900px;
    height: 400px;
    background: #000;
    border: 4px double #444;
    box-shadow: 0 0 50px rgba(0,0,0,1);
    z-index: 10;
}

.portrait-frame {
    width: 300px;
    height: 100%;
    border-right: 4px double #444;
    position: relative;
    overflow: hidden;
    background: #111;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}

.portrait-scanline {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    animation: scan-face 3s linear infinite;
}

@keyframes scan-face {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.data-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.speaker-name {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

.status-light {
    color: #0f0;
    font-size: 14px;
    text-shadow: 0 0 5px #0f0;
    animation: blink 2s infinite;
}

.text-content {
    flex: 1;
    font-size: 18px;
    line-height: 1.4;
    color: #ccc;
    overflow-y: auto;
}

.action-bar {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.choice-btn {
    background: #000;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 16px;
    font-family: inherit;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.choice-btn:hover {
    background: #fff;
    color: #000;
}

@keyframes blink { 50% { opacity: 0.3; } }

@media (max-width: 700px) {
    .rpg-interface {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }
    .portrait-frame {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 4px double #444;
    }
    .data-frame {
        height: 300px;
    }
}