:root {
    --bg-color: #f9fafb;
    /* gray-50 */
    --card-bg: #ffffff;
    --primary: #2563eb;
    /* blue-600 */
    --primary-hover: #1d4ed8;
    /* blue-700 */
    --text-main: #1f2937;
    /* gray-800 */
    --text-muted: #6b7280;
    /* gray-500 */
    --border: #e5e7eb;
    /* gray-200 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --error: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

#app {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    /* rounded-3xl / 2xl */
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 28rem;
    /* max-w-md */
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.card.wide {
    max-width: 56rem;
    /* max-w-4xl */
}

.card.full {
    max-width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

input,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 3rem;
    /* Space for icon */
    background-color: #f9fafb;
    /* gray-50 */
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    /* rounded-xl */
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
}

input:focus,
select:focus {
    background-color: #ffffff;
    border-color: #d1d5db;
    /* gray-300 */
    box-shadow: 0 0 0 2px rgba(229, 231, 235, 0.5);
    /* ring-gray-200 */
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    /* gray-400 */
    pointer-events: none;
}

/* Buttons */
button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    /* rounded-xl */
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* Silver Button Style */
.btn-silver {
    background: linear-gradient(to bottom, #f3f4f6, #e5e7eb, #9ca3af);
    color: #374151;
    /* gray-700 */
    border: 1px solid #d1d5db;
    box-shadow: var(--shadow-lg);
}

.btn-silver:hover {
    background: linear-gradient(to bottom, #ffffff, #f3f4f6, #d1d5db);
}

.btn-silver:active {
    transform: scale(0.98);
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    color: var(--text-main);
}

.btn-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.btn-danger:hover {
    background-color: #fecaca;
}

.btn-success {
    background-color: #dcfce7;
    color: #15803d;
}

.btn-success:hover {
    background-color: #bbf7d0;
}

/* Dashboard Feed */
.feed-container {
    width: 100%;
    max-width: 42rem;
    /* max-w-2xl */
}

.content-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #f3f4f6;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.content-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f9fafb;
}

.avatar-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(to top right, #a855f7, #ec4899);
    padding: 2px;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #374151;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.content-actions {
    padding: 1rem;
}

.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    padding: 0;
    width: auto;
    cursor: pointer;
    color: #1f2937;
    transition: transform 0.1s;
}

.icon-btn:active {
    transform: scale(0.9);
}

.icon-btn svg {
    width: 1.75rem;
    height: 1.75rem;
}

.icon-btn.liked svg {
    fill: #ef4444;
    color: #ef4444;
}

/* Admin Tabs */
.tabs-container {
    display: flex;
    overflow-x: auto;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
}

.tab-item {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-top: 4px solid transparent;
    border-radius: 0;
}

.tab-item.active {
    background: white;
    color: var(--primary);
    border-top-color: var(--primary);
}

.tab-badge {
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background: #eff6ff;
    color: var(--primary);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th {
    text-align: left;
    padding: 1rem;
    background: #f9fafb;
    color: var(--text-muted);
    font-weight: 500;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

tr:hover td {
    background: #f9fafb;
}

/* Utilities (Tailwind-like) */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.items-start {
    align-items: flex-start;
}

.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-32 {
    height: 8rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.min-h-\[500px\] {
    min-height: 500px;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.pl-3 {
    padding-left: 0.75rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.m-0 {
    margin: 0;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.ml-8 {
    margin-left: 2rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.text-white {
    color: white;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-blue-500 {
    color: #3b82f6;
}

.text-blue-600 {
    color: #2563eb;
}

.text-red-500 {
    color: #ef4444;
}

.text-red-600 {
    color: #dc2626;
}

.text-amber-500 {
    color: #f59e0b;
}

.text-purple-600 {
    color: #9333ea;
}

.text-purple-700 {
    color: #7e22ce;
}

.text-orange-500 {
    color: #f97316;
}

.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.border {
    border-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-b-2 {
    border-bottom-width: 2px;
}

.border-l-2 {
    border-left-width: 2px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-blue-600 {
    border-color: #2563eb;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.relative {
    position: relative;
}

.block {
    display: block;
}

/* Hover states */
.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:bg-gray-200:hover {
    background-color: #e5e7eb;
}

.hover\:bg-red-50:hover {
    background-color: #fef2f2;
}

.hover\:bg-green-100:hover {
    background-color: #dcfce7;
}

.hover\:bg-purple-50:hover {
    background-color: #faf5ff;
}

.hover\:bg-purple-200:hover {
    background-color: #e9d5ff;
}

.hover\:bg-orange-50:hover {
    background-color: #fff7ed;
}

.hover\:text-red-500:hover {
    color: #ef4444;
}

.hover\:text-gray-700:hover {
    color: #374151;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Media Queries */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Toast */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}