
:root {
    --tv-width: 800px;
    --tv-height: 450px;
    --remote-width: 180px;  
    --remote-height: 450px;
}

@media (max-width: 768px) {
    :root {
        --tv-width: 100vw;
        --tv-height: 56.25vw; /* 16:9 aspect ratio */
        --remote-width: 280px;
        --remote-height: auto;
    }

    body {
        padding: 10px;
        gap: 20px;
    }

    .tv-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .tv-frame {
        padding: 0;
        border-radius: 0;
    }

    .screen {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .channel-list {
        width: 90%;
        padding: 15px;
        font-size: 0.85em;
    }
}

body {
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    color: white;
    gap: 50px;
    flex-direction: column;
    padding: 20px;
}

.tv-container {
    position: relative;
    width: 100%;
    max-width: var(--tv-width);
    height: auto;
    aspect-ratio: 16/9;
}

.tv-frame {
    background: none;
    border-radius: 0;
    padding: 0;
    position: relative;
    width: 100%;
    height: 100%;
}

.screen {
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.screen.off {
    background: #111;
}

.screen.off::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: tvOff 0.3s ease-out forwards;
}

/* Remote Control Styles */
.remote-container {
    width: min(var(--remote-width), 90%);
    height: var(--remote-height);
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
    border-radius: 25px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 1px solid #444;
    position: relative;
    transition: transform 0.3s ease;
}

.remote-container:hover {
    transform: none;
}

.remote-power {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at 40% 40%, #cc0000, #aa0000);
    border: 2px solid #aa0000;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 
        inset 0 2px 3px rgba(255,255,255,0.2),
        inset 0 -2px 5px rgba(0,0,0,0.3),
        0 2px 4px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remote-power::after {
    content: "⏻";
    color: rgba(255,255,255,0.9);
    font-size: 20px;
    line-height: 1;
    font-family: system-ui;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

@supports not (content: "⏻") {
    .remote-power::after {
        content: "○";
    }
}

.remote-power:hover {
    background: radial-gradient(circle at 40% 40%, #ff0000, #cc0000);
    transform: scale(1.1);
    box-shadow: 
        inset 0 2px 3px rgba(255,255,255,0.3),
        inset 0 -2px 5px rgba(0,0,0,0.3),
        0 0 15px rgba(255,0,0,0.5);
}

.remote-power:active {
    transform: scale(0.95);
    box-shadow: 
        inset 0 2px 3px rgba(255,255,255,0.1),
        inset 0 -2px 5px rgba(0,0,0,0.4);
}

.remote-power.off {
    background: radial-gradient(circle at 40% 40%, #666, #444);
    border-color: #555;
    box-shadow: 
        inset 0 2px 3px rgba(255,255,255,0.1),
        inset 0 -2px 5px rgba(0,0,0,0.3);
}

.remote-power.off::after {
    opacity: 0.7;
}

.channel-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;           
    width: 90%;
    background: rgba(0,0,0,0.15);
    padding: 12px;
    border-radius: 15px;
}

.remote-button {
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    padding: 10px;        
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.remote-button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.remote-button:hover {
    background: #888;
    transform: scale(1.1);
}

.volume-buttons {
    display: flex;
    gap: 20px;
    width: 85%;
    justify-content: center;
    background: rgba(0,0,0,0.15);
    padding: 12px;
    border-radius: 15px;
}

.volume-button {
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    padding: 8px 15px;   
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.volume-button:hover {
    background: #777;
    transform: scale(1.1);
}

.channel-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
}

.channel-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    justify-content: center;
}

.channel-nav-button {
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.remote-container::before {
    content: "";
    position: absolute;
    bottom: 15px;
    font-size: 0.7em;
    opacity: 0.5;
    letter-spacing: 1px;
}

.channel-nav-button:hover {
    background: #666;
    transform: scale(1.05);
}

.volume-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 5px;
    display: none;
    z-index: 10;
}

/* Add to the existing CSS */
#video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#youtube-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.channel-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 5px;
    z-index: 10;
    display: none;
}

.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 5px;
    z-index: 10;
    display: none;
    text-align: center;
}

/* Add keyboard info style */
.keyboard-info {
    display: none;
}

@media (min-width: 769px) {
    .keyboard-info {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.7);
        padding: 10px 20px;
        border-radius: 5px;
        font-size: 0.9em;
        opacity: 0.7;
    }
}

.channel-input {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    padding: 20px 40px;
    border-radius: 10px;  
    font-size: 48px;
    z-index: 10;
    display: none;
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    min-width: 100px;
    text-align: center;
}

.channel-list {
    position: static;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9em;
    color: white;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.channel-list h3 {
    margin: 0 0 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 5px;
}

.channel-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.channel-list li {
    margin-bottom: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
    cursor: pointer;
}

.channel-list li:hover {
    opacity: 1;
background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}
.channel-list ul { list-style: none; padding: 0; margin: 0; }
.channel-list li {
    display: block; padding: 7px 8px; margin-bottom: 5px;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 5px;
    background: rgba(255,255,255,0.05); cursor: grab; user-select: none;
}
.channel-list li:active { cursor: grabbing; }
.channel-list li.dragging { opacity: 0.35; }
.channel-list li.drag-over { border-color: #72b7ff; background: rgba(70,140,220,0.2); }
.drag-hint { font-size: 0.75em; opacity: 0.65; margin: -7px 0 12px; }
/* TV + Kanal Listesi + Kumanda yerleşimi */
.tv-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 25px;
    width: 100%;
    max-width: 1250px;
}

.tv-layout .channel-list {
    width: 180px;
    max-width: 180px;
height: 450px;
overflow-y: auto;
    margin: 0;
    flex-shrink: 0;
}

.tv-layout .tv-container {
    flex: 1;
    max-width: 800px;
}

.tv-layout .remote-container {
    flex-shrink: 0;
}

/* Mobil */
@media (max-width: 768px) {
    .tv-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .tv-layout .channel-list {
        width: 90%;
        max-width: 600px;
    }

    .tv-layout .tv-container {
        width: 100%;
        max-width: 100%;
    }

    .tv-layout .remote-container {
        width: 280px;
        
    }
}

/* HTML içindeki küçük inline stiller de buraya taşındı. */
#site-url {
    display: block;
    width: fit-content;
    max-width: calc(100% - 40px);
    margin: -25px auto 20px;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

#youtube-embed {
    display: none;
}

/* Kanal listesi scrollbar rengi */

.tv-layout .channel-list::-webkit-scrollbar {
    width: 7px;

}

.tv-layout .channel-list::-webkit-scrollbar-track {
    background: #111111;
   border-radius: 3px; 
}

.tv-layout .channel-list::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

.tv-layout .channel-list::-webkit-scrollbar-thumb:hover {
    background: #777777;

border-radius: 3px;}

.url-tester button {
    background: #111111;
    color: #eeeeee;
    border: 1px solid #555555;
    border-radius: 3px;
width: 60px;
    height: 30px;
    padding: 5px;
align-items: center;
justify-content: center;
font-size: 11px;
}

.url-tester button:hover {
    background: #333333;
}

/* URL giriş kutusu */
.url-tester input {
    background: #111111;
    color: #eeeeee;
    border: 1px solid #555555;
    border-radius: 3px;
    font-size: 13px;
    height: 30px;
    padding: 0 10px;
    box-sizing: border-box;
    outline: none;
}

/* Kutunun içine tıklayınca */
.url-tester input:focus {
    border-color: #777777;
}

/* Kutunun içindeki açıklama yazısı */
.url-tester input::placeholder {
    color: #888888;
    font-size: 12px;
}

/* Seçili kanal */
.channel-list li.active-channel {
    background: rgba(224, 179, 79, 0.25);
    color: #ffd36a;
    border-color: #b58b35;
    opacity: 1;
}




