:root {
    --primary-color: #0A0A0A;
    --secondary-color: #FFFFFF;
    --accent-color: #8B7355;
    --text-primary: #0A0A0A;
    --text-secondary: #6B6B6B;
    --background: #FAFAFA;
    --border-color: #E5E5E5;
    --danger-color: #DC3545;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0A0A0A 0%, #1a1a1a 50%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-modal {
    background: var(--secondary-color);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

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

.login-form .form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    border-radius: 4px;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

.login-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
    text-align: center;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #0A0A0A 0%, #1a1a1a 100%);
    color: var(--secondary-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #8B7355 0%, #a08565 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.3);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Logout Button */
.logout-btn {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

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

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--secondary-color);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--background);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.nav-item svg {
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2rem 3rem;
}

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

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--background);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--secondary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit {
    background: var(--accent-color);
    color: var(--secondary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #755d45;
}

/* ImgBB Config */
.imgbb-config {
    background: var(--secondary-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.config-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.config-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Articles List */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-item {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    gap: 2rem;
    transition: all 0.3s;
}

.article-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-thumbnail {
    width: 200px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-info {
    flex: 1;
}

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

.article-title-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.article-category-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-meta-info {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--secondary-color);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Form */
.article-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.upload-progress {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-color);
}

.image-preview {
    margin-top: 1rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border: 1px solid var(--border-color);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .imgbb-config {
        flex-direction: column;
        align-items: stretch;
    }
}

