body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f9f9f9;
    position: relative;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    width: 800px;
    padding: 20px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 100px);
    box-sizing: border-box;
    gap: 20px;
}

@media screen and (max-height: 600px) {
    body {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .main-container {
        padding-top: 10px;
        padding-bottom: 100px;
        gap: 10px;
    }

    .shortcut-hint {
        font-size: 12px;
        padding: 6px 12px;
        gap: 12px;
    }

    .key {
        padding: 1px 6px;
    }
}

h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.player-container {
    width: 100%;
    max-width: 800px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#youtube-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 0 0 8px 8px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #ff0000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

#toggle-list {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background-color: #ff0000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s;
}

#toggle-list:hover {
    transform: scale(1.1);
}

.channel-list-container {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
}

.channel-list-container.show {
    right: 0;
}

#channel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: calc(100vh - 40px);
    overflow-y: auto;
}

#channel-list li {
    padding: 10px;
    margin: 5px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

#channel-list li:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

#channel-list li.active {
    background-color: #ff0000;
    color: white;
    transform: translateX(5px);
}

.channel-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.channel-thumbnail {
    width: 120px;
    height: 67.5px;
    border-radius: 4px;
    object-fit: cover;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-title {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.9em;
    color: #666;
}

.active .channel-details {
    color: rgba(255, 255, 255, 0.8);
}

.channel-name {
    font-weight: 500;
}

.channel-category {
    font-size: 0.9em;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.active .channel-category {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.error-message {
    color: #dc3545;
    text-align: center;
    padding: 10px;
}

.loading {
    text-align: center;
    color: #6c757d;
    padding: 10px;
}

/* 自定義滾動條 */
#channel-list::-webkit-scrollbar {
    width: 8px;
}

#channel-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#channel-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#channel-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

.shortcut-hint {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    gap: 16px;
    backdrop-filter: blur(5px);
    opacity: 0.8;
    transition: opacity 0.3s;
    white-space: nowrap;
    margin-top: 10px;
}

.shortcut-hint:hover {
    opacity: 1;
}

.key {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 2px;
    font-family: monospace;
}

.control-buttons button {
    position: relative;
}

.button-hint {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
  