/* EzYT Premium Theme */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #475569;
    --danger: #ef4444;
    --success: #22c55e;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Typography */
h1,
h2,
h3 {
    color: var(--text-main);
    font-weight: 600;
    margin-top: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: var(--text-main);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.flex {
    display: flex;
    gap: 10px;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grid {
    display: grid;
    gap: 20px;
}

.h-full {
    height: 100%;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Forms */
label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background-color: var(--bg-input);
    color: var(--text-main);
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-danger {
    background-color: var(--danger);
}

.btn-success {
    background-color: var(--success);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Editor Specific */
.editor-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    /* Sidebar | Preview */
    gap: 20px;
    height: calc(100vh - 80px);
    /* Minus header margins */
}

.preview-container {
    background: #000;
    border-radius: 8px;
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layering for Live Preview */
.layer-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Aspect Fill */
    z-index: 1;
}

.layer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    mix-blend-mode: screen;
    /* SIMULATE FFMPEG BLEND */
    pointer-events: none;
}

.layer-text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    /* Approx standard ffmpeg font size relative to container? will need JS scaling */
    font-family: Arial, sans-serif;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}