html, body {
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
    overflow: hidden;
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
}

.credits-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    min-height: 100vh;
    min-width: 100vw;
    position: relative;
    border: none;
    outline: none;
    background-color: black;
}

.tv-container {
    width: 100vw;
    height: 95vh;
    max-width: 1200px;
    max-height: 900px;
    background-image: url('../gifs/Credits_tv.gif?v=2');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    z-index: 1;
}

.tv-screen {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 65%;
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
}

.tv-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(255, 255, 255, 0.1) 1px,
            rgba(255, 255, 255, 0.1) 2px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.05) 1px,
            rgba(0, 0, 0, 0.05) 2px
        );
    pointer-events: none;
    z-index: 1000;
    animation: tvStatic 0.15s infinite linear;
}

@keyframes tvStatic {
    0% { 
        opacity: 0.8;
        transform: translateX(0px);
    }
    25% { 
        opacity: 0.9;
        transform: translateX(1px);
    }
    50% { 
        opacity: 0.85;
        transform: translateX(-1px);
    }
    75% { 
        opacity: 0.95;
        transform: translateX(0.5px);
    }
    100% { 
        opacity: 0.8;
        transform: translateX(0px);
    }
}

.screen-content {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 30px;
    box-sizing: border-box;
    gap: 30px;
    position: relative;
    z-index: 50;
}

.left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.character-portraits {
    width: 120px;
    height: 160px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    box-sizing: border-box;
}

.character-icon {
    width: 50px;
    height: 50px;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(0.7);
}

.character-icon:hover,
.character-icon.selected {
    filter: brightness(1.2) drop-shadow(0 0 10px #ffff99);
    transform: scale(1.05);
}

.navigation-arrows {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.arrow {
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.arrow:hover {
    color: #ffff99;
}

.right-side {
    flex: 1.5;
    padding-left: 30px;
}

.credit-box {
    background-color: rgba(0, 0, 0, 0.8);
    border: 3px solid white;
    border-radius: 10px;
    padding: 20px;
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.credit-header {
    font-size: 22px;
    color: white;
    text-align: center;
    border-bottom: 2px solid white;
    padding-bottom: 10px;
}

.credit-subtitle {
    font-size: 12px;
    color: #ccc;
    text-align: center;
}

.credit-quote {
    font-size: 10px;
    color: #ffff99;
    text-align: center;
    font-style: italic;
}

.credit-description {
    font-size: 10px;
    color: white;
    line-height: 1.5;
    text-align: justify;
    flex: 1;
    overflow-y: auto;
}

.back-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    z-index: 2000;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .tv-container {
        width: 100vw;
        height: 100vh;
        background-size: cover;
        margin: 0;
    }
    
    .tv-screen {
        width: 85vw;
        height: 70vh;
        top: 5%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .screen-content {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }
    
    .left-side {
        flex: none;
        height: 30%;
        position: relative;
    }
    
    .character-portraits {
        width: 80px;
        height: 100px;
        gap: 8px;
        padding: 10px;
    }
    
    .character-icon {
        width: 30px;
        height: 30px;
    }
    
    .navigation-arrows {
        left: -15px;
        gap: 8px;
    }
    
    .arrow {
        font-size: 16px;
    }
    
    .right-side {
        flex: none;
        height: 70%;
        padding-left: 0;
        padding-top: 0;
    }
    
    .credit-box {
        padding: 15px;
        gap: 10px;
    }
    
    .credit-header {
        font-size: 14px;
    }
    
    .credit-subtitle {
        font-size: 7px;
    }
    
    .credit-quote {
        font-size: 6px;
    }
    
    .credit-description {
        font-size: 5px;
        line-height: 1.2;
    }
    
    .back-button {
        z-index: 2000;
    }
}