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

body {
    font-family: 'VT323', monospace;
    background: #000;
    overflow: hidden;
    height: 100vh;
    color: #fff;
}

/* CRT screen effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 255, 0.03),
        rgba(0, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

#container {
    width: 100vw;
    height: 100vh;
    cursor: grab;
}

#container:active {
    cursor: grabbing;
}

#controls {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #000;
    border: 3px solid #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), inset 0 0 20px rgba(0, 255, 255, 0.1);
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    font-size: 18px;
    letter-spacing: 1px;
}

/* Teletext Header */
.teletext-header {
    background: #00f;
    color: #ff0;
    padding: 10px 15px;
    border-bottom: 3px solid #0ff;
    position: relative;
}

.page-number {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 16px;
    background: #000;
    padding: 2px 8px;
    border: 2px solid #ff0;
}

.brand-title {
    text-align: center;
    padding-top: 5px;
}

.teletext-logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #000;
}

.teletext-subtitle {
    font-size: 14px;
    margin-top: 2px;
    letter-spacing: 3px;
}

/* Sections */
.teletext-section {
    padding: 15px;
    border-bottom: 2px solid #0ff;
}

.section-title {
    background: #0ff;
    color: #000;
    padding: 5px 10px;
    margin-bottom: 12px;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 2px;
}

/* Teletext Buttons */
.teletext-button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: #f00;
    color: #fff;
    border: 3px solid #fff;
    font-family: 'VT323', monospace;
    font-size: 20px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.teletext-button:hover {
    background: #fff;
    color: #f00;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.play-button {
    background: #0f0;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.play-button:hover {
    background: #fff;
    color: #0f0;
}

.action-button {
    background: #ff0;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.action-button:hover {
    background: #fff;
    color: #ff0;
}

/* Teletext Row */
.teletext-row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
}

.teletext-label {
    color: #0ff;
    font-size: 18px;
}

.teletext-value {
    background: #000;
    color: #ff0;
    padding: 5px 15px;
    border: 2px solid #ff0;
    font-size: 22px;
    min-width: 60px;
    text-align: center;
}

/* Slider */
.teletext-slider {
    width: 100%;
    height: 30px;
    background: #000;
    border: 2px solid #0ff;
    outline: none;
    margin: 10px 0;
    -webkit-appearance: none;
}

.teletext-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #ff0;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

.teletext-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #ff0;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

/* Sound Map Grid */
.teletext-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sound-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0ff;
    font-size: 18px;
}

.color-box {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    display: inline-block;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Instructions */
.teletext-text p {
    color: #0ff;
    margin: 8px 0;
    font-size: 16px;
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.teletext-btn-small {
    padding: 10px;
    background: #00f;
    color: #fff;
    border: 2px solid #0ff;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.teletext-btn-small:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Footer */
.teletext-footer {
    background: #00f;
    color: #ff0;
    padding: 10px 15px;
    text-align: center;
}

.footer-line {
    color: #0ff;
    margin-bottom: 5px;
    font-size: 14px;
}

.footer-text {
    font-size: 16px;
    letter-spacing: 2px;
    margin: 5px 0;
}

.footer-credits {
    font-size: 14px;
    margin: 5px 0;
    color: #0ff;
}

.teletext-link {
    color: #ff0;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s;
}

.teletext-link:hover {
    color: #fff;
    text-shadow: 0 0 10px #ff0;
}

.footer-date {
    font-size: 14px;
    color: #fff;
    margin-top: 5px;
}

/* Scrollbar */
#controls::-webkit-scrollbar {
    width: 12px;
}

#controls::-webkit-scrollbar-track {
    background: #000;
    border-left: 2px solid #0ff;
}

#controls::-webkit-scrollbar-thumb {
    background: #0ff;
    border: 2px solid #000;
}

#controls::-webkit-scrollbar-thumb:hover {
    background: #ff0;
}
