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

:root {
    --primary-color: #0a0e27;
    --secondary-color: #1a1f3a;
    --accent-color: #2d3561;
    --highlight-color: #e94560;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* Player Page Styles - Integrated with Dashboard */
.player-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.player-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 1rem;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #667eea;
    transform: translateX(-3px);
}

.back-btn i {
    font-size: 0.9rem;
}

.tabs-container {
    width: 100%;
    height: 100%;
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    background: rgba(10, 14, 39, 0.8);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tab-btn i,
.tab-btn span {
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--text-primary);
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md);
}

.tab-btn.active::before {
    opacity: 1;
}

/* Tab Content */
.tabs-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

.tab-pane {
    display: none;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

.tab-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.tab-header {
    text-align: center;
    flex-shrink: 0;
}

.tab-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.tab-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Input Section (Only for Inline Tab) */
.input-section {
    flex-shrink: 0;
}

.input-container {
    margin-top: 0.5rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), var(--shadow-lg);
}

.input-icon {
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 0 0.75rem;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #667eea;
}

.video-url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    padding: 0.5rem 0;
}

.video-url-input::placeholder {
    color: var(--text-muted);
}

.load-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.load-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.load-btn:active {
    transform: translateY(0);
}

.load-btn i {
    font-size: 0.85rem;
}

/* Video Wrapper */
.video-wrapper {
    flex: 1;
    position: relative;
    background: rgba(10, 14, 39, 0.5);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper:hover::before {
    opacity: 1;
}

.video-wrapper video {
    /* width: 100%; */
    height: 100%;
    border-radius: 12px;
    display: block;
    background: #000;
    box-shadow: var(--shadow-md);
    object-fit: contain;
}

/* Inline Video */
.inline-video {
    max-width: 100%;
}

.inline-video video {
    aspect-ratio: 16/9;
    max-height: 100%;
}

/* Vertical Video */
.vertical-video {
    max-width: 400px;
    margin: 0 auto;
}

.vertical-video video {
    aspect-ratio: 9/16;
    max-height: 100%;
}

/* Landscape Video */
.landscape-video {
    max-width: 100%;
}

.landscape-video video {
    aspect-ratio: 16/9;
    max-height: 100%;
}

/* Video Placeholder */
.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: var(--text-secondary);
    text-align: center;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 2px dashed rgba(102, 126, 234, 0.3);
}

.placeholder-icon i {
    font-size: 2rem;
    color: #667eea;
    opacity: 0.7;
}

.video-placeholder p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.placeholder-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-top: 0.5rem;
}

.video-wrapper:has(video[src]:not([src=""])) .video-placeholder,
.video-wrapper video:not([src=""]) + .video-placeholder {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
.tab-pane::-webkit-scrollbar {
    width: 8px;
}

.tab-pane::-webkit-scrollbar-track {
    background: rgba(10, 14, 39, 0.5);
    border-radius: 4px;
}

.tab-pane::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

.tab-pane::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .player-content {
        padding: 0.5rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .back-btn {
        width: 100%;
        justify-content: center;
    }

    .tabs-container {
        border-radius: 16px;
    }

    .tab-btn {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }

    .tab-btn span {
        display: none;
    }

    .tab-pane {
        padding: 1rem;
    }

    .tab-title {
        font-size: 1.25rem;
    }

    .video-wrapper {
        padding: 0.75rem;
    }

    .vertical-video {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .load-btn {
        width: 100%;
        justify-content: center;
    }

    .tabs-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .tab-btn {
        width: 100%;
    }
}
