:root {
    --primary: #1B3A5F;
    --primary-light: #2C5282;
    --accent: #4299E1;
    --success: #48BB78;
    --warning: #ED8936;
    --danger: #F56565;
    --gray-50: #F7FAFC;
    --gray-100: #EDF2F7;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E0;
    --gray-400: #A0AEC0;
    --gray-500: #718096;
    --gray-600: #4A5568;
    --gray-700: #2D3748;
    --gray-800: #1A202C;
    --white: #FFFFFF;
    --shadow: 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);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    color: var(--gray-800);
}

.app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Content Section */
.content-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--gray-700);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Content Card */
.content-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.card-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--accent);
    color: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-rating.pending {
    background: var(--warning);
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-date {
    font-size: 12px;
    color: var(--gray-400);
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 32px;
}

@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
    }
}

.modal-preview {
    position: relative;
}

.carousel {
    aspect-ratio: 3/4;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-100);
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    border: none;
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--primary);
}

.modal-details h3 {
    font-size: 14px;
    color: var(--gray-500);
    margin: 20px 0 8px;
}

.modal-details h3:first-child {
    margin-top: 0;
}

.content-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.content-type {
    padding: 4px 12px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.content-date {
    font-size: 12px;
    color: var(--gray-400);
}

.caption-box,
.hashtags-box {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
}

.hashtags-box {
    color: var(--accent);
}

/* Rating Section */
.rating-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.rating-section h3 {
    margin-bottom: 16px !important;
}

.rating-section h4 {
    font-size: 13px;
    color: var(--gray-500);
    margin: 16px 0 8px;
}

.rating-stars {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.star {
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s;
    filter: grayscale(100%);
}

.star:hover,
.star.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.rating-hint {
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 8px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.content-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.content-actions .btn {
    flex: 1;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
}

.toast {
    background: var(--gray-800);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Generating State */
.generating {
    position: relative;
}

.generating::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}