@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111119;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --accent-purple: #6c5ce7;
    --accent-blue: #0984e3;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #0984e3);
    --success: #00b894;
    --danger: #e74c3c;
    --warning: #fdcb6e;
    --glass-blur: blur(20px);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
}

/* Auth Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.1), transparent 40%),
                radial-gradient(circle at bottom left, rgba(9, 132, 227, 0.1), transparent 40%);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-title {
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

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

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.input-field:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-field {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #ff7675;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    color: #55efc4;
    border: 1px solid rgba(0, 184, 148, 0.2);
}

/* Password Strength */
.password-requirements {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.req-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.req-item.met {
    color: var(--success);
}

/* OTP Input */
.otp-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 10px;
}

.otp-input {
    width: 100%;
    height: 56px;
    font-size: 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: border-color 0.3s;
}

.otp-input:focus {
    border-color: var(--accent-purple);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quota-badge {
    background: rgba(108, 92, 231, 0.15);
    color: #a29bfe;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.main-content {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-purple);
    background: rgba(108, 92, 231, 0.05);
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.image-preview-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.image-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* Pipeline Steps */
.pipeline-container {
    margin-top: 30px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -30px;
    width: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1;
    transition: all 0.3s;
}

.step-item.active .step-icon {
    border-color: var(--accent-blue);
    background: rgba(9, 132, 227, 0.1);
    box-shadow: 0 0 15px rgba(9, 132, 227, 0.3);
    animation: pulse 2s infinite;
}

.step-item.completed .step-icon {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.step-content {
    flex: 1;
    padding-top: 10px;
}

.step-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.step-item.active .step-title {
    color: var(--text-primary);
}

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

/* Video Player */
.video-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

video {
    width: 100%;
    display: block;
}

/* Platform Checkboxes */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.platform-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.platform-card:hover {
    border-color: rgba(255,255,255,0.2);
}

.platform-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-purple);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.admin-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-active { background: rgba(0, 184, 148, 0.1); color: #55efc4; }
.badge-inactive { background: rgba(231, 76, 60, 0.1); color: #ff7675; }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(9, 132, 227, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(9, 132, 227, 0); }
    100% { box-shadow: 0 0 0 0 rgba(9, 132, 227, 0); }
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .main-content { padding: 20px; }
    .topbar { padding: 0 20px; }
    .glass-card { padding: 30px 20px; }
}
