:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f0f0f5;
    --text-dim: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #0a0b10;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out, pulse 8s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
    animation-duration: 25s;
    animation-delay: -2s;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }

    33% {
        transform: translateY(-30px) translateX(20px) scale(1.05);
    }

    66% {
        transform: translateY(20px) translateX(-40px) scale(0.95);
    }

    100% {
        transform: translateY(0) translateX(0) scale(1);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        filter: blur(80px);
    }

    100% {
        opacity: 0.6;
        filter: blur(60px);
    }
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Typography & Header */
header {
    margin-bottom: 3rem;
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    color: var(--text-dim);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Card Styles & Glassmorphism */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card {
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Form Styles */
.input-group {
    display: flex;
    gap: 1rem;
}

input[type="url"],
select {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input[type="url"]:focus,
select:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

button {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

button:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

button:active {
    transform: scale(0.98);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 1rem;
}

/* Tracker Section Styles */
.section-header {
    margin-bottom: 2rem;
}

.section-subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: -1rem;
}

/* Channel Chips */
.channel-chips {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
}

.channel-chips::-webkit-scrollbar {
    height: 4px;
}

.channel-chips::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.chip {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
}

.chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.chip.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Table Design */
.table-container {
    position: relative;
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem 1.5rem;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover:not(.empty-state) {
    background: rgba(255, 255, 255, 0.02);
}

.empty-state {
    text-align: center;
    color: var(--text-dim);
}

/* Badges & Metrics */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-viral {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-hot {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.score-cell {
    font-weight: 700;
    color: var(--accent-secondary);
    font-size: 1.1rem;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.video-title {
    font-weight: 500;
    color: var(--text);
}

.video-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.actions-cell {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
}

.divider {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    margin: 0 0.5rem;
}

.header-main {
    text-align: left;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    width: 46px;
    height: 46px;
    padding: 0;
    min-width: unset;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.action-btn:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px) scale(1.05);
}

.action-btn.btn-approve:hover {
    background: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.action-btn.btn-reject:hover {
    background: var(--error);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.action-btn i,
.action-btn svg {
    width: 22px;
    height: 22px;
}

/* Tooltips */
.action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.action-btn:hover::after {
    opacity: 1;
    bottom: 130%;
}

.text-center {
    text-align: center;
}

.view-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.view-link:hover {
    text-decoration: underline;
}

/* Loaders */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 11, 16, 0.7);
    z-index: 10;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Entrance Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

.error-text {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
}

.submission-status {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.submission-status h3 {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pending-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pending-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.pending-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pending-info .url {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-info .status-msg {
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.tiny-loader {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 107, 107, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tracker-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
}

.toast {
    background: rgba(10, 11, 16, 0.9);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast i {
    width: 20px;
    height: 20px;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--error);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s, transform 0.5s;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Tablet & Mobile Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .selector-wrapper {
        width: 100%;
    }
}