:root {
    --primary-color: #e50914;
    --secondary-color: #141414;
    --accent-color: #ff6b6b;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --bg-dark: #000000;
    --bg-card: #1a1a1a;
    --bg-hover: #2a2a2a;
    --border-color: #333333;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/public/img/bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: rgba(20, 20, 20, 0.95);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

.logo-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--text-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-group small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.btn-login:hover:not(:disabled) {
    background: #c90812;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 12px 15px;
    border-radius: var(--radius);
    margin-top: 20px;
    font-size: 0.9rem;
    display: none;
}

.alert-success {
    background: rgba(0, 200, 83, 0.2);
    border: 1px solid rgba(0, 200, 83, 0.5);
    color: #00c853;
}

.alert-error {
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid rgba(229, 9, 20, 0.5);
    color: #e50914;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.supported-servers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.supported-servers span {
    padding: 4px 10px;
    background: var(--bg-card);
    border-radius: 15px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: rgba(20, 20, 20, 0.98);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-center {
    display: flex;
    gap: 5px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius);
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-color);
}

.nav-btn.active {
    background: var(--primary-color);
    color: var(--text-color);
}

.nav-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.username {
    font-weight: 600;
    font-size: 0.95rem;
}

.expiration {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-settings,
.btn-logout {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.btn-settings svg,
.btn-logout svg {
    width: 22px;
    height: 22px;
    fill: var(--text-secondary);
}

.btn-settings:hover,
.btn-logout:hover {
    background: var(--bg-hover);
}

.btn-settings:hover svg,
.btn-logout:hover svg {
    fill: var(--text-color);
}

.main-content {
    padding: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-bar input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    fill: var(--text-secondary);
    pointer-events: none;
}

.content-area {
    min-height: 400px;
}

.category-section {
    margin-bottom: 50px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 5px;
    border-left: 4px solid var(--primary-color);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.content-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: var(--secondary-color);
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.content-card:hover .card-overlay {
    opacity: 1;
}

.btn-play {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-play:hover {
    transform: scale(1.1);
}

.btn-play svg {
    width: 28px;
    height: 28px;
    fill: white;
    margin-left: 3px;
}

.card-info {
    padding: 15px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.loading,
.error,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-secondary);
}

.spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.player-container {
    width: 100%;
    max-width: 1400px;
    background: var(--secondary-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.player-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.btn-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--bg-hover);
}

.btn-close svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: black;
}

.player-wrapper video,
.player-wrapper .video-js,
.player-wrapper #video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-controls {
    padding: 20px 30px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-color);
}

.btn-icon.active {
    background: var(--primary-color);
}

.btn-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--text-color);
}

.player-selector {
    padding: 10px 15px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    background: var(--secondary-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-content.small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}

.settings-group {
    margin-bottom: 25px;
}

.settings-group h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #c90812;
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

@media (max-width: 1024px) {
    .nav-center {
        gap: 3px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .nav-center {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
    
    .nav-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .user-info {
        align-items: flex-start;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .login-box {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1.2rem;
    }
    
    .nav-logo {
        height: 32px;
    }
    
    .nav-btn {
        font-size: 0.75rem;
        padding: 8px 10px;
    }
    
    .nav-icon {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-box {
        padding: 25px 20px;
    }
    
    .logo-container h1 {
        font-size: 1.5rem;
    }
}
