:root {
    --bg-dark: #07050e;
    --card-bg: rgba(18, 15, 31, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary-cyan: #00f3ff;
    --secondary-magenta: #ff00ff;
    --accent-purple: #9d00ff;
    --text-bright: #ffffff;
    --text-dim: #9aa0b4;
    --accent-green: #00ff88;
    --accent-red: #ff3366;
    --glow-cyan: 0 0 25px rgba(0, 243, 255, 0.35);
    --glow-magenta: 0 0 25px rgba(255, 0, 255, 0.35);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 243, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(255, 0, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #0c0819 0%, #040207 100%);
    color: var(--text-bright);
    min-height: 100vh;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    flex-wrap: wrap;
    gap: 16px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 18px;
}

.omega-emblem {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.omega-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.6));
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.title-group h1 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.badge-app {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--primary-cyan);
    padding: 3px 8px;
    border-radius: 12px;
}

.neon-text {
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(0, 243, 255, 0.5));
}

.subtitle {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 5px 10px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.25s ease;
}

.lang-btn .flag {
    font-size: 14px;
}

.lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-magenta));
    color: #000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

/* User Status Bar */
.user-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--primary-cyan);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.4);
    color: #ff3366;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-logout:hover {
    background: rgba(255, 51, 102, 0.3);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}

/* Auth Card */
.auth-section {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 35px 30px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.auth-header-icon {
    font-size: 48px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.auth-card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.5;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    margin-bottom: 16px;
}

.input-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    background: rgba(10, 8, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
}

.input-group input:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.btn-primary-auth {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.3);
}

.btn-primary-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(157, 0, 255, 0.5);
}

/* Dashboard Section */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Toolbar & Scanner */
.toolbar-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-info h2 {
    font-size: 20px;
    font-weight: 800;
}

.path-hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

.path-hint code {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--primary-cyan);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-scan {
    background: linear-gradient(135deg, #00f3ff, #00ff88);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.3);
}

.btn-scan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

/* Upload Section & Dropzone */
.dropzone {
    position: relative;
    background: rgba(15, 12, 28, 0.5);
    border: 2px dashed rgba(0, 243, 255, 0.3);
    border-radius: 20px;
    padding: 35px 20px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.dropzone.dragover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

.file-input {
    display: none;
}

.upload-icon {
    color: var(--primary-cyan);
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.4));
}

.dropzone-content h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.dropzone-content .highlight {
    color: var(--primary-cyan);
}

.dropzone-content .hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 22px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

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

.upload-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--secondary-magenta));
    transition: width 0.3s ease;
}

/* Gallery / Video Grid */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.search-box input {
    background: rgba(18, 15, 31, 0.8);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 8px 18px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    width: 250px;
    transition: all 0.25s ease;
}

.search-box input:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.25);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 20px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
}

.empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

/* Video Card */
.video-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.video-card:hover {
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 243, 255, 0.15);
    transform: translateY(-3px);
}

.video-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.video-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.25);
    color: var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.video-meta {
    flex: 1;
    overflow: hidden;
}

.video-filename {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.video-subdetails {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-dim);
}

.fmt-badge {
    background: rgba(157, 0, 255, 0.2);
    border: 1px solid rgba(157, 0, 255, 0.4);
    color: #c870ff;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.link-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-link-http {
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--primary-cyan);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.btn-link-http:hover {
    background: rgba(0, 243, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.btn-link-https {
    background: rgba(255, 0, 255, 0.12);
    border: 1px solid rgba(255, 0, 255, 0.4);
    color: var(--secondary-magenta);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.btn-link-https:hover {
    background: rgba(255, 0, 255, 0.25);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-preview {
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid rgba(0, 255, 136, 0.35);
    color: var(--accent-green);
    padding: 5px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-preview:hover {
    background: rgba(0, 255, 136, 0.25);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-delete:hover {
    color: var(--accent-red);
}

/* Modal Preview Player */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: #0f0b1e;
    border: 1px solid var(--primary-cyan);
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 26px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    max-height: 480px;
}

.modal-body video {
    width: 100%;
    max-height: 480px;
    outline: none;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 22px;
    background: var(--card-bg);
}

.modal-footer button {
    flex: 1;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(18, 15, 31, 0.95);
    border: 1px solid var(--primary-cyan);
    border-radius: 12px;
    padding: 12px 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}
