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

body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.app-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 4px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
    border-color: rgba(0, 255, 255, 0.5);
    color: #00ffff;
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-label {
    font-weight: 500;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-library-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-library-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}

/* Fullscreen Button */
.fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: 6px;
    color: #ff00ff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    border-color: rgba(255, 0, 255, 0.5);
}

.fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

/* Fullscreen mode styles */
body.fullscreen-mode .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.fullscreen-mode .header:hover {
    opacity: 1;
}

body.fullscreen-mode .main-content {
    padding-top: 0;
}

body.fullscreen-mode .app-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

body.fullscreen-mode .asset-library {
    z-index: 1001;
}

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

/* Asset Library */
.asset-library {
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    border-right: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
}

.asset-library.open {
    transform: translateX(0);
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.library-header h2 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #00ffff;
}

.close-library-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.close-library-btn:hover {
    background: rgba(255, 0, 100, 0.3);
}

.library-upload {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
}

.library-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.library-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.library-empty p {
    margin-bottom: 8px;
}

.library-empty .hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

.asset-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.asset-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.asset-item.selected {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.4);
}

.asset-thumb {
    width: 60px;
    height: 40px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.asset-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.asset-name {
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.asset-remove {
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 100, 0.2);
    border: none;
    border-radius: 4px;
    color: #ff6b9d;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.asset-item:hover .asset-remove {
    opacity: 1;
}

.asset-remove:hover {
    background: rgba(255, 0, 100, 0.4);
}

.library-actions {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.send-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(255, 0, 255, 0.3));
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 6px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.4), rgba(255, 0, 255, 0.4));
}

.send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Channel Selector (Video Mixer only) */
.channel-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.channel-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.channel-buttons {
    display: flex;
    gap: 4px;
}

.channel-btn {
    width: 36px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.channel-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.4);
    color: #00ffff;
}

.channel-btn.active {
    background: rgba(0, 255, 255, 0.3);
    border-color: rgba(0, 255, 255, 0.6);
    color: #00ffff;
}

/* App Container */
.app-container {
    flex: 1;
    position: relative;
    background: #000;
}

.app-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.app-frame.active {
    opacity: 1;
    pointer-events: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}
