:root {
    --color-primary: #3ea6ff;
    --color-secondary: #065fd4;
    --color-bg-primary: #0f0f0f;
    --color-bg-secondary: #1f1f1f;
    --color-bg-tertiary: #272727;
    --color-bg-hover: #3f3f3f;
    --color-text-primary: #ffffff;
    --color-text-secondary: #aaaaaa;
    --color-border: #3f3f3f;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
}

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

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: "Roboto", "Arial", sans-serif;
    overflow-x: hidden;
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Auth Page Styles */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

.auth-container {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s ease-out;
}

.logo-large {
    display: block;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 2rem;
}

.logo-dev {
    color: var(--color-primary);
}

.logo-creator {
    color: var(--color-text-primary);
}

/* Security Warning */
.security-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.security-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.security-warning i {
    color: var(--color-warning);
    margin-right: 0.5rem;
}

.security-warning h4 {
    color: var(--color-warning);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.security-warning p {
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* YouTube Connect Button */
.youtube-connect-btn {
    background: #FF0000;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    font-size: 1rem;
    margin-top: 1rem;
}

.youtube-connect-btn:hover {
    background: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.youtube-connect-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-size: 16px;
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62, 166, 255, 0.2);
}

.btn-secondary {
    background: var(--color-bg-tertiary);
    color: white;
    border: 1px solid var(--color-border);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-size: 16px;
}

.btn-secondary:hover {
    background: var(--color-bg-hover);
    transform: translateY(-2px);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: fadeIn 0.3s ease-out;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    animation: fadeIn 0.3s ease-out;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-bg-tertiary);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Privacy Note */
.privacy-note {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.privacy-note a {
    color: var(--color-primary);
    text-decoration: none;
}

.privacy-note a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background-color: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideInRight 0.4s ease-out;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-info:hover {
    background-color: var(--color-bg-hover);
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-primary);
    object-fit: cover;
}

/* Sidebar */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 65px);
    animation: fadeIn 0.5s ease-out;
}

.sidebar {
    width: 240px;
    background-color: var(--color-bg-secondary);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem 0;
    animation: slideInLeft 0.4s ease-out;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease-out;
}

.sidebar-item:hover {
    background-color: var(--color-bg-tertiary);
    transform: translateX(4px);
}

.sidebar-item:hover::before {
    transform: scaleY(0.5);
}

.sidebar-item.active {
    background-color: var(--color-bg-tertiary);
    color: var(--color-primary);
}

.sidebar-item.active::before {
    transform: scaleY(1);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.content-header h1 {
    font-size: 28px;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: var(--color-text-secondary);
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--color-bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--color-primary);
}

.stat-card:nth-child(1) { --i: 1; }
.stat-card:nth-child(2) { --i: 2; }
.stat-card:nth-child(3) { --i: 3; }
.stat-card:nth-child(4) { --i: 4; }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.3s;
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.1);
}

.stat-card-icon.primary { background-color: rgba(62, 166, 255, 0.1); color: var(--color-primary); }
.stat-card-icon.success { background-color: rgba(34, 197, 94, 0.1); color: var(--color-success); }
.stat-card-icon.warning { background-color: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.stat-card-icon.error { background-color: rgba(239, 68, 68, 0.1); color: var(--color-error); }

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 0.25rem;
    transition: all 0.3s;
}

.stat-card:hover .stat-value {
    color: var(--color-primary);
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* YouTube Link Section */
.youtube-link-card {
    background-color: var(--color-bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.youtube-link-card i {
    font-size: 48px;
    color: #FF0000;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.youtube-link-card:hover i {
    transform: scale(1.1);
}

.youtube-link-card h2 {
    margin-bottom: 0.5rem;
}

.youtube-link-card p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

/* Video List */
.video-list {
    display: grid;
    gap: 1rem;
}

.video-item {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s;
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
    animation-delay: calc(var(--i, 0) * 0.05s);
}

.video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--color-primary);
}

.video-thumbnail {
    width: 200px;
    height: 112px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.video-item:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-details {
    flex: 1;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.video-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.status-approved {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.status-rejected {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(62, 166, 255, 0.1);
    transform: translateY(-1px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--color-bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--color-error);
    transform: scale(1.1);
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--color-success);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
}

/* Reviews */
.review-list {
    display: grid;
    gap: 1rem;
}

.review-item {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
    animation-delay: calc(var(--i, 0) * 0.05s);
}

.review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.review-user {
    font-weight: 600;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
    color: var(--color-warning);
}

.review-text {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.review-date {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* Channel Info Card */
.channel-card {
    background-color: var(--color-bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    animation: fadeIn 0.5s ease-out;
}

.channel-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.channel-stats {
    display: flex;
    gap: 1.5rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* Enhanced Controls */
.control-group {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    animation: fadeIn 0.4s ease-out;
}

.control-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width 0.6s ease-out;
}

/* Import Section */
.import-section {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
    animation: fadeIn 0.5s ease-out;
}

.import-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray-400 {
    color: var(--color-text-secondary);
}

.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }