/* BingeTV - Tizen CSS */

:root {
    --bingetv-red: #8B0000;
    --bingetv-dark-red: #660000;
    --background-primary: #0A0A0A;
    --background-secondary: #1A1A1A;
    --background-card: #1E1E1E;
    --background-hover: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --text-muted: #888888;
}

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

body {
    font-family: Arial, sans-serif;
    background: var(--background-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* Splash Screen */
.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--background-primary);
}

.logo {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.logo-small {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.logo-tiny {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.loading {
    width: 50px;
    height: 50px;
    border: 5px solid var(--background-card);
    border-top-color: var(--bingetv-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 60px;
}

.login-container {
    max-width: 800px;
    text-align: center;
}

.subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.tab-group {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-button {
    padding: 15px 40px;
    font-size: 20px;
    background: var(--background-card);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button:hover,
.tab-button:focus {
    border-color: var(--bingetv-red);
    transform: scale(1.05);
}

.tab-button.active {
    background: var(--bingetv-red);
}

.input-field {
    width: 100%;
    padding: 20px;
    margin-bottom: 15px;
    font-size: 20px;
    background: var(--background-card);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: var(--bingetv-red);
}

.btn-primary {
    width: 100%;
    padding: 20px;
    font-size: 22px;
    background: var(--bingetv-red);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--bingetv-dark-red);
    transform: scale(1.02);
}

.btn-secondary {
    padding: 15px 30px;
    font-size: 18px;
    background: var(--background-card);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--background-hover);
    transform: scale(1.05);
}

.checkbox-label {
    display: block;
    margin-top: 20px;
    font-size: 18px;
    color: var(--text-secondary);
}

/* Main Screen */
.top-bar {
    display: flex;
    align-items: center;
    padding: 20px 40px;
    background: var(--background-secondary);
}

.top-bar h2 {
    flex: 1;
    color: var(--bingetv-red);
    font-size: 28px;
}

.top-bar-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
    background: var(--background-card);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover,
.icon-btn:focus {
    border-color: var(--bingetv-red);
    transform: scale(1.1);
}

.main-content {
    display: flex;
    height: calc(100vh - 100px);
}

.category-sidebar {
    width: 300px;
    background: var(--background-secondary);
    padding: 20px;
    overflow-y: auto;
}

.category-item {
    padding: 20px;
    margin-bottom: 10px;
    background: var(--background-card);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 20px;
}

.category-item:hover,
.category-item:focus {
    background: var(--background-hover);
    transform: translateX(10px);
}

.category-item.active {
    background: var(--bingetv-red);
    color: var(--text-primary);
}

.channel-grid-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.channel-card {
    background: var(--background-card);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
}

.channel-card:hover,
.channel-card:focus {
    transform: scale(1.1);
    border-color: var(--bingetv-red);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}

.channel-logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.channel-name {
    font-size: 16px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.favorite-badge {
    color: var(--bingetv-red);
    font-size: 24px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--background-secondary);
    padding: 40px;
    border-radius: 12px;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.context-menu {
    text-align: center;
    max-width: 600px;
}

.context-logo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* Loading/Error Views */
.loading-view,
.error-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.error-message,
.error-view {
    color: #EF4444;
    margin-top: 20px;
    font-size: 18px;
}

.loading-message {
    color: var(--bingetv-red);
    margin-top: 20px;
    font-size: 18px;
}